diff mbox series

[13/15] iio: sx9310: Add newlines to printks

Message ID 20200728091057.13.I14600506d0f725bf800c8da4ef89fdb3c3fb45cd@changeid (mailing list archive)
State New, archived
Headers show
Series sx9310 iio driver updates | expand

Commit Message

Daniel Campello July 28, 2020, 3:12 p.m. UTC
From: Stephen Boyd <swboyd@chromium.org>

Printks in the kernel have newlines at the end. Add them to the few
printks in this driver.

Reviewed-by: Daniel Campello <campello@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Daniel Campello <campello@chromium.org>
---

 drivers/iio/proximity/sx9310.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Andy Shevchenko July 28, 2020, 6:19 p.m. UTC | #1
On Tue, Jul 28, 2020 at 6:14 PM Daniel Campello <campello@chromium.org> wrote:
>
> From: Stephen Boyd <swboyd@chromium.org>
>
> Printks in the kernel have newlines at the end. Add them to the few

Printk()s

> printks in this driver.

printk()s

> Reviewed-by: Daniel Campello <campello@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver")
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> Signed-off-by: Daniel Campello <campello@chromium.org>

It has ordering issues
Should be

Fixes:
SoB: Stephen
Rb: Douglas
Rb: Daniel
SoB: Daniel


