public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Mohan Kumar <mohankumar718@gmail.com>
Cc: knaack.h@gmx.de, lars@metafoo.de, linus.walleij@linaro.org,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH] drivers: iio: accel: Switch hardcoded function name with a reference to __func__ making the code more maintainable
Date: Mon, 22 Apr 2019 11:43:17 +0100	[thread overview]
Message-ID: <20190422114317.3304426c@archlinux> (raw)
In-Reply-To: <1555663011-8401-1-git-send-email-mohankumar718@gmail.com>

On Fri, 19 Apr 2019 11:36:51 +0300
Mohan Kumar <mohankumar718@gmail.com> wrote:

> It fixes the following checkpatch.pl warning:
> 
> WARNING: Prefer using '"%s...", __func__' to using function's name, in a
> string
> 
> Signed-off-by: Mohan Kumar <mohankumar718@gmail.com>
Patch is good, but please check other patches for the area
git log --oneline -- drivers/iio to get the standard formatting
for descriptions.  The patch title is also a bit to long.

I've edited that and applied the patch to the togreg branch
of iio.git and pushed out as testing for the autobuilders to
play with it.

Thanks

Jonathan

> ---
>  drivers/iio/accel/bmc150-accel-core.c | 2 +-
>  drivers/iio/accel/kxcjk-1013.c        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> index b4e2d9b..44d7c49 100644
> --- a/drivers/iio/accel/bmc150-accel-core.c
> +++ b/drivers/iio/accel/bmc150-accel-core.c
> @@ -394,7 +394,7 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
>  
>  	if (ret < 0) {
>  		dev_err(dev,
> -			"Failed: bmc150_accel_set_power_state for %d\n", on);
> +			"Failed: %s for %d\n", __func__, on);
>  		if (on)
>  			pm_runtime_put_noidle(dev);
>  
> diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
> index a5c9d3d..cbcf3ee0 100644
> --- a/drivers/iio/accel/kxcjk-1013.c
> +++ b/drivers/iio/accel/kxcjk-1013.c
> @@ -451,7 +451,7 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
>  	}
>  	if (ret < 0) {
>  		dev_err(&data->client->dev,
> -			"Failed: kxcjk1013_set_power_state for %d\n", on);
> +			"Failed: %s for %d\n", __func__, on);
>  		if (on)
>  			pm_runtime_put_noidle(&data->client->dev);
>  		return ret;


      reply	other threads:[~2019-04-22 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  8:36 [PATCH] drivers: iio: accel: Switch hardcoded function name with a reference to __func__ making the code more maintainable Mohan Kumar
2019-04-22 10:43 ` Jonathan Cameron [this message]

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=20190422114317.3304426c@archlinux \
    --to=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mohankumar718@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