From: Qasim Ijaz <qasdev00@gmail.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: jlayton@kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, nathan@kernel.org
Subject: Re: [PATCH] net: use %ld format specifier for PTR_ERR in pr_warn
Date: Sun, 13 Apr 2025 11:56:10 +0100 [thread overview]
Message-ID: <Z_uYSmMDHE_vpFcQ@qasdev.system> (raw)
In-Reply-To: <20250412232839.66642-1-kuniyu@amazon.com>
On Sat, Apr 12, 2025 at 04:28:38PM -0700, Kuniyuki Iwashima wrote:
> From: Qasim Ijaz <qasdev00@gmail.com>
> Date: Sat, 12 Apr 2025 23:55:28 +0100
> > PTR_ERR yields type long, so use %ld format specifier in pr_warn.
>
> errno fits in the range of int, so no need to use %ld.
>
>
> >
> > Fixes: 193510c95215 ("net: add debugfs files for showing netns refcount tracking info")
>
> The series is not yet applied. It's not necessary this time, but
> in such a case, please reply to the original patch thread.
>
> Also, please make sure your patch can be applied cleanly on the latest
> remote net-next.git and the Fixes tag points to an existing commit.
>
Hi Kuniyuki
Thank you for your comments, as Nathan said the current code emits a
compiler warning as per the kernel test robot.
Given this would you like me to resend patch v2 with the changes you and
Nathan specified?
Regards,
Qasim
>
> > Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
> > ---
> > net/core/net_namespace.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
> > index f47b9f10af24..a419a3aa57a6 100644
> > --- a/net/core/net_namespace.c
> > +++ b/net/core/net_namespace.c
> > @@ -1652,7 +1652,7 @@ static int __init ns_debug_init(void)
> > if (ref_tracker_debug_dir) {
> > ns_ref_tracker_dir = debugfs_create_dir("net_ns", ref_tracker_debug_dir);
> > if (IS_ERR(ns_ref_tracker_dir)) {
> > - pr_warn("net: unable to create ref_tracker/net_ns directory: %d\n",
> > + pr_warn("net: unable to create ref_tracker/net_ns directory: %ld\n",
> > PTR_ERR(ns_ref_tracker_dir));
> > goto out;
> > }
> > --
> > 2.39.5
next prev parent reply other threads:[~2025-04-13 10:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-12 22:55 [PATCH] net: use %ld format specifier for PTR_ERR in pr_warn Qasim Ijaz
2025-04-12 23:28 ` Kuniyuki Iwashima
2025-04-13 2:07 ` Nathan Chancellor
2025-04-13 10:56 ` Qasim Ijaz [this message]
2025-04-13 10:59 ` 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=Z_uYSmMDHE_vpFcQ@qasdev.system \
--to=qasdev00@gmail.com \
--cc=jlayton@kernel.org \
--cc=kuniyu@amazon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.