From: Jakub Kicinski <kuba@kernel.org>
To: Rosen Penev <rosenp@gmail.com>
Cc: netdev@vger.kernel.org, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH net] net: fec_mpc52xx: Fix resource size format
Date: Wed, 20 May 2026 17:06:07 -0700 [thread overview]
Message-ID: <20260520170607.27cdf572@kernel.org> (raw)
In-Reply-To: <20260518044047.1002235-1-rosenp@gmail.com>
On Sun, 17 May 2026 21:40:47 -0700 Rosen Penev wrote:
> resource_size() is printed after casting to unsigned long,
This portion is confusing and irrelevant, you're touching the second
arg.
> but sizeof() returns size_t.
>
> Use %zx for the sizeof() value so the format string matches the
> argument type so that 64-bit builds compile.
Not on 64-bit x86 builds apparently. Please provide more details
on which platform and compiler you see a warning and the warning.
> Assisted-by: Codex:GPT-5.5
> Fixes: 31b7720c8259 ("fec: Convert printks to netdev_<level>")
Not a fix.
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/net/ethernet/freescale/fec_mpc52xx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_mpc52xx.c b/drivers/net/ethernet/freescale/fec_mpc52xx.c
> index 556f646073af..a770e7edb1dc 100644
> --- a/drivers/net/ethernet/freescale/fec_mpc52xx.c
> +++ b/drivers/net/ethernet/freescale/fec_mpc52xx.c
> @@ -834,7 +834,7 @@ static int mpc52xx_fec_probe(struct platform_device *op)
> goto err_netdev;
> }
> if (resource_size(&mem) < sizeof(struct mpc52xx_fec)) {
> - pr_err("invalid resource size (%lx < %x), check mpc52xx_devices.c\n",
> + pr_err("invalid resource size (%lx < %zx), check mpc52xx_devices.c\n",
> (unsigned long)resource_size(&mem),
> sizeof(struct mpc52xx_fec));
> rv = -EINVAL;
next prev parent reply other threads:[~2026-05-21 0:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 4:40 [PATCH net] net: fec_mpc52xx: Fix resource size format Rosen Penev
2026-05-19 17:37 ` Joe Perches
2026-05-19 21:20 ` Rosen Penev
2026-05-21 0:06 ` Jakub Kicinski [this message]
2026-05-21 0:42 ` Rosen Penev
2026-05-21 1:56 ` Jakub Kicinski
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=20260520170607.27cdf572@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rosenp@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