Discussion:
[PATCH 2/3] speakup:Prefer using __func__ identifier instead of hardcoded function name
Samuel Thibault
2017-04-17 21:06:55 UTC
Permalink
Unless it's intentional, isn't it always preferable to use __func__ identifier
instead of hardcoded function name?
If at all, in future, this function is subject to change its name,
then programmer won't have to accomodate the changes at all the places manually.
__func__ identifier will take care of it.
---
drivers/staging/speakup/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 8fceb15..8a7c5a9 100755
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -450,7 +450,7 @@ static void speak_char(u16 ch)
cp = spk_characters[ch];
if (!cp) {
- pr_info("speak_char: cp == NULL!\n");
+ pr_info("%s: cp == NULL!\n", __func__);
return;
}
if (IS_CHAR(ch, B_CAP)) {
--
2.1.4
--
Samuel
/* Halley */

(Halley's comment.)
Loading...