Re: [PATCH] Replaced Function name in debug print with %s..., __func__

From: Joe Perches
Date: Sun Jul 02 2017 - 12:14:10 EST


On Sun, 2017-07-02 at 19:41 +0530, Gaurav Pathak wrote:
> Signed-off-by: Gaurav Pathak <gauravpathak129@xxxxxxxxx>

Need a different subject like:

[PATCH] staging: rts5208: Replace embedded function names with "%s: ", __func__

and you also require some change log like

Avoid possible defects when refactoring.

> diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c
[]
> @@ -3064,7 +3064,8 @@ static int mspro_rw_multi_sector(struct scsi_cmnd *srb,
>
> if (detect_card_cd(chip, MS_CARD) != STATUS_SUCCESS) {
> chip->rw_need_retry = 0;
> - dev_dbg(rtsx_dev(chip), "No card exist, exit mspro_rw_multi_sector\n");
> + dev_dbg(rtsx_dev(chip), "No card exist, %s\n",
> + __func__);

try not to change output too.

You could also drop what appear to be function tracing
style logging where the message is the equivalent of:

void func(args...)
{
dev_dbg("%s: entered\n", __func__)
...
}

as the generic function tracing mechanism works well.