Re: [PATCH 2/3] speakup:Prefer using __func__ identifier instead of hardcoded function name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
>  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.)
_______________________________________________
Speakup mailing list
Speakup@xxxxxxxxxxxxxxxxx
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup




[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]
  Powered by Linux