public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: David Howells <dhowells@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Eric Van Hensbergen <ericvh@gmail.com>,
	Latchesar Ionkov <lucho@ionkov.net>,
	Jeff Layton <jlayton@kernel.org>,
	v9fs-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p: fix unused-variable warning
Date: Sat, 18 Dec 2021 20:05:16 +0900	[thread overview]
Message-ID: <Yb3AbFhc9ApdHpcA@codewreck.org> (raw)
In-Reply-To: <YaqwdNGlZDBDcg5R@codewreck.org>

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@arndb.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@arndb.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

  parent reply	other threads:[~2021-12-18 11:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 18:58 [PATCH] 9p: fix unused-variable warning Arnd Bergmann
     [not found] ` <YaqwdNGlZDBDcg5R@codewreck.org>
2021-12-18 11:05   ` Dominique Martinet [this message]
2021-12-18 13:51     ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yb3AbFhc9ApdHpcA@codewreck.org \
    --to=asmadeus@codewreck.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=dhowells@redhat.com \
    --cc=ericvh@gmail.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucho@ionkov.net \
    --cc=v9fs-developer@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox