public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] printf: add __printf attribute
@ 2025-12-06 13:19 Tamir Duberstein
  2025-12-06 16:11 ` Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Tamir Duberstein @ 2025-12-06 13:19 UTC (permalink / raw)
  To: Petr Mladek, Steven Rostedt, Andy Shevchenko, Rasmus Villemoes,
	Sergey Senozhatsky
  Cc: Kees Cook, linux-kernel, oe-kbuild-all, Tamir Duberstein,
	kernel test robot

From: Tamir Duberstein <tamird@gmail.com>

This produces better diagnostics when incorrect inputs are passed.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512061600.89CKQ3ag-lkp@intel.com/
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 lib/tests/printf_kunit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tests/printf_kunit.c b/lib/tests/printf_kunit.c
index 7617e5b8b02c..13e2e9afae3b 100644
--- a/lib/tests/printf_kunit.c
+++ b/lib/tests/printf_kunit.c
@@ -266,7 +266,7 @@ hash_pointer(struct kunit *kunittest)
 	KUNIT_EXPECT_MEMNEQ(kunittest, buf, PTR_STR, PTR_WIDTH);
 }
 
-static void
+static void __printf(2, 3)
 test_hashed(struct kunit *kunittest, const char *fmt, const void *p)
 {
 	char buf[PLAIN_BUF_SIZE];

---
base-commit: 559e608c46553c107dbba19dae0854af7b219400
change-id: 20251206-printf-kunit-printf-attr-19369fc57bf0

Best regards,
--  
Tamir Duberstein <tamird@gmail.com>


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2026-01-16 16:27 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-06 13:19 [PATCH] printf: add __printf attribute Tamir Duberstein
2025-12-06 16:11 ` Andy Shevchenko
2025-12-06 17:13   ` Tamir Duberstein
2025-12-06 17:49     ` Andy Shevchenko
2025-12-06 17:52       ` Tamir Duberstein
2025-12-06 19:43         ` Andy Shevchenko
2025-12-06 19:57           ` Tamir Duberstein
2025-12-06 21:45             ` Andy Shevchenko
2025-12-08  1:32               ` Tamir Duberstein
2025-12-08 13:30                 ` Andy Shevchenko
2025-12-08 14:05                   ` Petr Mladek
2025-12-08 21:07                     ` Tamir Duberstein
2025-12-16 10:13                       ` Petr Mladek
2026-01-15 14:53                         ` Tamir Duberstein
2026-01-16  9:31                           ` Petr Mladek
2026-01-16 16:26                             ` Tamir Duberstein
2025-12-07  1:16 ` kernel test robot
2025-12-07  2:21 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox