From 7ec13a3b4ff04837328e17740a9e393e56bf42de Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 9 Feb 2019 10:00:37 -0600 Subject: [PATCH] Fix a few typos and wrap some long lines. --- fs/inode/fs_inode.c | 4 ++-- fs/inode/fs_inodereserve.c | 10 +++++++--- fs/inode/fs_inodesearch.c | 17 +++++++++-------- fs/smartfs/smartfs.h | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/fs/inode/fs_inode.c b/fs/inode/fs_inode.c index bb774ba81f..9dbeb1783c 100644 --- a/fs/inode/fs_inode.c +++ b/fs/inode/fs_inode.c @@ -62,9 +62,9 @@ /* Implements a re-entrant mutex for inode access. This must be re-entrant * because there can be cycles. For example, it may be necessary to destroy * a block driver inode on umount() after a removable block device has been - * removed. In that case umount() hold the inode semaphore, but the block + * removed. In that case umount() holds the inode semaphore, but the block * driver may callback to unregister_blockdriver() after the un-mount, - * requiring the seamphore again. + * requiring the semaphore again. */ struct inode_sem_s diff --git a/fs/inode/fs_inodereserve.c b/fs/inode/fs_inodereserve.c index f1b0bc685f..ef8c17e61f 100644 --- a/fs/inode/fs_inodereserve.c +++ b/fs/inode/fs_inodereserve.c @@ -1,7 +1,8 @@ /**************************************************************************** * fs/inode/fs_registerreserve.c * - * Copyright (C) 2007-2009, 2011-2012, 2015, 2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011-2012, 2015, 2017 Gregory Nutt. All + * rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -86,8 +87,11 @@ static void inode_namecpy(char *dest, const char *src) static FAR struct inode *inode_alloc(FAR const char *name) { - int namelen = inode_namelen(name); - FAR struct inode *node = (FAR struct inode *)kmm_zalloc(FSNODE_SIZE(namelen)); + FAR struct inode *node; + int namelen; + + namelen = inode_namelen(name); + node = (FAR struct inode *)kmm_zalloc(FSNODE_SIZE(namelen)); if (node) { inode_namecpy(node->i_name, name); diff --git a/fs/inode/fs_inodesearch.c b/fs/inode/fs_inodesearch.c index 08f68fe8b1..5323377bcb 100644 --- a/fs/inode/fs_inodesearch.c +++ b/fs/inode/fs_inodesearch.c @@ -94,11 +94,11 @@ static int _inode_compare(FAR const char *fname, FAR struct inode *node) for (; ; ) { - /* At end of node name? */ + /* At the end of the node name? */ if (!*nname) { - /* Yes.. also end of find name? */ + /* Yes.. also at the end of find name? */ if (!*fname || *fname == '/') { @@ -114,7 +114,7 @@ static int _inode_compare(FAR const char *fname, FAR struct inode *node) } } - /* At end of find name? */ + /* At end of the find name? */ else if (!*fname || *fname == '/') { @@ -285,7 +285,7 @@ static int _inode_search(FAR struct inode_search_s *desc) /* Case 1: The name is less than the name of the node. * Since the names are ordered, these means that there * is no peer node with this name and that there can be - * no match in the fileystem. + * no match in the filesystem. */ if (result < 0) @@ -314,16 +314,17 @@ static int _inode_search(FAR struct inode_search_s *desc) /* Now there are three remaining possibilities: * (1) This is the node that we are looking for. * (2) The node we are looking for is "below" this one. - * (3) This node is a mountpoint and will absorb all request + * (3) This node is a mountpoint and will absorb all requests * below this one */ name = inode_nextname(name); if (*name == '\0' || INODE_IS_MOUNTPT(node)) { - /* Either (1) we are at the end of the path, so this must be the - * node we are looking for or else (2) this node is a mountpoint - * and will handle the remaining part of the pathname + /* Either (1) we are at the end of the path, so this must be + * the node we are looking for or else (2) this node is a + * mountpoint and will handle the remaining part of the + * pathname */ relpath = name; diff --git a/fs/smartfs/smartfs.h b/fs/smartfs/smartfs.h index b24199a7f3..ddf285d807 100644 --- a/fs/smartfs/smartfs.h +++ b/fs/smartfs/smartfs.h @@ -248,7 +248,7 @@ struct smartfs_entry_s uint32_t datlen; /* Length of inode data */ }; -/* This is an on-device representation of the SMART inode it esists on +/* This is an on-device representation of the SMART inode as it exists on * the FLASH. */