[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aYKcNds-XsVLRjcC@smile.fi.intel.com>
Date: Wed, 4 Feb 2026 03:09:09 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Chuck Lever <chuck.lever@...cle.com>, NeilBrown <neil@...wn.name>,
Jeff Layton <jlayton@...nel.org>, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Cc: Olga Kornievskaia <okorniev@...hat.com>, Dai Ngo <Dai.Ngo@...cle.com>,
Tom Talpey <tom@...pey.com>, Trond Myklebust <trondmy@...nel.org>,
Anna Schumaker <anna@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v1 1/1] sunrpc: Fix compilation error (`make W=1`) when
dprintk() is no-op
On Wed, Feb 04, 2026 at 02:04:15AM +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.
Note, the alternative fix is to add __maybe_unused all over the place.
With pros and cons I consider my approach better.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists