Skip to contentSkip to conversation

Label kthread_create() with printf attribute tag.

PATCH New Rusty Russell 1 participant 2 messages Apr 20, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Label kthread_create() with printf attribute tag.

---
 include/linux/kthread.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
include/linux/kthread.h +2 -1
diff -r 9b5082037972 include/linux/kthread.h
@@ -6,7 +6,8 @@
 
 struct task_struct *kthread_create(int (*threadfn)(void *data),
 				   void *data,
-				   const char namefmt[], ...);
+				   const char namefmt[], ...)
+	__attribute__((format(printf, 3, 4)));
 
 /**
  * kthread_run - create and wake a thread.
#1 lore raw

PATCH 1/1 usb: libusual kthread_run() called with wrong format.

---
 drivers/usb/storage/libusual.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/storage/libusual.c +1 -1
diff -r bf2ff23fda93 drivers/usb/storage/libusual.c
@@ -134,7 +134,7 @@ static int usu_probe(struct usb_interfac
 	stat[type].fls |= USU_MOD_FL_THREAD;
 	spin_unlock_irqrestore(&usu_lock, flags);
 
-	task = kthread_run(usu_probe_thread, (void*)type, "libusual_%d", type);
+	task = kthread_run(usu_probe_thread, (void*)type, "libusual_%ld", type);
 	if (IS_ERR(task)) {
 		rc = PTR_ERR(task);
 		printk(KERN_WARNING "libusual: "