From: Nathan Chancellor <nathan@kernel.org>
To: "Usyskin, Alexander" <alexander.usyskin@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Karol Wachowski <karol.wachowski@linux.intel.com>,
Vitaly Lubart <lubvital@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] issei: Fix size_t printk specifier in heci_{write,read}_buf()
Date: Wed, 22 Jul 2026 11:53:08 -0700 [thread overview]
Message-ID: <20260722185308.GA3860842@ax162> (raw)
In-Reply-To: <CY5PR11MB6366CE0E06F7E42E55C11F8DEDC12@CY5PR11MB6366.namprd11.prod.outlook.com>
On Wed, Jul 22, 2026 at 05:57:53AM +0000, Usyskin, Alexander wrote:
> > Subject: [PATCH] issei: Fix size_t printk specifier in heci_{write,read}_buf()
> >
> > When building for 32-bit platforms, for which 'size_t' is
> > 'unsigned int', there are a couple of warnings around incorrect printk
> > specifiers:
> >
> > In file included from drivers/misc/issei/hw_heci.c:7:
> > drivers/misc/issei/hw_heci.c: In function 'heci_write_hbuf':
> > drivers/misc/issei/hw_heci.c:374:37: error: format '%lu' expects argument of
> > type 'long unsigned int', but argument 4 has type 'unsigned int' [-
> > Werror=format=]
> > 374 | dev_err(&idev->dev, "Data size %zu not aligned to slot size
> > %lu\n",
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ...
> > drivers/misc/issei/hw_heci.c:374:79: note: format string is defined here
> > 374 | dev_err(&idev->dev, "Data size %zu not aligned to slot size
> > %lu\n",
> > | ~~^
> > | |
> > | long unsigned int
> > | %u
> > drivers/misc/issei/hw_heci.c: In function 'heci_read_hbuf':
> > drivers/misc/issei/hw_heci.c:404:37: error: format '%lu' expects argument of
> > type 'long unsigned int', but argument 4 has type 'unsigned int' [-
> > Werror=format=]
> > 404 | dev_err(&idev->dev, "Data size %zu not aligned to slot size
> > %lu\n",
> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > ...
> > drivers/misc/issei/hw_heci.c:404:79: note: format string is defined here
> > 404 | dev_err(&idev->dev, "Data size %zu not aligned to slot size
> > %lu\n",
> > | ~~^
> > | |
> > | long unsigned int
> > | %u
> > cc1: all warnings being treated as errors
> >
> > Use '%zu' for printing these values, the proper printk specifier for
> > 'size_t'.
> >
>
> Thanks for a fix!
> Interesting, which checker should catch such errors?
I saw this with both Clang and GCC when building ARCH=i386 allmodconfig.
> Acked-by: Alexander Usyskin <alexander.usyskin@intel.com>
Thanks for the quick response!
--
Cheers,
Nathan
next prev parent reply other threads:[~2026-07-22 18:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 21:32 Nathan Chancellor
2026-07-22 5:57 ` Usyskin, Alexander
2026-07-22 18:53 ` Nathan Chancellor [this message]
2026-07-28 12:43 ` Manuel Ebner
2026-07-28 21:46 ` Nathan Chancellor
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=20260722185308.GA3860842@ax162 \
--to=nathan@kernel.org \
--cc=alexander.usyskin@intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=karol.wachowski@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lubvital@gmail.com \
/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
Powered by JetHome