Re: drivers/phy/ti/phy-omap-usb2.c:442:4-11: WARNING: Consider using %pe to print PTR_ERR() (fwd)
From: Johan Hovold
Date: Wed Oct 29 2025 - 05:48:13 EST
On Tue, Oct 28, 2025 at 05:02:40PM +0100, Julia Lawall wrote:
> ---------- Forwarded message ----------
> Date: Tue, 28 Oct 2025 22:32:58 +0800
> From: kernel test robot <lkp@xxxxxxxxx>
> To: oe-kbuild@xxxxxxxxxxxxxxx
> Cc: lkp@xxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxxx>
> Subject: drivers/phy/ti/phy-omap-usb2.c:442:4-11: WARNING: Consider using %pe to
> print PTR_ERR()
>
> BCC: lkp@xxxxxxxxx
> CC: oe-kbuild-all@xxxxxxxxxxxxxxx
> CC: linux-kernel@xxxxxxxxxxxxxxx
> TO: Johan Hovold <johan@xxxxxxxxxx>
> CC: Vinod Koul <vkoul@xxxxxxxxxx>
> CC: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
>
> Hi Johan,
>
> First bad commit (maybe != root cause):
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: fd57572253bc356330dbe5b233c2e1d8426c66fd
> commit: 8209b3f79703b8ff09f84a79c46ead0df7260d9f phy: ti: omap-usb2: enable compile testing
> date: 3 months ago
> :::::: branch date: 21 hours ago
> :::::: commit date: 3 months ago
> config: sparc64-randconfig-r064-20251028 (https://download.01.org/0day-ci/archive/20251028/202510282255.6lFijMzE-lkp@xxxxxxxxx/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Reported-by: Julia Lawall <julia.lawall@xxxxxxxx>
> | Closes: https://lore.kernel.org/r/202510282255.6lFijMzE-lkp@xxxxxxxxx/
>
> cocci warnings: (new ones prefixed by >>)
> >> drivers/phy/ti/phy-omap-usb2.c:442:4-11: WARNING: Consider using %pe to print PTR_ERR()
Why is this framed as a warning? It's at best a suggestion for a style
change that not everyone agrees with (me included). A driver may want to
use numeric errnos for consistency, and there certainly nothing
"redundant" in calling PTR_ERR() as the cocci script claims.
https://lore.kernel.org/all/1758192227-701925-2-git-send-email-tariqt@xxxxxxxxxx/
Please consider dropping this from the tree or at least from what the
build bots run to avoid the unnecessary noise and churn this causes.
Johan