From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761332AbcIAB7Z (ORCPT ); Wed, 31 Aug 2016 21:59:25 -0400 Received: from casper.infradead.org ([85.118.1.10]:54064 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754703AbcIAB7X (ORCPT ); Wed, 31 Aug 2016 21:59:23 -0400 Date: Thu, 1 Sep 2016 02:59:21 +0100 (BST) From: James Simmons To: Arnd Bergmann cc: Oleg Drokin , Andreas Dilger , Mel Gorman , Greg Kroah-Hartman , "John L. Hammond" , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] staging: lustre: hide unused variable In-Reply-To: <20160829122023.3018966-2-arnd@arndb.de> Message-ID: References: <20160829122023.3018966-1-arnd@arndb.de> <20160829122023.3018966-2-arnd@arndb.de> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160901_025921_955341_310BCF26 X-CRM114-Status: GOOD ( 11.24 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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 > Fixes: 1e1f9ff406fd ("staging: lustre: llite: break ll_getxattr_common into 2 functions") Reviewed-by: James Simmons > --- > 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 > >