* [PATCH v1 1/1] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
@ 2026-02-04 1:04 Andy Shevchenko
2026-02-04 1:07 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-02-04 1:04 UTC (permalink / raw)
To: linux-nfs, linux-kernel, llvm
Cc: Trond Myklebust, Anna Schumaker, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt, Andy Shevchenko
Clang compiler is not happy about set but unused variable
(when dprintk() is no-op):
.../blocklayout/blocklayout.c:384:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
Remove a leftover from the previous cleanup.
Fixes: 3a6fd1f004fc ("pnfs/blocklayout: remove read-modify-write handling in bl_write_pagelist")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
fs/nfs/blocklayout/blocklayout.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 0e4c67373e4f..83e4a32b3018 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -381,14 +381,13 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync)
sector_t isect, extent_length = 0;
struct parallel_io *par = NULL;
loff_t offset = header->args.offset;
- size_t count = header->args.count;
struct page **pages = header->args.pages;
int pg_index = header->args.pgbase >> PAGE_SHIFT;
unsigned int pg_len;
struct blk_plug plug;
int i;
- dprintk("%s enter, %zu@%lld\n", __func__, count, offset);
+ dprintk("%s enter, %u@%lld\n", __func__, header->args.count, offset);
/* At this point, header->page_aray is a (sequential) list of nfs_pages.
* We want to write each, and if there is an error set pnfs_error
@@ -429,7 +428,6 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync)
}
offset += pg_len;
- count -= pg_len;
isect += (pg_len >> SECTOR_SHIFT);
extent_length -= (pg_len >> SECTOR_SHIFT);
}
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
2026-02-04 1:04 [PATCH v1 1/1] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist() Andy Shevchenko
@ 2026-02-04 1:07 ` Andy Shevchenko
2026-02-04 9:41 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-02-04 1:07 UTC (permalink / raw)
To: linux-nfs, linux-kernel, llvm
Cc: Trond Myklebust, Anna Schumaker, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 02:04:02AM +0100, Andy Shevchenko wrote:
> Clang compiler is not happy about set but unused variable
> (when dprintk() is no-op):
>
> .../blocklayout/blocklayout.c:384:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
>
> Remove a leftover from the previous cleanup.
Note, if https://lore.kernel.org/r/20260204010415.2149607-1-andriy.shevchenko@linux.intel.com
is applied first, it will shadow the error here, this patch is needed anyway.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1 1/1] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
2026-02-04 1:07 ` Andy Shevchenko
@ 2026-02-04 9:41 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-02-04 9:41 UTC (permalink / raw)
To: linux-nfs, linux-kernel, llvm
Cc: Trond Myklebust, Anna Schumaker, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 03:07:05AM +0200, Andy Shevchenko wrote:
> On Wed, Feb 04, 2026 at 02:04:02AM +0100, Andy Shevchenko wrote:
> > Clang compiler is not happy about set but unused variable
> > (when dprintk() is no-op):
> >
> > .../blocklayout/blocklayout.c:384:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable]
> >
> > Remove a leftover from the previous cleanup.
>
> Note, if https://lore.kernel.org/r/20260204010415.2149607-1-andriy.shevchenko@linux.intel.com
> is applied first, it will shadow the error here, this patch is needed anyway.
Nevermind, I will send a v2 where it will be part of the series.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-04 9:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 1:04 [PATCH v1 1/1] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist() Andy Shevchenko
2026-02-04 1:07 ` Andy Shevchenko
2026-02-04 9:41 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox