Skip to content

Commit

Permalink
[PATCH] ext3: sparse fixes
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ben Dooks authored and Linus Torvalds committed Oct 31, 2005
1 parent 1a80ba8 commit 381be25
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 6 deletions.
2 changes: 2 additions & 0 deletions fs/ext3/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <linux/quotaops.h>
#include <linux/buffer_head.h>

#include "bitmap.h"

/*
* balloc.c contains the blocks allocation and deallocation routines
*/
Expand Down
2 changes: 1 addition & 1 deletion fs/ext3/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

#include <linux/buffer_head.h>

#include "bitmap.h"

static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0};

Expand Down
8 changes: 8 additions & 0 deletions fs/ext3/bitmap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* linux/fs/ext3/bitmap.c
*
* Copyright (C) 2005 Simtec Electronics
* Ben Dooks <[email protected]>
*
*/

extern unsigned long ext3_count_free (struct buffer_head *, unsigned int );
1 change: 1 addition & 0 deletions fs/ext3/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include <asm/byteorder.h>

#include "bitmap.h"
#include "xattr.h"
#include "acl.h"

Expand Down
2 changes: 2 additions & 0 deletions fs/ext3/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include <linux/quotaops.h>
#include <linux/buffer_head.h>
#include <linux/smp_lock.h>

#include "namei.h"
#include "xattr.h"
#include "acl.h"

Expand Down
8 changes: 8 additions & 0 deletions fs/ext3/namei.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* linux/fs/ext3/namei.h
*
* Copyright (C) 2005 Simtec Electronics
* Ben Dooks <[email protected]>
*
*/

extern struct dentry *ext3_get_parent(struct dentry *child);
4 changes: 3 additions & 1 deletion fs/ext3/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,12 @@
#include <linux/namei.h>
#include <linux/quotaops.h>
#include <linux/seq_file.h>

#include <asm/uaccess.h>

#include "xattr.h"
#include "acl.h"
#include "namei.h"

static int ext3_load_journal(struct super_block *, struct ext3_super_block *);
static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
Expand Down Expand Up @@ -615,7 +618,6 @@ static struct super_operations ext3_sops = {
#endif
};

struct dentry *ext3_get_parent(struct dentry *child);
static struct export_operations ext3_export_ops = {
.get_parent = ext3_get_parent,
};
Expand Down
8 changes: 4 additions & 4 deletions fs/ext3/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ ext3_xattr_find_entry(struct ext3_xattr_entry **pentry, int name_index,
return cmp ? -ENODATA : 0;
}

int
static int
ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
void *buffer, size_t buffer_size)
{
Expand Down Expand Up @@ -354,7 +354,7 @@ ext3_xattr_list_entries(struct inode *inode, struct ext3_xattr_entry *entry,
return buffer_size - rest;
}

int
static int
ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
{
struct buffer_head *bh = NULL;
Expand Down Expand Up @@ -626,7 +626,7 @@ struct ext3_xattr_block_find {
struct buffer_head *bh;
};

int
static int
ext3_xattr_block_find(struct inode *inode, struct ext3_xattr_info *i,
struct ext3_xattr_block_find *bs)
{
Expand Down Expand Up @@ -859,7 +859,7 @@ struct ext3_xattr_ibody_find {
struct ext3_iloc iloc;
};

int
static int
ext3_xattr_ibody_find(struct inode *inode, struct ext3_xattr_info *i,
struct ext3_xattr_ibody_find *is)
{
Expand Down

0 comments on commit 381be25

Please sign in to comment.