linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Nishant Malpani <nish.malpani25@gmail.com>
Cc: andriy.shevchenko@linux.intel.com, joe@perches.com,
	knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 09/13] iio: imu: inv_mpu6050_i2c: Use vsprintf extension %pe for symbolic error name
Date: Sat, 28 Mar 2020 14:21:50 +0000	[thread overview]
Message-ID: <20200328142150.03de9ed1@archlinux> (raw)
In-Reply-To: <83719d41f051774c971f5ed87ca1289849092110.1584897364.git.nish.malpani25@gmail.com>

On Sun, 22 Mar 2020 22:53:11 +0530
Nishant Malpani <nish.malpani25@gmail.com> wrote:

> Utilize %pe format specifier from vsprintf while printing error logs
> with dev_err(). Discards the use of unnecessary explicit casting and
> prints symbolic error name which might prove to be convenient during
> debugging.
> 
> Signed-off-by: Nishant Malpani <nish.malpani25@gmail.com>
Applied,

Thanks,

J
> ---
> 
> Changes in v2:
>   - Rewrite commit subject line outlining the usage of %pe.
>   - Add a separator between regmap and its error name.
> 
> Based on conversations in [1] & [2].
> 
> [1] https://marc.info/?l=linux-iio&m=158427554607223&w=2
> [2] https://marc.info/?l=linux-iio&m=158481647605891&w=2
> ---
>  drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> index 6993d3b87bb0..28cfae1e61cf 100644
> --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_i2c.c
> @@ -122,8 +122,8 @@ static int inv_mpu_probe(struct i2c_client *client,
>  
>  	regmap = devm_regmap_init_i2c(client, &inv_mpu_regmap_config);
>  	if (IS_ERR(regmap)) {
> -		dev_err(&client->dev, "Failed to register i2c regmap %d\n",
> -			(int)PTR_ERR(regmap));
> +		dev_err(&client->dev, "Failed to register i2c regmap: %pe\n",
> +			regmap);
>  		return PTR_ERR(regmap);
>  	}
>  


  reply	other threads:[~2020-03-28 14:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 17:23 [PATCH v2 00/13] Use vsprintf extension %pe for symbolic error Nishant Malpani
2020-03-22 17:23 ` [PATCH v2 01/13] iio: accel: kxsd9: Use vsprintf extension %pe for symbolic error name Nishant Malpani
2020-03-28 14:10   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 02/13] iio: st_sensors_i2c: " Nishant Malpani
2020-03-28 14:11   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 03/13] iio: st_sensors_spi: " Nishant Malpani
2020-03-28 14:12   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 04/13] iio: gyro: bmg160_i2c: " Nishant Malpani
2020-03-28 14:13   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 05/13] iio: gyro: bmg160_spi: " Nishant Malpani
2020-03-28 14:16   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 06/13] iio: gyro: mpu3050: " Nishant Malpani
2020-03-28 14:18   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 07/13] iio: imu: bmi160_i2c: " Nishant Malpani
2020-03-28 14:19   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 08/13] iio: imu: bmi160_spi: " Nishant Malpani
2020-03-28 14:20   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 09/13] iio: imu: inv_mpu6050_i2c: " Nishant Malpani
2020-03-28 14:21   ` Jonathan Cameron [this message]
2020-03-22 17:23 ` [PATCH v2 10/13] iio: imu: inv_mpu6050_spi: " Nishant Malpani
2020-03-28 14:22   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 11/13] iio: light: st_uvis25_i2c: " Nishant Malpani
2020-03-28 14:25   ` Jonathan Cameron
2020-03-22 17:23 ` [PATCH v2 12/13] iio: light: st_uvis25_spi: " Nishant Malpani
2020-03-22 17:23 ` [PATCH v2 13/13] iio: magn: bmc150: " Nishant Malpani
2020-03-28 14:26   ` Jonathan Cameron

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=20200328142150.03de9ed1@archlinux \
    --to=jic23@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=joe@perches.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nish.malpani25@gmail.com \
    --cc=pmeerw@pmeerw.net \
    /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;
as well as URLs for NNTP newsgroup(s).