[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0af23c2-bdf1-456b-a82a-0f224d640473@oracle.com>
Date: Wed, 4 Feb 2026 13:29:48 -0500
From: Chuck Lever <chuck.lever@...cle.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
NeilBrown <neil@...wn.name>, Jeff Layton <jlayton@...nel.org>,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, llvm@...ts.linux.dev
Cc: Trond Myklebust <trondmy@...nel.org>, Anna Schumaker <anna@...nel.org>,
Olga Kornievskaia <okorniev@...hat.com>, Dai Ngo <Dai.Ngo@...cle.com>,
Tom Talpey <tom@...pey.com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: Re: [PATCH v2 3/3] sunrpc: Fix compilation error (`make W=1`) when
dprintk() is no-op
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
Powered by blists - more mailing lists