Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1517315
| From | Brian Masney <masneyb@onstation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 09/23] staging: iio: tsl2583: cleaned up logging |
| Date | 2016-11-08 17:00 +0100 |
| Message-ID | <sBgYy-2MM-47@gated-at.bofh.it> (permalink) |
| References | <sBbFv-84M-3@gated-at.bofh.it> <sBbFw-84M-35@gated-at.bofh.it> <sBbPc-88c-43@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Nov 08, 2016 at 02:29:20AM -0800, Joe Perches wrote:
> On Tue, 2016-11-08 at 05:16 -0500, Brian Masney wrote:
> > There are several places in the code where the function name is
> > hardcoded in the log message. Use the __func__ constant string to build
> > the log message. This also clarifies some of the error messages to match
> > the code and ensures that the correct priority is used since the message
> > is already being changed.
> []
> > diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c
> []
> > @@ -170,13 +170,15 @@ static int taos_get_lux(struct iio_dev *indio_dev)
> >
> > ret = i2c_smbus_read_byte_data(chip->client, TSL258X_CMD_REG);
> > if (ret < 0) {
> > - dev_err(&chip->client->dev, "taos_get_lux failed to read CMD_REG\n");
> > + dev_err(&chip->client->dev, "%s failed to read CMD_REG register\n",
> > + __func__);
>
> Please use "%s: <message>", __func__ consistently
>
> > @@ -545,12 +549,15 @@ static ssize_t in_illuminance_lux_table_store(struct device *dev,
> > * and the last table entry is all 0.
> > */
> > n = value[0];
> > - if ((n % 3) || n < 6 || n > ((ARRAY_SIZE(taos_device_lux) - 1) * 3)) {
> > - dev_info(dev, "LUX TABLE INPUT ERROR 1 Value[0]=%d\n", n);
> > + if ((n % 3) || n < 6 || n > TSL2583_MAX_LUX_INTS) {
> > + dev_err(dev,
> > + "%s: The number of entries in the lux table must be a multiple of 3 and within the range [6, %zu]",
> > + __func__, TSL2583_MAX_LUX_INTS);
>
> Missing terminating '\n"
Thanks for the feedback Joe. I'll send out an updated patch series on
Friday.
Brian
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/23] staging: iio: tsl2583: move out of staging Brian Masney <masneyb@onstation.org> - 2016-11-08 11:20 +0100
[PATCH v2 02/23] staging: iio: tsl2583: fix issue with changes to calibscale and int_time not being set on the chip Brian Masney <masneyb@onstation.org> - 2016-11-08 11:20 +0100
[PATCH v2 09/23] staging: iio: tsl2583: cleaned up logging Brian Masney <masneyb@onstation.org> - 2016-11-08 11:20 +0100
Re: [PATCH v2 09/23] staging: iio: tsl2583: cleaned up logging Joe Perches <joe@perches.com> - 2016-11-08 11:30 +0100
Re: [PATCH v2 09/23] staging: iio: tsl2583: cleaned up logging Brian Masney <masneyb@onstation.org> - 2016-11-08 17:00 +0100
[PATCH v2 03/23] staging: iio: tsl2583: check if chip is suspended in in_illuminance_calibrate_store Brian Masney <masneyb@onstation.org> - 2016-11-08 11:20 +0100
[PATCH v2 15/23] staging: iio: tsl2583: fix multiline comment syntax Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 12/23] staging: iio: tsl2583: fix comparison between signed and unsigned integers Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 18/23] staging: iio: tsl2583: change tsl2583_als_calibrate() to return 0 on success Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 20/23] staging: iio: tsl2583: don't assume an unsigned int is 32 bits Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 22/23] staging: iio: tsl2583: updated copyright and MODULE_AUTHOR Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
Re: [PATCH v2 22/23] staging: iio: tsl2583: updated copyright and MODULE_AUTHOR Jonathan Cameron <jic23@kernel.org> - 2016-11-08 21:50 +0100
[PATCH v2 19/23] staging: iio: tsl2583: remove unnecessary parentheses Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 14/23] staging: iio: tsl2583: combine sysfs documentation Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 16/23] staging: iio: tsl2583: updated code comment to match what the code does Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 11/23] staging: iio: tsl2583: fix alignment of #define values Brian Masney <masneyb@onstation.org> - 2016-11-08 11:30 +0100
[PATCH v2 17/23] staging: iio: tsl2583: moved code block inside else statement Brian Masney <masneyb@onstation.org> - 2016-11-08 11:40 +0100
[PATCH v2 21/23] staging: iio: tsl2583: move from a global to a per device lux table Brian Masney <masneyb@onstation.org> - 2016-11-08 11:40 +0100
[PATCH v2 13/23] staging: iio: tsl2583: change newlines to improve readability Brian Masney <masneyb@onstation.org> - 2016-11-08 11:40 +0100
csiph-web