Thread (2 messages) 2 messages, 2 authors, 2020-12-23

[PATCH] Input: add printf attribute to log function

STALE2111d

From: trix@redhat.com
Date: 2020-12-21 16:03:03
Also in: lkml
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

From: Tom Rix <trix@redhat.com>

Attributing the function allows the compiler to more thoroughly
check the use of the function with -Wformat and similar flags.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/input/rmi4/rmi_bus.h | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/input/rmi4/rmi_bus.h b/drivers/input/rmi4/rmi_bus.h
index 25df6320f9f1..62a93d7d98f8 100644
--- a/drivers/input/rmi4/rmi_bus.h
+++ b/drivers/input/rmi4/rmi_bus.h
@@ -195,5 +195,6 @@ int rmi_of_property_read_u32(struct device *dev, u32 *result,
 #define RMI_DEBUG_FN			BIT(2)
 #define RMI_DEBUG_2D_SENSOR		BIT(3)
 
+__printf(3, 4)
 void rmi_dbg(int flags, struct device *dev, const char *fmt, ...);
 #endif
-- 
2.27.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help