Patchwork ext2/xattr_security.c: local functions should be static

login
register
mail settings
Submitter hartleys
Date Sept. 23, 2011, 8:51 p.m.
Message ID <201109231351.24566.hartleys@visionengravers.com>
Download mbox | patch
Permalink /patch/116175/
State Not Applicable
Headers show

Comments

hartleys - Sept. 23, 2011, 8:51 p.m.
This quiets the sparse noise:

warning: symbol 'ext2_initxattrs' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Jan Kara <jack@suse.cz>

---

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jan Kara - Oct. 4, 2011, 11:37 p.m.
On Fri 23-09-11 13:51:24, H Hartley Sweeten wrote:
> This quiets the sparse noise:
> 
> warning: symbol 'ext2_initxattrs' was not declared. Should it be static?
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Jan Kara <jack@suse.cz>
  Hmm, this patch doesn't seem to be against latest Linus kernel... At
least I don't see ext2_initxattrs() there - although I remember seeing
patches adding this function flying somewhere.

								Honza

> diff --git a/fs/ext2/xattr_security.c b/fs/ext2/xattr_security.c
> index c922adc..ed1a5d5 100644
> --- a/fs/ext2/xattr_security.c
> +++ b/fs/ext2/xattr_security.c
> @@ -46,7 +46,7 @@ ext2_xattr_security_set(struct dentry *dentry, const char *name,
>  			      value, size, flags);
>  }
>  
> -int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
> +static int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
>  		    void *fs_info)
>  {
>  	const struct xattr *xattr;

Patch

diff --git a/fs/ext2/xattr_security.c b/fs/ext2/xattr_security.c
index c922adc..ed1a5d5 100644
--- a/fs/ext2/xattr_security.c
+++ b/fs/ext2/xattr_security.c
@@ -46,7 +46,7 @@  ext2_xattr_security_set(struct dentry *dentry, const char *name,
 			      value, size, flags);
 }
 
-int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
+static int ext2_initxattrs(struct inode *inode, const struct xattr *xattr_array,
 		    void *fs_info)
 {
 	const struct xattr *xattr;