Linux-NFS Archive mirror
 help / color / mirror / Atom feed
From: Sean Chang <seanwascoding@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	David Laight <david.laight.linux@gmail.com>,
	 Anna Schumaker <anna@kernel.org>,
	Andy Shevchenko <andriy.shevchenko@intel.com>,
	netdev@vger.kernel.org,  linux-nfs@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 5/5] Revert "nfsd: Mark variable __maybe_unused to avoid W=1 build break"
Date: Thu, 26 Mar 2026 00:39:37 +0800	[thread overview]
Message-ID: <CAAb=EJU856-J9tTZCKeUS8toMPEZd5gRckmkYCLDTdZX-9DtbQ@mail.gmail.com> (raw)
In-Reply-To: <1319acf7-36fb-4be6-9921-b0d19a2aac7b@oracle.com>

On Sun, Mar 22, 2026 at 12:38 AM Chuck Lever <chuck.lever@oracle.com> wrote:
>
> On 3/21/26 10:15 AM, Sean Chang wrote:
> > This reverts commit ebae102897e760e9e6bc625f701dd666b2163bd1.
> >
> > The __maybe_unused attributes are no longer needed because dprintk()
> > now uses no_printk(), which ensures variables are referenced by the
> > compiler even when debugging is disabled.
>
> Some commit message improvements are needed:
>
> This revert is safe only because ("sunrpc: Fix dprintk type mismatch
> using do-while(0)") already changed the non-debug dfprintk path to use
> no_printk(__VA_ARGS__). The commit message doesn't reference that
> enabling commit by SHA or subject. If this revert is cherry-picked or
> backported without that pre-requisite, the W=1 build warning returns
> silently.
>
> The commit message says "dprintk() now uses no_printk()", but this is
> true only for the !CONFIG_SUNRPC_DEBUG path. When CONFIG_SUNRPC_DEBUG is
> enabled, dfprintk expands inode directly via __sunrpc_printk, not
> through no_printk.
>

Hi Chunk,

Thanks for pointing out these issues. I will update the commit message
to be more precise and clearly state the dependencies.

The corrected version will be:
The __maybe_unused attributes are no longer needed for the
!CONFIG_SUNRPC_DEBUG case. This revert depends on a prerequisite
change in this series: "sunrpc: Fix dprintk type mismatch using do-while(0)"

That change updated the non-debug dfprintk path to use no_printk(),
which ensures that arguments are always referenced by the compiler
for type checking, even when debugging is disabled.

  reply	other threads:[~2026-03-25 16:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21 14:15 [PATCH v5 0/5] sunrpc/nfs: cleanup redundant debug checks and refactor macros Sean Chang
2026-03-21 14:15 ` [PATCH v5 1/5] sunrpc: Fix dprintk type mismatch using do-while(0) Sean Chang
2026-03-21 16:37   ` Chuck Lever
2026-03-25 15:49     ` Sean Chang
2026-03-21 14:15 ` [PATCH v5 2/5] nfsd/lockd: Remove redundant debug checks Sean Chang
2026-03-21 14:15 ` [PATCH v5 3/5] svcrdma: Remove redundant IS_ENABLED(CONFIG_SUNRPC_DEBUG) guards Sean Chang
2026-03-21 14:15 ` [PATCH v5 4/5] nfs: Refactor nfs_errorf macros and remove unused ones Sean Chang
2026-03-21 16:38   ` Chuck Lever
2026-03-25 16:11     ` Sean Chang
2026-03-21 14:15 ` [PATCH v5 5/5] Revert "nfsd: Mark variable __maybe_unused to avoid W=1 build break" Sean Chang
2026-03-21 16:38   ` Chuck Lever
2026-03-25 16:39     ` Sean Chang [this message]
2026-03-23 13:25 ` [PATCH v5 0/5] sunrpc/nfs: cleanup redundant debug checks and refactor macros Jeff Layton

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='CAAb=EJU856-J9tTZCKeUS8toMPEZd5gRckmkYCLDTdZX-9DtbQ@mail.gmail.com' \
    --to=seanwascoding@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=andriy.shevchenko@intel.com \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=david.laight.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=netdev@vger.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).