From: Nishant Malpani <nish.malpani25@gmail.com>
To: Joe Perches <joe@perches.com>, jic23@kernel.org
Cc: andriy.shevchenko@linux.intel.com, knaack.h@gmx.de,
lars@metafoo.de, pmeerw@pmeerw.net, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/13] iio: accel: kxsd9: Use suitable format specifier
Date: Sun, 22 Mar 2020 02:53:48 +0530 [thread overview]
Message-ID: <e4612596-babb-aa0f-aafe-dd3f69393b47@gmail.com> (raw)
In-Reply-To: <e7188ce191ab1dfb06db0346f45e20829df63c70.camel@perches.com>
On 22/03/20 2:39 am, Joe Perches wrote:
> On Sun, 2020-03-22 at 02:31 +0530, Nishant Malpani wrote:
>> Provide more suitable format specifiers while printing error logs.
>> Discards the use of unnecessary explicit casting and prints symbolic
>> error name which might prove to be convenient during debugging.
>
>
> 'Use suitable format specifier' is obscure and not specific.
>
> All the subjects should likely be something like
>
> [PATCH] subsystem: Use vsprintf extension %pe for symbolic error name
>
Agreed. I was just skeptical about that previously because the commit
subject line's length was going way beyond 50 chars. I do get your point
though; I'll send in a v2!
>
>> diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c
> []
>> @@ -21,8 +21,8 @@ static int kxsd9_i2c_probe(struct i2c_client *i2c,
>>
>> regmap = devm_regmap_init_i2c(i2c, &config);
>> if (IS_ERR(regmap)) {
>> - dev_err(&i2c->dev, "Failed to register i2c regmap %d\n",
>> - (int)PTR_ERR(regmap));
>> + dev_err(&i2c->dev, "Failed to register i2c regmap %pe\n",
>> + regmap;
>
> And this could use a separator between regmap and errname like
>
> dev_err(&i2c->dev, "Failed to register i2c regmap: %pe\n",
> or
> dev_err(&i2c->dev, "Failed to register i2c regmap - %pe\n",
>
>
Yes, I had thought of this but was too timid to ask, thinking it was
perhaps there for legacy reasons :P
I'll add a separator in v2. Thanks for reviewing!
With regards,
Nishant Malpani
next prev parent reply other threads:[~2020-03-21 21:23 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-21 21:01 [PATCH 00/13] iio: Use suitable format specifiers Nishant Malpani
2020-03-21 21:01 ` [PATCH 01/13] iio: accel: kxsd9: Use suitable format specifier Nishant Malpani
2020-03-21 21:09 ` Joe Perches
2020-03-21 21:23 ` Nishant Malpani [this message]
2020-03-22 0:36 ` kbuild test robot
2020-03-22 3:27 ` kbuild test robot
2020-03-22 15:13 ` Jonathan Cameron
2020-03-21 21:01 ` [PATCH 02/13] iio: gyro: bmg160_i2c: " Nishant Malpani
2020-03-21 21:01 ` [PATCH 03/13] iio: gyro: bmg160_spi: " Nishant Malpani
2020-03-21 21:01 ` [PATCH 04/13] iio: gyro: mpu3050: " Nishant Malpani
2020-03-21 21:01 ` [PATCH 05/13] iio: imu: bmi160_i2c: " Nishant Malpani
2020-03-21 21:01 ` [PATCH 06/13] iio: imu: bmi160_spi: " Nishant Malpani
2020-03-21 21:01 ` [PATCH 07/13] iio: imu: inv_mpu6050_i2c: " Nishant Malpani
2020-03-21 21:01 ` [PATCH 08/13] iio: imu: inv_mpu6050_spi: " Nishant Malpani
2020-03-21 21:02 ` [PATCH 09/13] iio: magn: bmc150: " Nishant Malpani
2020-03-21 21:02 ` [PATCH 10/13] iio: light: st_uvis25_i2c: " Nishant Malpani
2020-03-21 21:02 ` [PATCH 11/13] iio: light: st_uvis25_spi: " Nishant Malpani
2020-03-21 21:02 ` [PATCH 12/13] iio: st_sensors_i2c: " Nishant Malpani
2020-03-21 21:02 ` [PATCH 13/13] iio: st_sensors_spi: " Nishant Malpani
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=e4612596-babb-aa0f-aafe-dd3f69393b47@gmail.com \
--to=nish.malpani25@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jic23@kernel.org \
--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=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).