Subject: Re: [PATCH] net: use %ld format specifier for PTR_ERR in pr_warn

From: Nathan Chancellor <[email-masked]>
Date: Sat, 12 Apr 2025 21:07:01 -0500

On Sat, Apr 12, 2025 at 04:28:38PM -0700, Kuniyuki Iwashima wrote:
> From: Qasim Ijaz <[email-masked]>
> 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.

Sure but the compiler does not know that and will warn about the
format specifier and type mismatch:

https://lore.kernel.org/[email-masked]/

I think my comment about switching to '%pe' on basically the same patch
in lib/ref_tracker.c is relevant here too:

https://lore.kernel.org/20250413013245.GA2989337@ax162/

Cheers,
Nathan