LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3 linux-next] befs: replace typedef befs_mount_options by structure
@ 2015-03-30 20:45 Fabian Frederick
  2015-03-30 20:45 ` [PATCH 2/3 linux-next] befs: replace typedef befs_sb_info " Fabian Frederick
  2015-03-30 20:45 ` [PATCH 3/3 linux-next] befs: replace typedef befs_inode_info " Fabian Frederick
  0 siblings, 2 replies; 3+ messages in thread
From: Fabian Frederick @ 2015-03-30 20:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Andrew Morton

See Documentation/CodingStyle

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/befs/befs.h     | 6 +++---
 fs/befs/linuxvfs.c | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/befs/befs.h b/fs/befs/befs.h
index 3a7813a..d4751af 100644
--- a/fs/befs/befs.h
+++ b/fs/befs/befs.h
@@ -19,14 +19,14 @@ typedef u64 befs_blocknr_t;
  * BeFS in memory structures
  */
 
-typedef struct befs_mount_options {
+struct befs_mount_options {
 	kgid_t gid;
 	kuid_t uid;
 	int use_gid;
 	int use_uid;
 	int debug;
 	char *iocharset;
-} befs_mount_options;
+};
 
 typedef struct befs_sb_info {
 	u32 magic1;
@@ -52,7 +52,7 @@ typedef struct befs_sb_info {
 	befs_inode_addr indices;
 	u32 magic3;
 
-	befs_mount_options mount_opts;
+	struct befs_mount_options mount_opts;
 	struct nls_table *nls;
 
 } befs_sb_info;
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index e089f19..126fb6c 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -51,7 +51,7 @@ static int befs_nls2utf(struct super_block *sb, const char *in, int in_len,
 static void befs_put_super(struct super_block *);
 static int befs_remount(struct super_block *, int *, char *);
 static int befs_statfs(struct dentry *, struct kstatfs *);
-static int parse_options(char *, befs_mount_options *);
+static int parse_options(char *, struct befs_mount_options *);
 
 static const struct super_operations befs_sops = {
 	.alloc_inode	= befs_alloc_inode,	/* allocate a new inode */
@@ -669,7 +669,7 @@ static const match_table_t befs_tokens = {
 };
 
 static int
-parse_options(char *options, befs_mount_options * opts)
+parse_options(char *options, struct befs_mount_options *opts)
 {
 	char *p;
 	substring_t args[MAX_OPT_ARGS];
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3 linux-next] befs: replace typedef befs_sb_info by structure
  2015-03-30 20:45 [PATCH 1/3 linux-next] befs: replace typedef befs_mount_options by structure Fabian Frederick
@ 2015-03-30 20:45 ` Fabian Frederick
  2015-03-30 20:45 ` [PATCH 3/3 linux-next] befs: replace typedef befs_inode_info " Fabian Frederick
  1 sibling, 0 replies; 3+ messages in thread
From: Fabian Frederick @ 2015-03-30 20:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Andrew Morton

See Documenation/CodingStyle

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/befs/befs.h       | 9 ++++-----
 fs/befs/datastream.c | 4 ++--
 fs/befs/io.c         | 2 +-
 fs/befs/linuxvfs.c   | 5 ++---
 fs/befs/super.c      | 4 ++--
 5 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/fs/befs/befs.h b/fs/befs/befs.h
index d4751af..11461ab 100644
--- a/fs/befs/befs.h
+++ b/fs/befs/befs.h
@@ -28,7 +28,7 @@ struct befs_mount_options {
 	char *iocharset;
 };
 
-typedef struct befs_sb_info {
+struct befs_sb_info {
 	u32 magic1;
 	u32 block_size;
 	u32 block_shift;
@@ -54,8 +54,7 @@ typedef struct befs_sb_info {
 
 	struct befs_mount_options mount_opts;
 	struct nls_table *nls;
-
-} befs_sb_info;
+};
 
 typedef struct befs_inode_info {
 	u32 i_flags;
@@ -105,10 +104,10 @@ void befs_dump_index_node(const struct super_block *sb, befs_btree_nodehead *);
 /* Gets a pointer to the private portion of the super_block
  * structure from the public part
  */
-static inline befs_sb_info *
+static inline struct befs_sb_info *
 BEFS_SB(const struct super_block *super)
 {
-	return (befs_sb_info *) super->s_fs_info;
+	return (struct befs_sb_info *) super->s_fs_info;
 }
 
 static inline befs_inode_info *
diff --git a/fs/befs/datastream.c b/fs/befs/datastream.c
index 1e8e0b8..ebd5071 100644
--- a/fs/befs/datastream.c
+++ b/fs/befs/datastream.c
@@ -168,7 +168,7 @@ befs_count_blocks(struct super_block * sb, befs_data_stream * ds)
 	befs_blocknr_t blocks;
 	befs_blocknr_t datablocks;	/* File data blocks */
 	befs_blocknr_t metablocks;	/* FS metadata blocks */
-	befs_sb_info *befs_sb = BEFS_SB(sb);
+	struct befs_sb_info *befs_sb = BEFS_SB(sb);
 
 	befs_debug(sb, "---> %s", __func__);
 
@@ -428,7 +428,7 @@ befs_find_brun_dblindirect(struct super_block *sb,
 	struct buffer_head *indir_block;
 	befs_block_run indir_run;
 	befs_disk_inode_addr *iaddr_array = NULL;
-	befs_sb_info *befs_sb = BEFS_SB(sb);
+	struct befs_sb_info *befs_sb = BEFS_SB(sb);
 
 	befs_blocknr_t indir_start_blk =
 	    data->max_indirect_range >> befs_sb->block_shift;
diff --git a/fs/befs/io.c b/fs/befs/io.c
index 0408a3d..7a5b4ec 100644
--- a/fs/befs/io.c
+++ b/fs/befs/io.c
@@ -28,7 +28,7 @@ befs_bread_iaddr(struct super_block *sb, befs_inode_addr iaddr)
 {
 	struct buffer_head *bh = NULL;
 	befs_blocknr_t block = 0;
-	befs_sb_info *befs_sb = BEFS_SB(sb);
+	struct befs_sb_info *befs_sb = BEFS_SB(sb);
 
 	befs_debug(sb, "---> Enter %s "
 		   "[%u, %hu, %hu]", __func__, iaddr.allocation_group,
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 126fb6c..9978db4 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -304,8 +304,7 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
 {
 	struct buffer_head *bh = NULL;
 	befs_inode *raw_inode = NULL;
-
-	befs_sb_info *befs_sb = BEFS_SB(sb);
+	struct befs_sb_info *befs_sb = BEFS_SB(sb);
 	befs_inode_info *befs_ino = NULL;
 	struct inode *inode;
 	long ret = -EIO;
@@ -769,7 +768,7 @@ static int
 befs_fill_super(struct super_block *sb, void *data, int silent)
 {
 	struct buffer_head *bh;
-	befs_sb_info *befs_sb;
+	struct befs_sb_info *befs_sb;
 	befs_super_block *disk_sb;
 	struct inode *root;
 	long ret = -EINVAL;
diff --git a/fs/befs/super.c b/fs/befs/super.c
index ca40f82..aeafc4d 100644
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -24,7 +24,7 @@
 int
 befs_load_sb(struct super_block *sb, befs_super_block * disk_sb)
 {
-	befs_sb_info *befs_sb = BEFS_SB(sb);
+	struct befs_sb_info *befs_sb = BEFS_SB(sb);
 
 	/* Check the byte order of the filesystem */
 	if (disk_sb->fs_byte_order == BEFS_BYTEORDER_NATIVE_LE)
@@ -59,7 +59,7 @@ befs_load_sb(struct super_block *sb, befs_super_block * disk_sb)
 int
 befs_check_sb(struct super_block *sb)
 {
-	befs_sb_info *befs_sb = BEFS_SB(sb);
+	struct befs_sb_info *befs_sb = BEFS_SB(sb);
 
 	/* Check magic headers of super block */
 	if ((befs_sb->magic1 != BEFS_SUPER_MAGIC1)
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3 linux-next] befs: replace typedef befs_inode_info by structure
  2015-03-30 20:45 [PATCH 1/3 linux-next] befs: replace typedef befs_mount_options by structure Fabian Frederick
  2015-03-30 20:45 ` [PATCH 2/3 linux-next] befs: replace typedef befs_sb_info " Fabian Frederick
@ 2015-03-30 20:45 ` Fabian Frederick
  1 sibling, 0 replies; 3+ messages in thread
From: Fabian Frederick @ 2015-03-30 20:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Fabian Frederick, Andrew Morton

See Documentation/CodingStyle

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/befs/befs.h     | 7 +++----
 fs/befs/linuxvfs.c | 7 ++++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/befs/befs.h b/fs/befs/befs.h
index 11461ab..1fead8d 100644
--- a/fs/befs/befs.h
+++ b/fs/befs/befs.h
@@ -56,7 +56,7 @@ struct befs_sb_info {
 	struct nls_table *nls;
 };
 
-typedef struct befs_inode_info {
+struct befs_inode_info {
 	u32 i_flags;
 	u32 i_type;
 
@@ -70,8 +70,7 @@ typedef struct befs_inode_info {
 	} i_data;
 
 	struct inode vfs_inode;
-
-} befs_inode_info;
+};
 
 enum befs_err {
 	BEFS_OK,
@@ -110,7 +109,7 @@ BEFS_SB(const struct super_block *super)
 	return (struct befs_sb_info *) super->s_fs_info;
 }
 
-static inline befs_inode_info *
+static inline struct befs_inode_info *
 BEFS_I(const struct inode *inode)
 {
 	return list_entry(inode, struct befs_inode_info, vfs_inode);
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 9978db4..16e0a48 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -305,7 +305,7 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino)
 	struct buffer_head *bh = NULL;
 	befs_inode *raw_inode = NULL;
 	struct befs_sb_info *befs_sb = BEFS_SB(sb);
-	befs_inode_info *befs_ino = NULL;
+	struct befs_inode_info *befs_ino = NULL;
 	struct inode *inode;
 	long ret = -EIO;
 
@@ -471,7 +471,7 @@ static void *
 befs_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
 	struct super_block *sb = dentry->d_sb;
-	befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
+	struct befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
 	befs_data_stream *data = &befs_ino->i_data.ds;
 	befs_off_t len = data->size;
 	char *link;
@@ -501,7 +501,8 @@ befs_follow_link(struct dentry *dentry, struct nameidata *nd)
 static void *
 befs_fast_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-	befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
+	struct befs_inode_info *befs_ino = BEFS_I(dentry->d_inode);
+
 	nd_set_link(nd, befs_ino->i_data.symlink);
 	return NULL;
 }
-- 
1.9.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-30 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-30 20:45 [PATCH 1/3 linux-next] befs: replace typedef befs_mount_options by structure Fabian Frederick
2015-03-30 20:45 ` [PATCH 2/3 linux-next] befs: replace typedef befs_sb_info " Fabian Frederick
2015-03-30 20:45 ` [PATCH 3/3 linux-next] befs: replace typedef befs_inode_info " Fabian Frederick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).