public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Simo Koskinen <koskisoft@gmail.com>
Cc: arushisinghal19971997@gmail.com, wporter82@gmail.com,
	devel@driverdev.osuosl.org, julia.lawall@lip6.fr,
	namrataashettar@gmail.com, linux-kernel@vger.kernel.org,
	sergio.paracuellos@gmail.com, baijiaju1990@163.com,
	weiyongjun1@huawei.com, quexint@gmail.com, jrickertkc@gmail.com,
	colin.king@canonical.com, dilekuzulmez@gmail.com,
	aquannie@gmail.com, bankarsandhya512@gmail.com
Subject: Re: [PATCH] staging: rts5208 : Fixing coding style warnings
Date: Wed, 28 Jun 2017 14:00:21 +0200	[thread overview]
Message-ID: <20170628120021.GA10355@kroah.com> (raw)
In-Reply-To: <1498641309-2766-1-git-send-email-koskisoft@gmail.com>

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

  reply	other threads:[~2017-06-28 12:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28  9:15 [PATCH] staging: rts5208 : Fixing coding style warnings Simo Koskinen
2017-06-28 12:00 ` Greg KH [this message]
2017-06-28 12:50   ` Simo Koskinen
2017-06-28 12:58     ` Greg KH
2017-06-28 12:58     ` Frans Klaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628120021.GA10355@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=aquannie@gmail.com \
    --cc=arushisinghal19971997@gmail.com \
    --cc=baijiaju1990@163.com \
    --cc=bankarsandhya512@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dilekuzulmez@gmail.com \
    --cc=jrickertkc@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=koskisoft@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namrataashettar@gmail.com \
    --cc=quexint@gmail.com \
    --cc=sergio.paracuellos@gmail.com \
    --cc=weiyongjun1@huawei.com \
    --cc=wporter82@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox