Re: [PATCH 5/9] bfs: move function prototype to the proper header file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Tigran Aivazian <tigran@...>
Cc: Heikki Orsila <shdl@...>, <trivial@...>, <linux-kernel@...>, <akpm@...>
Date: Thursday, January 24, 2008 - 7:30 pm

Tigran Aivazian пишет:

Thanks, Tigran.

Please find below the corrected version. Compilation test passed successfully.

Dmitri
 
======

The dump_imap() routine is defined in bs/bfs/inode.c and used both in
the same file and in fs/bfs/dir.c. This patch adds an extern function
declaration to the private bfs.h header file.

The effect is that one warning issued by checkpatch.pl is gone.

Before the patch:

$ ./scripts/checkpatch.pl --file  fs/bfs/dir.c | grep total
total: 0 errors, 1 warnings, 370 lines checked

After the patch:

$ ./scripts/checkpatch.pl --file  fs/bfs/dir.c | grep total
total: 0 errors, 0 warnings, 368 lines checked

This patch was compile-tested by building the BFS driver both
as a module and as a part of the kernel proper.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
---
diff --git a/fs/bfs/bfs.h b/fs/bfs/bfs.h
index 090b96e..352804f 100644
--- a/fs/bfs/bfs.h
+++ b/fs/bfs/bfs.h
@@ -54,4 +54,7 @@ extern const struct address_space_operations bfs_aops;
 extern const struct inode_operations bfs_dir_inops;
 extern const struct file_operations bfs_dir_operations;
 
+/* inode.c */
+void dump_imap(const char *, struct super_block *);
+
 #endif /* _FS_BFS_BFS_H */
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
index 5462a5b..2964505 100644
--- a/fs/bfs/dir.c
+++ b/fs/bfs/dir.c
@@ -81,8 +81,6 @@ const struct file_operations bfs_dir_operations = {
 	.fsync		= file_fsync,
 };
 
-extern void dump_imap(const char *, struct super_block *);
-
 static int bfs_create(struct inode *dir, struct dentry *dentry, int mode,
 						struct nameidata *nd)
 {
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
index 5191990..91d5686 100644
--- a/fs/bfs/inode.c
+++ b/fs/bfs/inode.c
@@ -30,8 +30,6 @@ MODULE_LICENSE("GPL");
 #define dprintf(x...)
 #endif
 
-void dump_imap(const char *prefix, struct super_block *s);
-
 static void bfs_read_inode(struct inode *inode)
 {
 	unsigned long ino = inode->i_ino;

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/9] bfs: assorted cleanups, Dmitri Vorobiev, (Thu Jan 24, 6:31 pm)
Re: [PATCH 0/9] bfs: assorted cleanups, Dmitri Vorobiev, (Fri Jan 25, 6:25 am)
[PATCH 8/9] bfs: remove multiple assignments, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)
[PATCH 6/9] bfs: coding style cleanup in fs/bfs/file.c, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)
Re: [PATCH 5/9] bfs: move function prototype to the proper h..., Dmitri Vorobiev, (Thu Jan 24, 7:30 pm)
[PATCH 4/9] bfs: coding style cleanup in fs/bfs/dir.c, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)
[PATCH 3/9] bfs: coding style cleanup in fs/bfs/bfs.h, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)
[PATCH 2/9] bfs: coding style cleanup in fs/bfs/inode.c, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)
[PATCH 1/9] bfs: remove a useless variable, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)
[PATCH 9/9] bfs: use the proper header file for inclusion, Dmitri Vorobiev, (Thu Jan 24, 6:32 pm)