Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474017

Re: [PATCH 2/2] staging: lustre: hide unused variable

From James Simmons <jsimmons@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] staging: lustre: hide unused variable
Date 2016-09-01 04:00 +0200
Message-ID <scpsl-1In-7@gated-at.bofh.it> (permalink)
References <sbtRn-7g9-7@gated-at.bofh.it> <sbtRo-7g9-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> After a code cleanup, we get a harmless warning about a variable
> that is unused when CONFIG_FS_POSIX_ACL is disabled:
> 
> drivers/staging/lustre/lustre/llite/xattr.c: In function 'll_xattr_get_common':
> drivers/staging/lustre/lustre/llite/xattr.c:312:24: error: unused variable 'lli' [-Werror=unused-variable]
> 
> This puts the variable declaration into the same #ifdef.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 1e1f9ff406fd ("staging: lustre: llite: break ll_getxattr_common into 2 functions")

Reviewed-by: James Simmons <jsimmons@infradead.org>

> ---
>  drivers/staging/lustre/lustre/llite/xattr.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c
> index f252c26ec30f..7b8d4699a71a 100644
> --- a/drivers/staging/lustre/lustre/llite/xattr.c
> +++ b/drivers/staging/lustre/lustre/llite/xattr.c
> @@ -309,7 +309,9 @@ static int ll_xattr_get_common(const struct xattr_handler *handler,
>  {
>  	char fullname[strlen(handler->prefix) + strlen(name) + 1];
>  	struct ll_sb_info *sbi = ll_i2sbi(inode);
> +#ifdef CONFIG_FS_POSIX_ACL
>  	struct ll_inode_info *lli = ll_i2info(inode);
> +#endif
>  	int rc;
>  
>  	CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n",
> -- 
> 2.9.0
> 
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] staging: lustre: fix unstable pages tracking Arnd Bergmann <arnd@arndb.de> - 2016-08-29 14:30 +0200
  [PATCH 2/2] staging: lustre: hide unused variable Arnd Bergmann <arnd@arndb.de> - 2016-08-29 14:30 +0200
    Re: [PATCH 2/2] staging: lustre: hide unused variable James Simmons <jsimmons@infradead.org> - 2016-09-01 04:00 +0200
  Re: [PATCH 1/2] staging: lustre: fix unstable pages tracking James Simmons <jsimmons@infradead.org> - 2016-09-01 04:00 +0200

csiph-web