From: Joe Perches <joe@perches.com>
To: Rosen Penev <rosenp@gmail.com>, netdev@vger.kernel.org
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net] net: fec_mpc52xx: Fix resource size format
Date: Tue, 19 May 2026 10:37:56 -0700 [thread overview]
Message-ID: <33318503dca54fd9401ca99213632c59d5deec12.camel@perches.com> (raw)
In-Reply-To: <20260518044047.1002235-1-rosenp@gmail.com>
On Sun, 2026-05-17 at 21:40 -0700, Rosen Penev wrote:
> resource_size() is printed after casting to unsigned long, but
> sizeof() returns size_t.
trivia and I wonder if this code path is even possible
> diff --git 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));
mpc52xx_devices.c does not exist.
It was deleted nearly 20 years ago by:
commit 917f0af9e5a9ceecf9e72537fabb501254ba321d
Author: Paul Mackerras <paulus@ozlabs.org>
Date: Mon Jun 9 14:01:46 2008 +1000
and
It's possible to remove the cast to unsigned long and use %pa
and %zx could be %#zx to match output prefixes.
next prev parent reply other threads:[~2026-05-19 17:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 4:40 Rosen Penev
2026-05-19 17:37 ` Joe Perches [this message]
2026-05-19 21:20 ` Rosen Penev
2026-05-21 0:06 ` Jakub Kicinski
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=33318503dca54fd9401ca99213632c59d5deec12.camel@perches.com \
--to=joe@perches.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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
all inboxes | Powered by JetHome®