* [PATCH v2 1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
2026-02-04 9:41 [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
@ 2026-02-04 9:41 ` Andy Shevchenko
2026-02-04 15:53 ` Anna Schumaker
2026-02-04 9:41 ` [PATCH v2 2/3] sunrpc: Kill RPC_IFDEBUG() Andy Shevchenko
` (4 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 9:41 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, 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] 17+ messages in thread* Re: [PATCH v2 1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
2026-02-04 9:41 ` [PATCH v2 1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist() Andy Shevchenko
@ 2026-02-04 15:53 ` Anna Schumaker
2026-02-04 16:44 ` Andy Shevchenko
0 siblings, 1 reply; 17+ messages in thread
From: Anna Schumaker @ 2026-02-04 15:53 UTC (permalink / raw)
To: Andy Shevchenko, Chuck Lever, NeilBrown, Jeff Layton, linux-nfs,
linux-kernel, netdev, llvm
Cc: Trond Myklebust, Olga Kornievskaia, Dai Ngo, Tom Talpey,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Nathan Chancellor, Nick Desaulniers, Bill Wendling,
Justin Stitt
On Wed, Feb 4, 2026, at 4:41 AM, 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.
>
> Fixes: 3a6fd1f004fc ("pnfs/blocklayout: remove read-modify-write
> handling in bl_write_pagelist")
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Anna Schumaker <anna.schumkaer@oracle.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 [flat|nested] 17+ messages in thread* Re: [PATCH v2 1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
2026-02-04 15:53 ` Anna Schumaker
@ 2026-02-04 16:44 ` Andy Shevchenko
0 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 16:44 UTC (permalink / raw)
To: Anna Schumaker
Cc: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm, Trond Myklebust, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 10:53:26AM -0500, Anna Schumaker wrote:
> On Wed, Feb 4, 2026, at 4:41 AM, 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.
> >
> > Fixes: 3a6fd1f004fc ("pnfs/blocklayout: remove read-modify-write
> > handling in bl_write_pagelist")
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Acked-by: Anna Schumaker <anna.schumkaer@oracle.com>
Thank you!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 2/3] sunrpc: Kill RPC_IFDEBUG()
2026-02-04 9:41 [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
2026-02-04 9:41 ` [PATCH v2 1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist() Andy Shevchenko
@ 2026-02-04 9:41 ` Andy Shevchenko
2026-02-04 9:41 ` [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op Andy Shevchenko
` (3 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 9:41 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Andy Shevchenko
RPC_IFDEBUG() is used in only two places. In one the user of
the definition is guarded by ifdeffery, in the second one
it's implied due to dprintk() usage. Kill the macro and move
the ifdeffery to the regular condition with the variable defined
inside, while in the second case add the same conditional and
move the respective code there.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
fs/nfsd/nfsfh.c | 9 +++++---
include/linux/sunrpc/debug.h | 2 --
net/sunrpc/xprtrdma/svc_rdma_transport.c | 27 ++++++++++++------------
3 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index ed85dd43da18..68b629fbaaeb 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -105,9 +105,12 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,
{
/* Check if the request originated from a secure port. */
if (rqstp && !nfsd_originating_port_ok(rqstp, cred, exp)) {
- RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
- dprintk("nfsd: request from insecure port %s!\n",
- svc_print_addr(rqstp, buf, sizeof(buf)));
+ if (IS_ENABLED(CONFIG_SUNRPC_DEBUG)) {
+ char buf[RPC_MAX_ADDRBUFLEN];
+
+ dprintk("nfsd: request from insecure port %s!\n",
+ svc_print_addr(rqstp, buf, sizeof(buf)));
+ }
return nfserr_perm;
}
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 891f6173c951..e947d668f7b7 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -51,12 +51,10 @@ do { \
} \
} while (0)
-# define RPC_IFDEBUG(x) x
#else
# define ifdebug(fac) if (0)
# define dfprintk(fac, fmt, ...) do {} while (0)
# define dfprintk_rcu(fac, fmt, ...) do {} while (0)
-# define RPC_IFDEBUG(x)
#endif
/*
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c
index 9b623849723e..f2d72181a6fe 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_transport.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c
@@ -414,7 +414,6 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
struct ib_qp_init_attr qp_attr;
struct ib_device *dev;
int ret = 0;
- RPC_IFDEBUG(struct sockaddr *sap);
listen_rdma = container_of(xprt, struct svcxprt_rdma, sc_xprt);
clear_bit(XPT_CONN, &xprt->xpt_flags);
@@ -560,18 +559,20 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt)
goto errout;
}
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
- dprintk("svcrdma: new connection accepted on device %s:\n", dev->name);
- sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
- dprintk(" local address : %pIS:%u\n", sap, rpc_get_port(sap));
- sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr;
- dprintk(" remote address : %pIS:%u\n", sap, rpc_get_port(sap));
- dprintk(" max_sge : %d\n", newxprt->sc_max_send_sges);
- dprintk(" sq_depth : %d\n", newxprt->sc_sq_depth);
- dprintk(" rdma_rw_ctxs : %d\n", ctxts);
- dprintk(" max_requests : %d\n", newxprt->sc_max_requests);
- dprintk(" ord : %d\n", conn_param.initiator_depth);
-#endif
+ if (IS_ENABLED(CONFIG_SUNRPC_DEBUG)) {
+ struct sockaddr *sap;
+
+ dprintk("svcrdma: new connection accepted on device %s:\n", dev->name);
+ sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.src_addr;
+ dprintk(" local address : %pIS:%u\n", sap, rpc_get_port(sap));
+ sap = (struct sockaddr *)&newxprt->sc_cm_id->route.addr.dst_addr;
+ dprintk(" remote address : %pIS:%u\n", sap, rpc_get_port(sap));
+ dprintk(" max_sge : %d\n", newxprt->sc_max_send_sges);
+ dprintk(" sq_depth : %d\n", newxprt->sc_sq_depth);
+ dprintk(" rdma_rw_ctxs : %d\n", ctxts);
+ dprintk(" max_requests : %d\n", newxprt->sc_max_requests);
+ dprintk(" ord : %d\n", conn_param.initiator_depth);
+ }
return &newxprt->sc_xprt;
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
2026-02-04 9:41 [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
2026-02-04 9:41 ` [PATCH v2 1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist() Andy Shevchenko
2026-02-04 9:41 ` [PATCH v2 2/3] sunrpc: Kill RPC_IFDEBUG() Andy Shevchenko
@ 2026-02-04 9:41 ` Andy Shevchenko
2026-02-04 16:46 ` Andy Shevchenko
2026-02-04 10:02 ` [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
` (2 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 9:41 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Andy Shevchenko, Geert Uytterhoeven
Clang compiler is not happy about set but unused variables:
.../flexfilelayout/flexfilelayoutdev.c:56:9: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
.../flexfilelayout/flexfilelayout.c:1505:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
.../nfs4proc.c:9244:12: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable]
Fix these by forwarding parameters of dprintk() to no_printk().
The positive side-effect is a format-string checker enabled even for the cases
when dprintk() is no-op.
Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver")
Fixes: fc931582c260 ("nfs41: create_session operation")
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
fs/lockd/svclock.c | 5 +++++
include/linux/sunrpc/debug.h | 8 ++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 712df1e025d8..dcd3e0b4d997 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -80,6 +80,11 @@ static const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie)
return buf;
}
+#else
+static inline const char *nlmdbg_cookie2a(const struct nlm_cookie *cookie)
+{
+ return "???";
+}
#endif
/*
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index e947d668f7b7..82239d5c262e 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -40,6 +40,8 @@ extern unsigned int nlm_debug;
do { \
ifdebug(fac) \
__sunrpc_printk(fmt, ##__VA_ARGS__); \
+ else \
+ no_printk(fmt, ##__VA_ARGS__); \
} while (0)
# define dfprintk_rcu(fac, fmt, ...) \
@@ -48,13 +50,15 @@ do { \
rcu_read_lock(); \
__sunrpc_printk(fmt, ##__VA_ARGS__); \
rcu_read_unlock(); \
+ } else { \
+ no_printk(fmt, ##__VA_ARGS__); \
} \
} while (0)
#else
# define ifdebug(fac) if (0)
-# define dfprintk(fac, fmt, ...) do {} while (0)
-# define dfprintk_rcu(fac, fmt, ...) do {} while (0)
+# define dfprintk(fac, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
+# define dfprintk_rcu(fac, fmt, ...) no_printk(fmt, ##__VA_ARGS__)
#endif
/*
--
2.50.1
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
2026-02-04 9:41 ` [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op Andy Shevchenko
@ 2026-02-04 16:46 ` Andy Shevchenko
2026-02-04 16:58 ` Andy Shevchenko
0 siblings, 1 reply; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 16:46 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Geert Uytterhoeven
On Wed, Feb 04, 2026 at 10:41:23AM +0100, Andy Shevchenko wrote:
> Clang compiler is not happy about set but unused variables:
>
> .../flexfilelayout/flexfilelayoutdev.c:56:9: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
> .../flexfilelayout/flexfilelayout.c:1505:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
> .../nfs4proc.c:9244:12: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable]
>
> Fix these by forwarding parameters of dprintk() to no_printk().
> The positive side-effect is a format-string checker enabled even for the cases
> when dprintk() is no-op.
I'm afraid this is not end of story...
I received a dozen of minutes ago a new report and now I'm investigating.
Patches 1 & 2 though are ready to go.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
2026-02-04 16:46 ` Andy Shevchenko
@ 2026-02-04 16:58 ` Andy Shevchenko
2026-02-04 18:29 ` Chuck Lever
0 siblings, 1 reply; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 16:58 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Geert Uytterhoeven
On Wed, Feb 04, 2026 at 06:46:36PM +0200, Andy Shevchenko wrote:
> On Wed, Feb 04, 2026 at 10:41:23AM +0100, Andy Shevchenko wrote:
> > Clang compiler is not happy about set but unused variables:
> >
> > .../flexfilelayout/flexfilelayoutdev.c:56:9: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
> > .../flexfilelayout/flexfilelayout.c:1505:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
> > .../nfs4proc.c:9244:12: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable]
> >
> > Fix these by forwarding parameters of dprintk() to no_printk().
> > The positive side-effect is a format-string checker enabled even for the cases
> > when dprintk() is no-op.
>
> I'm afraid this is not end of story...
> I received a dozen of minutes ago a new report and now I'm investigating.
>
> Patches 1 & 2 though are ready to go.
Okay, if I'm not mistaken the only leftover is the missing tk_pid field due to
conditional inclusion. However, if we do that unconditionally the data structure
won't be expanded (there is a gap of 3 bytes. (Dunno about m68k, there may be
actually +2 bytes due to 2-byte alignment.) The rest of the conditionally included
members seem not being used in dprintk().
That said, removing ifdeffery around tk_pid in struct rpc_task should fix that
problem.
If you can fold this to the patch 3, would be nice:
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
index ccba79ebf893..0dbdf3722537 100644
--- a/include/linux/sunrpc/sched.h
+++ b/include/linux/sunrpc/sched.h
@@ -95,10 +95,7 @@ struct rpc_task {
int tk_rpc_status; /* Result of last RPC operation */
unsigned short tk_flags; /* misc flags */
unsigned short tk_timeouts; /* maj timeouts */
-
-#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
unsigned short tk_pid; /* debugging aid */
-#endif
unsigned char tk_priority : 2,/* Task priority */
tk_garb_retry : 2,
tk_cred_retry : 2;
Otherwise I can send a new version.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
2026-02-04 16:58 ` Andy Shevchenko
@ 2026-02-04 18:29 ` Chuck Lever
2026-02-04 20:25 ` Andy Shevchenko
0 siblings, 1 reply; 17+ messages in thread
From: Chuck Lever @ 2026-02-04 18:29 UTC (permalink / raw)
To: Andy Shevchenko, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Geert Uytterhoeven
On 2/4/26 11:58 AM, Andy Shevchenko wrote:
> On Wed, Feb 04, 2026 at 06:46:36PM +0200, Andy Shevchenko wrote:
>> On Wed, Feb 04, 2026 at 10:41:23AM +0100, Andy Shevchenko wrote:
>>> Clang compiler is not happy about set but unused variables:
>>>
>>> .../flexfilelayout/flexfilelayoutdev.c:56:9: error: variable 'ret' set but not used [-Werror,-Wunused-but-set-variable]
>>> .../flexfilelayout/flexfilelayout.c:1505:6: error: variable 'err' set but not used [-Werror,-Wunused-but-set-variable]
>>> .../nfs4proc.c:9244:12: error: variable 'ptr' set but not used [-Werror,-Wunused-but-set-variable]
>>>
>>> Fix these by forwarding parameters of dprintk() to no_printk().
>>> The positive side-effect is a format-string checker enabled even for the cases
>>> when dprintk() is no-op.
>>
>> I'm afraid this is not end of story...
>> I received a dozen of minutes ago a new report and now I'm investigating.
>>
>> Patches 1 & 2 though are ready to go.
>
> Okay, if I'm not mistaken the only leftover is the missing tk_pid field due to
> conditional inclusion. However, if we do that unconditionally the data structure
> won't be expanded (there is a gap of 3 bytes. (Dunno about m68k, there may be
> actually +2 bytes due to 2-byte alignment.) The rest of the conditionally included
> members seem not being used in dprintk().
>
> That said, removing ifdeffery around tk_pid in struct rpc_task should fix that
> problem.
>
> If you can fold this to the patch 3, would be nice:
>
> diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h
> index ccba79ebf893..0dbdf3722537 100644
> --- a/include/linux/sunrpc/sched.h
> +++ b/include/linux/sunrpc/sched.h
> @@ -95,10 +95,7 @@ struct rpc_task {
> int tk_rpc_status; /* Result of last RPC operation */
> unsigned short tk_flags; /* misc flags */
> unsigned short tk_timeouts; /* maj timeouts */
> -
> -#if IS_ENABLED(CONFIG_SUNRPC_DEBUG) || IS_ENABLED(CONFIG_TRACEPOINTS)
> unsigned short tk_pid; /* debugging aid */
> -#endif
> unsigned char tk_priority : 2,/* Task priority */
> tk_garb_retry : 2,
> tk_cred_retry : 2;
>
> Otherwise I can send a new version.
Please send a full series respin, thanks.
--
Chuck Lever
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
2026-02-04 18:29 ` Chuck Lever
@ 2026-02-04 20:25 ` Andy Shevchenko
0 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 20:25 UTC (permalink / raw)
To: Chuck Lever
Cc: NeilBrown, Jeff Layton, linux-nfs, linux-kernel, netdev, llvm,
Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt, Geert Uytterhoeven
On Wed, Feb 04, 2026 at 01:29:48PM -0500, Chuck Lever wrote:
> On 2/4/26 11:58 AM, Andy Shevchenko wrote:
> > On Wed, Feb 04, 2026 at 06:46:36PM +0200, Andy Shevchenko wrote:
...
> > Otherwise I can send a new version.
>
> Please send a full series respin, thanks.
v3 has been sent.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 9:41 [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
` (2 preceding siblings ...)
2026-02-04 9:41 ` [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op Andy Shevchenko
@ 2026-02-04 10:02 ` Andy Shevchenko
2026-02-04 14:28 ` Jeff Layton
2026-02-04 15:42 ` Chuck Lever
5 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 10:02 UTC (permalink / raw)
To: Chuck Lever, NeilBrown, Jeff Layton, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 10:41:20AM +0100, Andy Shevchenko wrote:
> Compiler is not happy about unused variables (especially when
> dprintk() call is defined as no-op). Here is the series to
> address the issues.
Note, I assumed that this goes via NFS tree, but if net wants to take it,
I will be glad as well!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 9:41 [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
` (3 preceding siblings ...)
2026-02-04 10:02 ` [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
@ 2026-02-04 14:28 ` Jeff Layton
2026-02-04 14:30 ` Chuck Lever
2026-02-04 14:32 ` Andy Shevchenko
2026-02-04 15:42 ` Chuck Lever
5 siblings, 2 replies; 17+ messages in thread
From: Jeff Layton @ 2026-02-04 14:28 UTC (permalink / raw)
To: Andy Shevchenko, Chuck Lever, NeilBrown, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt
On Wed, 2026-02-04 at 10:41 +0100, Andy Shevchenko wrote:
> Compiler is not happy about unused variables (especially when
> dprintk() call is defined as no-op). Here is the series to
> address the issues.
>
> Changelog v2:
> - added patch to kill RPC_IFDEBUG() macro (LKP, Geert)
> - united separate patches in the series
> - collected tags (Geert)
>
> v1: 20260204010402.2149563-1-andriy.shevchenko@linux.intel.com
> v1: 20260204010415.2149607-1-andriy.shevchenko@linux.intel.com
>
> Andy Shevchenko (3):
> nfs/blocklayout: Fix compilation error (`make W=1`) in
> bl_write_pagelist()
> sunrpc: Kill RPC_IFDEBUG()
> sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
>
> fs/lockd/svclock.c | 5 +++++
> fs/nfs/blocklayout/blocklayout.c | 4 +---
> fs/nfsd/nfsfh.c | 9 +++++---
> include/linux/sunrpc/debug.h | 10 +++++----
> net/sunrpc/xprtrdma/svc_rdma_transport.c | 27 ++++++++++++------------
> 5 files changed, 32 insertions(+), 23 deletions(-)
These all look like good changes to me. The first patch should go to
Trond/Anna and Chuck will probably pick up the other two?
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 14:28 ` Jeff Layton
@ 2026-02-04 14:30 ` Chuck Lever
2026-02-04 14:45 ` Andy Shevchenko
2026-02-04 14:32 ` Andy Shevchenko
1 sibling, 1 reply; 17+ messages in thread
From: Chuck Lever @ 2026-02-04 14:30 UTC (permalink / raw)
To: Jeff Layton, Andy Shevchenko, NeilBrown, linux-nfs, linux-kernel,
netdev, llvm
Cc: Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt
On 2/4/26 9:28 AM, Jeff Layton wrote:
> On Wed, 2026-02-04 at 10:41 +0100, Andy Shevchenko wrote:
>> Compiler is not happy about unused variables (especially when
>> dprintk() call is defined as no-op). Here is the series to
>> address the issues.
>>
>> Changelog v2:
>> - added patch to kill RPC_IFDEBUG() macro (LKP, Geert)
>> - united separate patches in the series
>> - collected tags (Geert)
>>
>> v1: 20260204010402.2149563-1-andriy.shevchenko@linux.intel.com
>> v1: 20260204010415.2149607-1-andriy.shevchenko@linux.intel.com
>>
>> Andy Shevchenko (3):
>> nfs/blocklayout: Fix compilation error (`make W=1`) in
>> bl_write_pagelist()
>> sunrpc: Kill RPC_IFDEBUG()
>> sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
>>
>> fs/lockd/svclock.c | 5 +++++
>> fs/nfs/blocklayout/blocklayout.c | 4 +---
>> fs/nfsd/nfsfh.c | 9 +++++---
>> include/linux/sunrpc/debug.h | 10 +++++----
>> net/sunrpc/xprtrdma/svc_rdma_transport.c | 27 ++++++++++++------------
>> 5 files changed, 32 insertions(+), 23 deletions(-)
>
> These all look like good changes to me. The first patch should go to
> Trond/Anna and Chuck will probably pick up the other two?
That's what I was thinking, as long as there aren't any dependencies
between 1/3 and the others.
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
--
Chuck Lever
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 14:30 ` Chuck Lever
@ 2026-02-04 14:45 ` Andy Shevchenko
0 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 14:45 UTC (permalink / raw)
To: Chuck Lever
Cc: Jeff Layton, NeilBrown, linux-nfs, linux-kernel, netdev, llvm,
Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 09:30:30AM -0500, Chuck Lever wrote:
> On 2/4/26 9:28 AM, Jeff Layton wrote:
> > On Wed, 2026-02-04 at 10:41 +0100, Andy Shevchenko wrote:
...
> >> Andy Shevchenko (3):
> >> nfs/blocklayout: Fix compilation error (`make W=1`) in
> >> bl_write_pagelist()
> >> sunrpc: Kill RPC_IFDEBUG()
> >> sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
> > These all look like good changes to me. The first patch should go to
> > Trond/Anna and Chuck will probably pick up the other two?
> That's what I was thinking, as long as there aren't any dependencies
> between 1/3 and the others.
There are no explicit compilation dependencies, but if one will wonder
in the future the third patch alone may "fix" the first issue. That's
why I prefer them going together.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 14:28 ` Jeff Layton
2026-02-04 14:30 ` Chuck Lever
@ 2026-02-04 14:32 ` Andy Shevchenko
1 sibling, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 14:32 UTC (permalink / raw)
To: Jeff Layton
Cc: Chuck Lever, NeilBrown, linux-nfs, linux-kernel, netdev, llvm,
Trond Myklebust, Anna Schumaker, Olga Kornievskaia, Dai Ngo,
Tom Talpey, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 09:28:28AM -0500, Jeff Layton wrote:
> On Wed, 2026-02-04 at 10:41 +0100, Andy Shevchenko wrote:
> > Compiler is not happy about unused variables (especially when
> > dprintk() call is defined as no-op). Here is the series to
> > address the issues.
> >
> > Changelog v2:
> > - added patch to kill RPC_IFDEBUG() macro (LKP, Geert)
> > - united separate patches in the series
> > - collected tags (Geert)
> >
> > v1: 20260204010402.2149563-1-andriy.shevchenko@linux.intel.com
> > v1: 20260204010415.2149607-1-andriy.shevchenko@linux.intel.com
> >
> > Andy Shevchenko (3):
> > nfs/blocklayout: Fix compilation error (`make W=1`) in
> > bl_write_pagelist()
> > sunrpc: Kill RPC_IFDEBUG()
> > sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
> >
> > fs/lockd/svclock.c | 5 +++++
> > fs/nfs/blocklayout/blocklayout.c | 4 +---
> > fs/nfsd/nfsfh.c | 9 +++++---
> > include/linux/sunrpc/debug.h | 10 +++++----
> > net/sunrpc/xprtrdma/svc_rdma_transport.c | 27 ++++++++++++------------
> > 5 files changed, 32 insertions(+), 23 deletions(-)
>
> These all look like good changes to me. The first patch should go to
> Trond/Anna and Chuck will probably pick up the other two?
As I explained in v1, the error in the first patch may be shadowed if the third
one (and hence second) is taken first. That's why I prefer them to go via
single place.
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
Thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 9:41 [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues Andy Shevchenko
` (4 preceding siblings ...)
2026-02-04 14:28 ` Jeff Layton
@ 2026-02-04 15:42 ` Chuck Lever
2026-02-04 15:51 ` Andy Shevchenko
5 siblings, 1 reply; 17+ messages in thread
From: Chuck Lever @ 2026-02-04 15:42 UTC (permalink / raw)
To: NeilBrown, Jeff Layton, linux-nfs, linux-kernel, netdev, llvm,
Andy Shevchenko
Cc: Chuck Lever, Trond Myklebust, Anna Schumaker, Olga Kornievskaia,
Dai Ngo, Tom Talpey, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt
From: Chuck Lever <chuck.lever@oracle.com>
On Wed, 04 Feb 2026 10:41:20 +0100, Andy Shevchenko wrote:
> Compiler is not happy about unused variables (especially when
> dprintk() call is defined as no-op). Here is the series to
> address the issues.
>
> Changelog v2:
> - added patch to kill RPC_IFDEBUG() macro (LKP, Geert)
> - united separate patches in the series
> - collected tags (Geert)
>
> [...]
Applied to nfsd-testing, thanks!
Acks from the NFS client maintainers on 1/3 are welcome.
[1/3] nfs/blocklayout: Fix compilation error (`make W=1`) in bl_write_pagelist()
commit: b2e8b11ff47d3ba5075844ac4fb806296b3c4859
[2/3] sunrpc: Kill RPC_IFDEBUG()
commit: 85acbbcb4127f635c062cb52e5dbc62b0635b3f8
[3/3] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
commit: 380f84a3c8fc3809b614a6765c2fb0acc3e8674b
--
Chuck Lever
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH v2 0/3] sunrpc: Fix `make W=1` build issues
2026-02-04 15:42 ` Chuck Lever
@ 2026-02-04 15:51 ` Andy Shevchenko
0 siblings, 0 replies; 17+ messages in thread
From: Andy Shevchenko @ 2026-02-04 15:51 UTC (permalink / raw)
To: Chuck Lever
Cc: NeilBrown, Jeff Layton, linux-nfs, linux-kernel, netdev, llvm,
Chuck Lever, Trond Myklebust, Anna Schumaker, Olga Kornievskaia,
Dai Ngo, Tom Talpey, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt
On Wed, Feb 04, 2026 at 10:42:06AM -0500, Chuck Lever wrote:
> On Wed, 04 Feb 2026 10:41:20 +0100, Andy Shevchenko wrote:
[...]
> Applied to nfsd-testing, thanks!
>
> Acks from the NFS client maintainers on 1/3 are welcome.
Thank you!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 17+ messages in thread