Skip to contentSkip to conversation

Staging: unisys: visorbus: Fix coding style warning from checkpatch.pl.

PATCH In review Quytelda Kahja 3 participants 3 messages Jun 28, 2017 – Jun 29, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: unisys: visorbus: Fix coding style warning from checkpatch.pl.

Replace the literal function name "visorbus_create_instance" with the format specifier "%s" so it can be dynamically filled by the __func__ macro.

---
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/unisys/visorbus/visorbus_main.c +1 -1
index 1c785dd19ddd..1c6dc3a3e64a 100644
@@ -1030,7 +1030,7 @@ visorbus_create_instance(struct visor_device *dev)
 err_debugfs_dir:
 	debugfs_remove_recursive(dev->debugfs_dir);
 	kfree(hdr_info);
-	dev_err(&dev->device, "visorbus_create_instance failed: %d\n", err);
+	dev_err(&dev->device, "%s failed: %d\n", __func__, err);
 	return err;
 }
 
Signature · 1 line
2.13.2
#1 lore raw

Hi,

Quoted 2 lines · Quytelda Kahja

Replace the literal function name "visorbus_create_instance" with the format specifier "%s" so it can be dynamically filled by the __func__ macro.

On a general note, I think the actual change or effect is more import to mention in the subject than the fact that you "fix some issue highlighted by checkpatch".

Something like

Subject: [PATCH] staging: unisys: visorbus: use __func__ instead of function name

Of course you can still mention that checkpatch highlighted the issue for you in the description.

Quoted 11 lines
---
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/unisys/visorbus/visorbus_main.c +0 -0
index 1c785dd19ddd..1c6dc3a3e64a 100644

drivers/staging/unisys/visorbus/visorbus_main.c visorbus_create_instance(struct visor_device *dev) · line 1035

Quoted 7 lines
drivers/staging/unisys/visorbus/visorbus_main.c +1 -1
@@ -1030,7 +1030,7 @@ visorbus_create_instance(struct visor_device *dev)
 err_debugfs_dir:
        debugfs_remove_recursive(dev->debugfs_dir);
        kfree(hdr_info);
-       dev_err(&dev->device, "visorbus_create_instance failed: %d\n", err);
+       dev_err(&dev->device, "%s failed: %d\n", __func__, err);
        return err;
 }

It looks sane, anyway.

Frans

maintainer
#2 lore raw
In reply to Quytelda Kahja
Quoted 7 lines · Quytelda Kahja

Replace the literal function name "visorbus_create_instance" with the format specifier "%s" so it can be dynamically filled by the __func__ macro.

---
 drivers/staging/unisys/visorbus/visorbus_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

When you make a new version of a patch, always correctly version it, as the documentation tells you to do.

Please fix that up here and resend.

thanks,

greg k-h