From: Nathan Chancellor <nathan@kernel.org>
To: Manuel Ebner <manuelebnerli@mailbox.org>
Cc: Alexander Usyskin <alexander.usyskin@intel.com>,
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
Subject: Re: [PATCH] issei: Fix size_t printk specifier in heci_{write,read}_buf()
Date: Tue, 28 Jul 2026 14:46:03 -0700 [thread overview]
Message-ID: <20260728214603.GA3198102@ax162> (raw)
In-Reply-To: <ace2ea1f73be097de9b69a8dd1eafddbbb8b7036.camel@mailbox.org>
On Tue, Jul 28, 2026 at 02:43:37PM +0200, Manuel Ebner wrote:
> On Tue, 2026-07-21 at 14:32 -0700, Nathan Chancellor wrote:
> > 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
>
> I had the same errors and eight notes:
>
> 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",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’
> 110 | _p_func(dev, fmt, ##__VA_ARGS__); \
> | ^~~
> ./include/linux/dev_printk.h:154:56: note: in expansion of macro ‘dev_fmt’
> 154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/misc/issei/hw_heci.c:374:17: note: in expansion of macro ‘dev_err’
> 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",
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./include/linux/dev_printk.h:110:30: note: in definition of macro ‘dev_printk_index_wrap’
> 110 | _p_func(dev, fmt, ##__VA_ARGS__); \
> | ^~~
> ./include/linux/dev_printk.h:154:56: note: in expansion of macro ‘dev_fmt’
> 154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
> | ^~~~~~~
> drivers/misc/issei/hw_heci.c:404:17: note: in expansion of macro ‘dev_err’
> 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
>
> Can the notes be improved? If so please advice.
I manually trimmed the notes in the commit message because I think they
are mostly noise, hence the '...'.
Thanks for the review!
--
Cheers,
Nathan
prev parent reply other threads:[~2026-07-28 21:46 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
2026-07-28 12:43 ` Manuel Ebner
2026-07-28 21:46 ` Nathan Chancellor [this message]
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=20260728214603.GA3198102@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 \
--cc=manuelebnerli@mailbox.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
Powered by JetHome