[PATCH] staging: most: replace function name to __func__

Sidong Yang realwakka at gmail.com
Sun Jan 21 16:05:26 UTC 2018


Fix checkpatch.pl warning message about logging code. Previous code
contains hard coded function name. Fix this code by using __func__
macro.

Signed-off-by: Sidong Yang <realwakka at gmail.com>
---
 drivers/staging/most/dim2/dim2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 21e3fb48bdb4..f9bc7dea75b8 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -151,7 +151,7 @@ void dimcb_io_write(u32 __iomem *ptr32, u32 value)
  */
 void dimcb_on_error(u8 error_id, const char *error_message)
 {
-	pr_err("dimcb_on_error: error_id - %d, error_message - %s\n", error_id,
+	pr_err("%s: error_id - %d, error_message - %s\n", __func__, error_id,
 	       error_message);
 }
 
-- 
2.11.0

Greg, 

You're right that other source with tracing code should be removed.
I sended my patch that only contains replace function name in 'pr_err'.

Thanks.

Sidong.


More information about the devel mailing list