All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] afs: Conditionalise a new unused variable
@ 2017-01-13 14:46 David Howells
  2017-01-16 18:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2017-01-13 14:46 UTC (permalink / raw)
  To: netdev; +Cc: dhowells, linux-afs, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The bulk readpages support introduced a harmless warning:

fs/afs/file.c: In function 'afs_readpages_page_done':
fs/afs/file.c:270:20: error: unused variable 'vnode' [-Werror=unused-variable]

This adds an #ifdef to match the user of that variable.  The user of the
variable has to be conditional because it accesses a member of a struct
that is also conditional.

Fixes: 91b467e0a3f5 ("afs: Make afs_readpages() fetch data in bulk")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 fs/afs/file.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/afs/file.c b/fs/afs/file.c
index 82897a78abc7..ba7b71fba34b 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -267,7 +267,9 @@ static int afs_readpage(struct file *file, struct page *page)
  */
 static void afs_readpages_page_done(struct afs_call *call, struct afs_read *req)
 {
+#ifdef CONFIG_AFS_FSCACHE
 	struct afs_vnode *vnode = call->reply;
+#endif
 	struct page *page = req->pages[req->index];
 
 	req->pages[req->index] = NULL;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] afs: Conditionalise a new unused variable
  2017-01-13 14:46 [PATCH net-next] afs: Conditionalise a new unused variable David Howells
@ 2017-01-16 18:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-01-16 18:31 UTC (permalink / raw)
  To: dhowells; +Cc: netdev, linux-afs, linux-kernel

From: David Howells <dhowells@redhat.com>
Date: Fri, 13 Jan 2017 14:46:19 +0000

> From: Arnd Bergmann <arnd@arndb.de>
> 
> The bulk readpages support introduced a harmless warning:
> 
> fs/afs/file.c: In function 'afs_readpages_page_done':
> fs/afs/file.c:270:20: error: unused variable 'vnode' [-Werror=unused-variable]
> 
> This adds an #ifdef to match the user of that variable.  The user of the
> variable has to be conditional because it accesses a member of a struct
> that is also conditional.
> 
> Fixes: 91b467e0a3f5 ("afs: Make afs_readpages() fetch data in bulk")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: David Howells <dhowells@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-16 18:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 14:46 [PATCH net-next] afs: Conditionalise a new unused variable David Howells
2017-01-16 18:31 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.