lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yb3AbFhc9ApdHpcA@codewreck.org>
Date:   Sat, 18 Dec 2021 20:05:16 +0900
From:   Dominique Martinet <asmadeus@...ewreck.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     David Howells <dhowells@...hat.com>, Arnd Bergmann <arnd@...db.de>,
        Eric Van Hensbergen <ericvh@...il.com>,
        Latchesar Ionkov <lucho@...kov.net>,
        Jeff Layton <jlayton@...nel.org>,
        v9fs-developer@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] 9p: fix unused-variable warning

Dominique Martinet wrote on Sat, Dec 04, 2021 at 09:04:04AM +0900:
> Arnd Bergmann wrote on Fri, Dec 03, 2021 at 07:58:06PM +0100:
> > From: Arnd Bergmann <arnd@...db.de>
> > 
> > The folio changes added a variable that is sometimes unused:
> > 
> > fs/9p/vfs_addr.c: In function 'v9fs_release_page':
> > fs/9p/vfs_addr.c:140:23: error: unused variable 'inode' [-Werror=unused-variable]
> >   140 |         struct inode *inode = folio_inode(folio);
> >       |                       ^~~~~
> > 
> > Make this clearer to the compiler by replacing the #ifdef
> > with an equivalent if(IS_ENABLED()) check.
> > 
> > Fixes: 78525c74d9e7 ("netfs, 9p, afs, ceph: Use folios")
> > Signed-off-by: Arnd Bergmann <arnd@...db.de>
> 
> Looks good to me, picking it up

Sorry it took me a while to actually do the picking up part, but this
appears to have been a patch for linux-next back then and I didn't
notice because the Fixes tag is incorrect (78525c74d9e7 didn't introduce
the inode variable, it actually fixes a patch that never has been merged)

David since then fixed the warning differently in v2 of the patch (he
moved the fscache_note_page_release() out of the ifdef), so I won't do
anything with this even if in principle I tend to agree that
if(IS_ENABLED()) lead to better compiler coverage

Thanks though!
-- 
Dominique

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