[PATCH 2/3] speakup:Prefer using __func__ identifier instead of hardcoded function name
Samuel Thibault
samuel.thibault at ens-lyon.org
Mon Apr 17 17:06:55 EDT 2017
Rishiraj Manwatkar, on lun. 17 avril 2017 17:42:57 +0000, wrote:
> 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.
>
> Signed-off-by: Rishiraj Manwatkar <manwatkar at outlook.com>
Acked-by: Samuel Thibault <samuel.thibault at ens-lyon.org>
> ---
> 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.)
More information about the Speakup
mailing list