From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>,
Jeff Layton <jlayton@kernel.org>,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Cc: Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>
Subject: Re: [PATCH v1 1/1] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op
Date: Wed, 4 Feb 2026 03:09:09 +0200 [thread overview]
Message-ID: <aYKcNds-XsVLRjcC@smile.fi.intel.com> (raw)
In-Reply-To: <20260204010415.2149607-1-andriy.shevchenko@linux.intel.com>
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
next prev parent reply other threads:[~2026-02-04 1:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 1:04 [PATCH v1 1/1] sunrpc: Fix compilation error (`make W=1`) when dprintk() is no-op Andy Shevchenko
2026-02-04 1:09 ` Andy Shevchenko [this message]
2026-02-04 7:53 ` Geert Uytterhoeven
2026-02-04 9:06 ` Andy Shevchenko
2026-02-04 9:47 ` Andy Shevchenko
2026-02-04 6:48 ` kernel test robot
2026-02-04 6:59 ` kernel test robot
2026-02-04 7:12 ` kernel test robot
2026-02-04 7:48 ` kernel test robot
2026-02-04 10:26 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYKcNds-XsVLRjcC@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=neil@brown.name \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox