Skip to contentSkip to conversation

drivers: base: Use __printf markup to silence compiler

PATCH New Mathieu Malaterre 1 participant 1 message Jan 23, 2019 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: base: Use __printf markup to silence compiler

Silence warnings (triggered at W=1) by adding relevant __printf attributes.

drivers/base/cpu.c:432:2: warning: function '__cpu_device_create' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]

---
 drivers/base/cpu.c | 1 +
 1 file changed, 1 insertion(+)
drivers/base/cpu.c +1 -0
index eb9443d5bae1..de74d7d93558 100644
@@ -409,6 +409,7 @@ static void device_create_release(struct device *dev)
 	kfree(dev);
 }
 
+__printf(4, 0)
 static struct device *
 __cpu_device_create(struct device *parent, void *drvdata,
 		    const struct attribute_group **groups,
Signature · 1 line
2.19.2