> ---
>
>  drivers/iio/proximity/sx9310.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
> index 3f981d28ee4056..4553ee83a016a3 100644
> --- a/drivers/iio/proximity/sx9310.c
> +++ b/drivers/iio/proximity/sx9310.c
> @@ -809,7 +809,7 @@ static int sx9310_init_compensation(struct iio_dev *indio_dev)
>         if (ret) {
>                 if (ret == -ETIMEDOUT)
>                         dev_err(&data->client->dev,
> -                               "0x02 << 3l compensation timed out: 0x%02x",
> +                               "0x02 << 3l compensation timed out: 0x%02x\n",

Looks like ping-pong style in the series, i.e. you may fix this when
you introduced this line.

Check the rest (and not only printk()s) for the similar style and
avoid the latter.

>                                 val);
>                 return ret;
>         }
> @@ -855,7 +855,7 @@ static int sx9310_set_indio_dev_name(struct device *dev,
>
>         ddata = (uintptr_t)device_get_match_data(dev);
>         if (ddata != whoami) {
> -               dev_err(dev, "WHOAMI does not match device data: %u", whoami);
> +               dev_err(dev, "WHOAMI does not match device data: %u\n", whoami);
>                 return -ENODEV;
>         }
>
> @@ -867,7 +867,7 @@ static int sx9310_set_indio_dev_name(struct device *dev,
>                 indio_dev->name = "sx9311";
>                 break;
>         default:
> -               dev_err(dev, "unexpected WHOAMI response: %u", whoami);
> +               dev_err(dev, "unexpected WHOAMI response: %u\n", whoami);
>                 return -ENODEV;
>         }
>
> @@ -896,7 +896,7 @@ static int sx9310_probe(struct i2c_client *client)
>
>         ret = regmap_read(data->regmap, SX9310_REG_WHOAMI, &data->whoami);
>         if (ret) {
> -               dev_err(dev, "error in reading WHOAMI register: %d", ret);
> +               dev_err(dev, "error in reading WHOAMI register: %d\n", ret);
>                 return ret;
>         }
>
> --
> 2.28.0.rc0.142.g3c755180ce-goog
>
Joe Perches July 28, 2020, 6:24 p.m. UTC | #2
On Tue, 2020-07-28 at 21:19 +0300, Andy Shevchenko wrote:
> On Tue, Jul 28, 2020 at 6:14 PM Daniel Campello <campello@chromium.org> wrote:
> > From: Stephen Boyd <swboyd@chromium.org>
> > 
> > Printks in the kernel have newlines at the end. Add them to the few
> 
> Printk()s
> 
> > printks in this driver.
> 
> printk()s

Random kernel pedantry.
This patch should not need to be respun for any of these.

> > Reviewed-by: Daniel Campello <campello@chromium.org>
> > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver")
> > Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> > Signed-off-by: Daniel Campello <campello@chromium.org>
> 
> It has ordering issues
> Should be
> 
> Fixes:
> SoB: Stephen
> Rb: Douglas
> Rb: Daniel
> SoB: Daniel
> 
> 
> > ---
> > 
> >  drivers/iio/proximity/sx9310.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
> > index 3f981d28ee4056..4553ee83a016a3 100644
> > --- a/drivers/iio/proximity/sx9310.c
> > +++ b/drivers/iio/proximity/sx9310.c
> > @@ -809,7 +809,7 @@ static int sx9310_init_compensation(struct iio_dev *indio_dev)
> >         if (ret) {
> >                 if (ret == -ETIMEDOUT)
> >                         dev_err(&data->client->dev,
> > -                               "0x02 << 3l compensation timed out: 0x%02x",
> > +                               "0x02 << 3l compensation timed out: 0x%02x\n",
> 
> Looks like ping-pong style in the series, i.e. you may fix this when
> you introduced this line.
> 
> Check the rest (and not only printk()s) for the similar style and
> avoid the latter.
> 
> >                                 val);
> >                 return ret;
> >         }
> > @@ -855,7 +855,7 @@ static int sx9310_set_indio_dev_name(struct device *dev,
> > 
> >         ddata = (uintptr_t)device_get_match_data(dev);
> >         if (ddata != whoami) {
> > -               dev_err(dev, "WHOAMI does not match device data: %u", whoami);
> > +               dev_err(dev, "WHOAMI does not match device data: %u\n", whoami);
> >                 return -ENODEV;
> >         }
> > 
> > @@ -867,7 +867,7 @@ static int sx9310_set_indio_dev_name(struct device *dev,
> >                 indio_dev->name = "sx9311";
> >                 break;
> >         default:
> > -               dev_err(dev, "unexpected WHOAMI response: %u", whoami);
> > +               dev_err(dev, "unexpected WHOAMI response: %u\n", whoami);
> >                 return -ENODEV;
> >         }
> > 
> > @@ -896,7 +896,7 @@ static int sx9310_probe(struct i2c_client *client)
> > 
> >         ret = regmap_read(data->regmap, SX9310_REG_WHOAMI, &data->whoami);
> >         if (ret) {
> > -               dev_err(dev, "error in reading WHOAMI register: %d", ret);
> > +               dev_err(dev, "error in reading WHOAMI register: %d\n", ret);
> >                 return ret;
> >         }
> > 
> > --
> > 2.28.0.rc0.142.g3c755180ce-goog
> > 
> 
>
Andy Shevchenko July 28, 2020, 6:32 p.m. UTC | #3
On Tue, Jul 28, 2020 at 9:24 PM Joe Perches <joe@perches.com> wrote:
> On Tue, 2020-07-28 at 21:19 +0300, Andy Shevchenko wrote:
> > On Tue, Jul 28, 2020 at 6:14 PM Daniel Campello <campello@chromium.org> wrote:
> > > From: Stephen Boyd <swboyd@chromium.org>
> > >
> > > Printks in the kernel have newlines at the end. Add them to the few
> >
> > Printk()s
> >
> > > printks in this driver.
> >
> > printk()s
>
> Random kernel pedantry.
> This patch should not need to be respun for any of these.

If for above I can agree with you, below is definitely subject to improvement.

>
> > > Reviewed-by: Daniel Campello <campello@chromium.org>
> > > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> > > Fixes: 72ad02b15d63 ("iio: Add SEMTECH SX9310/9311 sensor driver")
> > > Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> > > Signed-off-by: Daniel Campello <campello@chromium.org>
> >
> > It has ordering issues
> > Should be
> >
> > Fixes:
> > SoB: Stephen
> > Rb: Douglas
> > Rb: Daniel
> > SoB: Daniel
> >
> >
> > > ---
> > >
> > >  drivers/iio/proximity/sx9310.c | 8 ++++----
> > >  1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
> > > index 3f981d28ee4056..4553ee83a016a3 100644
> > > --- a/drivers/iio/proximity/sx9310.c
> > > +++ b/drivers/iio/proximity/sx9310.c
> > > @@ -809,7 +809,7 @@ static int sx9310_init_compensation(struct iio_dev *indio_dev)
> > >         if (ret) {
> > >                 if (ret == -ETIMEDOUT)
> > >                         dev_err(&data->client->dev,
> > > -                               "0x02 << 3l compensation timed out: 0x%02x",
> > > +                               "0x02 << 3l compensation timed out: 0x%02x\n",
> >
> > Looks like ping-pong style in the series, i.e. you may fix this when
> > you introduced this line.
> >
> > Check the rest (and not only printk()s) for the similar style and
> > avoid the latter.
> >
> > >                                 val);
> > >                 return ret;
> > >         }
> > > @@ -855,7 +855,7 @@ static int sx9310_set_indio_dev_name(struct device *dev,
> > >
> > >         ddata = (uintptr_t)device_get_match_data(dev);
> > >         if (ddata != whoami) {
> > > -               dev_err(dev, "WHOAMI does not match device data: %u", whoami);
> > > +               dev_err(dev, "WHOAMI does not match device data: %u\n", whoami);
> > >                 return -ENODEV;
> > >         }
> > >
> > > @@ -867,7 +867,7 @@ static int sx9310_set_indio_dev_name(struct device *dev,
> > >                 indio_dev->name = "sx9311";
> > >                 break;
> > >         default:
> > > -               dev_err(dev, "unexpected WHOAMI response: %u", whoami);
> > > +               dev_err(dev, "unexpected WHOAMI response: %u\n", whoami);
> > >                 return -ENODEV;
> > >         }
> > >
> > > @@ -896,7 +896,7 @@ static int sx9310_probe(struct i2c_client *client)
> > >
> > >         ret = regmap_read(data->regmap, SX9310_REG_WHOAMI, &data->whoami);
> > >         if (ret) {
> > > -               dev_err(dev, "error in reading WHOAMI register: %d", ret);
> > > +               dev_err(dev, "error in reading WHOAMI register: %d\n", ret);
> > >                 return ret;
> > >         }
> > >
> > > --
> > > 2.28.0.rc0.142.g3c755180ce-goog
> > >
> >
> >
>
diff mbox series

Patch

diff --git a/drivers/iio/proximity/sx9310.c b/drivers/iio/proximity/sx9310.c
index 3f981d28ee4056..4553ee83a016a3 100644
--- a/drivers/iio/proximity/sx9310.c
+++ b/drivers/iio/proximity/sx9310.c
@@ -809,7 +809,7 @@  static int sx9310_init_compensation(struct iio_dev *indio_dev)
 	if (ret) {
 		if (ret == -ETIMEDOUT)
 			dev_err(&data->client->dev,
-				"0x02 << 3l compensation timed out: 0x%02x",
+				"0x02 << 3l compensation timed out: 0x%02x\n",
 				val);
 		return ret;
 	}
@@ -855,7 +855,7 @@  static int sx9310_set_indio_dev_name(struct device *dev,
 
 	ddata = (uintptr_t)device_get_match_data(dev);
 	if (ddata != whoami) {
-		dev_err(dev, "WHOAMI does not match device data: %u", whoami);
+		dev_err(dev, "WHOAMI does not match device data: %u\n", whoami);
 		return -ENODEV;
 	}
 
@@ -867,7 +867,7 @@  static int sx9310_set_indio_dev_name(struct device *dev,
 		indio_dev->name = "sx9311";
 		break;
 	default:
-		dev_err(dev, "unexpected WHOAMI response: %u", whoami);
+		dev_err(dev, "unexpected WHOAMI response: %u\n", whoami);
 		return -ENODEV;
 	}
 
@@ -896,7 +896,7 @@  static int sx9310_probe(struct i2c_client *client)
 
 	ret = regmap_read(data->regmap, SX9310_REG_WHOAMI, &data->whoami);
 	if (ret) {
-		dev_err(dev, "error in reading WHOAMI register: %d", ret);
+		dev_err(dev, "error in reading WHOAMI register: %d\n", ret);
 		return ret;
 	}