Commit 381be25458524f9bcec5bf1e40c82d1ebb408475

Authored by Ben Dooks
Committed by Linus Torvalds
1 parent 1a80ba8827

[PATCH] ext3: sparse fixes

Fix warnings from sparse due to un-declared functions that should either
have a header file or have been declared static

 fs/ext2/bitmap.c:14:15: warning: symbol 'ext2_count_free' was not declared. Should it be static?
 fs/ext2/namei.c:92:15: warning: symbol 'ext2_get_parent' was not declared. Should it be static?
 fs/ext3/bitmap.c:15:15: warning: symbol 'ext3_count_free' was not declared. Should it be static?
 fs/ext3/namei.c:1013:15: warning: symbol 'ext3_get_parent' was not declared. Should it be static?
 fs/ext3/xattr.c:214:1: warning: symbol 'ext3_xattr_block_get' was not declared. Should it be static?
 fs/ext3/xattr.c:358:1: warning: symbol 'ext3_xattr_block_list' was not declared. Should it be static?
 fs/ext3/xattr.c:630:1: warning: symbol 'ext3_xattr_block_find' was not declared. Should it be static?
 fs/ext3/xattr.c:863:1: warning: symbol 'ext3_xattr_ibody_find' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 8 changed files with 29 additions and 6 deletions Side-by-side Diff

... ... @@ -20,6 +20,8 @@
20 20 #include <linux/quotaops.h>
21 21 #include <linux/buffer_head.h>
22 22  
  23 +#include "bitmap.h"
  24 +
23 25 /*
24 26 * balloc.c contains the blocks allocation and deallocation routines
25 27 */
... ... @@ -8,7 +8,7 @@
8 8 */
9 9  
10 10 #include <linux/buffer_head.h>
11   -
  11 +#include "bitmap.h"
12 12  
13 13 static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};
14 14  
  1 +/* linux/fs/ext3/bitmap.c
  2 + *
  3 + * Copyright (C) 2005 Simtec Electronics
  4 + * Ben Dooks <ben@simtec.co.uk>
  5 + *
  6 +*/
  7 +
  8 +extern unsigned long ext3_count_free (struct buffer_head *, unsigned int );
... ... @@ -26,6 +26,7 @@
26 26  
27 27 #include <asm/byteorder.h>
28 28  
  29 +#include "bitmap.h"
29 30 #include "xattr.h"
30 31 #include "acl.h"
31 32  
... ... @@ -36,6 +36,8 @@
36 36 #include <linux/quotaops.h>
37 37 #include <linux/buffer_head.h>
38 38 #include <linux/smp_lock.h>
  39 +
  40 +#include "namei.h"
39 41 #include "xattr.h"
40 42 #include "acl.h"
41 43  
  1 +/* linux/fs/ext3/namei.h
  2 + *
  3 + * Copyright (C) 2005 Simtec Electronics
  4 + * Ben Dooks <ben@simtec.co.uk>
  5 + *
  6 +*/
  7 +
  8 +extern struct dentry *ext3_get_parent(struct dentry *child);
... ... @@ -36,9 +36,12 @@
36 36 #include <linux/namei.h>
37 37 #include <linux/quotaops.h>
38 38 #include <linux/seq_file.h>
  39 +
39 40 #include <asm/uaccess.h>
  41 +
40 42 #include "xattr.h"
41 43 #include "acl.h"
  44 +#include "namei.h"
42 45  
43 46 static int ext3_load_journal(struct super_block *, struct ext3_super_block *);
44 47 static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
... ... @@ -615,7 +618,6 @@
615 618 #endif
616 619 };
617 620  
618   -struct dentry *ext3_get_parent(struct dentry *child);
619 621 static struct export_operations ext3_export_ops = {
620 622 .get_parent = ext3_get_parent,
621 623 };
... ... @@ -210,7 +210,7 @@
210 210 return cmp ? -ENODATA : 0;
211 211 }
212 212  
213   -int
  213 +static int
214 214 ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
215 215 void *buffer, size_t buffer_size)
216 216 {
... ... @@ -354,7 +354,7 @@
354 354 return buffer_size - rest;
355 355 }
356 356  
357   -int
  357 +static int
358 358 ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
359 359 {
360 360 struct buffer_head *bh = NULL;
... ... @@ -626,7 +626,7 @@
626 626 struct buffer_head *bh;
627 627 };
628 628  
629   -int
  629 +static int
630 630 ext3_xattr_block_find(struct inode *inode, struct ext3_xattr_info *i,
631 631 struct ext3_xattr_block_find *bs)
632 632 {
... ... @@ -859,7 +859,7 @@
859 859 struct ext3_iloc iloc;
860 860 };
861 861  
862   -int
  862 +static int
863 863 ext3_xattr_ibody_find(struct inode *inode, struct ext3_xattr_info *i,
864 864 struct ext3_xattr_ibody_find *is)
865 865 {