]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
lib/alloc_tag: use %pe format specifier
authorZeng Chi <zengchi@kylinos.cn>
Wed, 5 Nov 2025 02:39:25 +0000 (10:39 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 20 Nov 2025 21:43:57 +0000 (13:43 -0800)
commit135e541ae8f3f166453177f1a94a0ff1f86ce30f
treecbd70f7d6b3cd89a77ea27ea53a814a1b9a65feb
parent340b59816bc417c306cd76b867914cfb4f386d2d
lib/alloc_tag: use %pe format specifier

The %pe format specifier is designed to print error pointers.  It prints a
symbolic error name (eg.  -EINVAL) and it makes the code simpler by
omitting PTR_ERR();

This patch fixes this cocci report:
lib/alloc_tag.c:776:63-70: WARNING: Consider using %pe to print PTR_ERR()

Link: https://lkml.kernel.org/r/20251105023925.1447482-1-zeng_chi911@163.com
Signed-off-by: Zeng Chi <zengchi@kylinos.cn>
Acked-by: SeongJae Park <sj@kernel.org>
Acked-by: Suren Baghdasaryan <surenb@google.com>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/alloc_tag.c