On Wed, Jun 28, 2017 at 11:15:09AM +0200, Simo Koskinen wrote:
> Fixed following warnings found by checkpatch.pl script:
> 
> WARNING: Prefer using '"%s...", __func__' to using 'xxxx',
> this function's name, in a string
> 
> Signed-off-by: Simo Koskinen <koskis...@gmail.com>
> ---
>  drivers/staging/rts5208/rtsx.c      |  2 +-
>  drivers/staging/rts5208/rtsx_chip.c |  5 +++--
>  drivers/staging/rts5208/sd.c        |  8 +++++---
>  drivers/staging/rts5208/spi.c       |  9 +++++----
>  drivers/staging/rts5208/xd.c        | 11 ++++++-----
>  5 files changed, 20 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c
> index b8177f5..6c7485f 100644
> --- a/drivers/staging/rts5208/rtsx.c
> +++ b/drivers/staging/rts5208/rtsx.c
> @@ -1009,7 +1009,7 @@ static void rtsx_remove(struct pci_dev *pci)
>  {
>       struct rtsx_dev *dev = pci_get_drvdata(pci);
>  
> -     dev_info(&pci->dev, "rtsx_remove() called\n");
> +     dev_info(&pci->dev, "%s() called\n", __func__);

This should just be removed entirely, ftrace provides this functionality
if a developer really needs it.

>  
>       quiesce_and_remove_host(dev);
>       release_everything(dev);
> diff --git a/drivers/staging/rts5208/rtsx_chip.c 
> b/drivers/staging/rts5208/rtsx_chip.c
> index 7f4107b..4895579 100644
> --- a/drivers/staging/rts5208/rtsx_chip.c
> +++ b/drivers/staging/rts5208/rtsx_chip.c
> @@ -616,8 +616,9 @@ int rtsx_reset_chip(struct rtsx_chip *chip)
>               else
>                       retval = rtsx_pre_handle_sdio_new(chip);
>  
> -             dev_dbg(rtsx_dev(chip), "chip->need_reset = 0x%x 
> (rtsx_reset_chip)\n",
> -                     (unsigned int)(chip->need_reset));
> +             dev_dbg(rtsx_dev(chip), "chip->need_reset = 0x%x (%s)\n",
> +                     (unsigned int)(chip->need_reset),
> +                     __func__);
>  #else  /* HW_AUTO_SWITCH_SD_BUS */
>               retval = rtsx_pre_handle_sdio_old(chip);
>  #endif  /* HW_AUTO_SWITCH_SD_BUS */
> diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
> index c2eb072..e3a92b0 100644
> --- a/drivers/staging/rts5208/sd.c
> +++ b/drivers/staging/rts5208/sd.c
> @@ -910,7 +910,8 @@ static int sd_change_phase(struct rtsx_chip *chip, u8 
> sample_point, u8 tune_dir)
>       int retval;
>       bool ddr_rx = false;
>  
> -     dev_dbg(rtsx_dev(chip), "sd_change_phase (sample_point = %d, tune_dir = 
> %d)\n",
> +     dev_dbg(rtsx_dev(chip), "%s (sample_point = %d, tune_dir = %d)\n",
> +             __func__,
>               sample_point, tune_dir);

Please use your brain when making these changes.  Does that look correct
now?  Hint, it isn't, please merge with the next line...

> @@ -3575,8 +3576,9 @@ static int reset_mmc_only(struct rtsx_chip *chip)
>               return STATUS_FAIL;
>       }
>  
> -     dev_dbg(rtsx_dev(chip), "In reset_mmc_only, sd_card->sd_type = 0x%x\n",
> -             sd_card->sd_type);
> +     dev_dbg(rtsx_dev(chip), "In %s, sd_card->sd_type = 0x%x\n",
> +             __func__,
> +             sd_card->sd_type);

Same here.  Really, look at what you are doing...

> -     dev_dbg(rtsx_dev(chip), "spi_get_status: err_code = 0x%x\n",
> -             spi->err_code);
> +     dev_dbg(rtsx_dev(chip), "%s: err_code = 0x%x\n",
> +             __func__,
> +             spi->err_code);

And again...

Please fix up the whole patch and resend.

thanks,

greg k-h
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to