public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: puranjay12@gmail.com, lars@metafoo.de, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH v4 5/5] iio: temperature: tmp117: cosmetic alignment cleanup
Date: Sun, 26 Feb 2023 13:09:25 +0000	[thread overview]
Message-ID: <20230226130925.47a6e8d8@jic23-huawei> (raw)
In-Reply-To: <20230220122552.925216-6-m.felsch@pengutronix.de>

On Mon, 20 Feb 2023 13:25:52 +0100
Marco Felsch <m.felsch@pengutronix.de> wrote:

> Align the code correctly if possible and align the channel bit mask to
> make it easier to read.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Hi Marco,

Rest of the series looks good to me now.  We are early in the cycle, otherwise
I might just have made those tweaks suggested in patch 2 whilst applying to
make sure we didn't run out of time.  Given lots of time available I'm taking
the lazier approach and bouncing it back to you one last time!

Thanks,

Jonathan

> ---
> v4:
> - no changes
> v3:
> - no changes
> v2:
> - no changes
> 
>  drivers/iio/temperature/tmp117.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/iio/temperature/tmp117.c b/drivers/iio/temperature/tmp117.c
> index 4915aceb66ee2..5bc68c6392ff6 100644
> --- a/drivers/iio/temperature/tmp117.c
> +++ b/drivers/iio/temperature/tmp117.c
> @@ -43,8 +43,8 @@ struct tmp117_data {
>  };
>  
>  static int tmp117_read_raw(struct iio_dev *indio_dev,
> -		struct iio_chan_spec const *channel, int *val,
> -		int *val2, long mask)
> +			   struct iio_chan_spec const *channel, int *val,
> +			   int *val2, long mask)
>  {
>  	struct tmp117_data *data = iio_priv(indio_dev);
>  	s32 ret;
> @@ -52,7 +52,7 @@ static int tmp117_read_raw(struct iio_dev *indio_dev,
>  	switch (mask) {
>  	case IIO_CHAN_INFO_RAW:
>  		ret = i2c_smbus_read_word_swapped(data->client,
> -						TMP117_REG_TEMP);
> +						  TMP117_REG_TEMP);
>  		if (ret < 0)
>  			return ret;
>  		*val = sign_extend32(ret, 15);
> @@ -60,7 +60,7 @@ static int tmp117_read_raw(struct iio_dev *indio_dev,
>  
>  	case IIO_CHAN_INFO_CALIBBIAS:
>  		ret = i2c_smbus_read_word_swapped(data->client,
> -					TMP117_REG_TEMP_OFFSET);
> +						  TMP117_REG_TEMP_OFFSET);
>  		if (ret < 0)
>  			return ret;
>  		*val = sign_extend32(ret, 15);
> @@ -82,9 +82,8 @@ static int tmp117_read_raw(struct iio_dev *indio_dev,
>  	}
>  }
>  
> -static int tmp117_write_raw(struct iio_dev *indio_dev,
> -		struct iio_chan_spec const *channel, int val,
> -		int val2, long mask)
> +static int tmp117_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec
> +			    const *channel, int val, int val2, long mask)
>  {
>  	struct tmp117_data *data = iio_priv(indio_dev);
>  	s16 off;
> @@ -107,7 +106,9 @@ static const struct iio_chan_spec tmp117_channels[] = {
>  	{
>  		.type = IIO_TEMP,
>  		.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
> -			BIT(IIO_CHAN_INFO_CALIBBIAS) | BIT(IIO_CHAN_INFO_SCALE),
> +				      BIT(IIO_CHAN_INFO_CALIBBIAS) |
> +				      BIT(IIO_CHAN_INFO_SCALE),
> +	},
>  };
>  
>  static const struct iio_chan_spec tmp116_channels[] = {


      reply	other threads:[~2023-02-26 12:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 12:25 [PATCH v4 0/5] Add TI TMP116 Support Marco Felsch
2023-02-20 12:25 ` [PATCH v4 1/5] dt-bindings: iio: ti,tmp117: fix documentation link Marco Felsch
2023-02-20 12:25 ` [PATCH v4 2/5] iio: temperature: tmp117: improve fallback capabilities Marco Felsch
2023-02-26 13:07   ` Jonathan Cameron
2023-02-27 18:44     ` Marco Felsch
2023-03-04 13:13       ` Jonathan Cameron
2023-02-20 12:25 ` [PATCH v4 3/5] dt-bindings: iio: ti,tmp117: add binding for the TMP116 Marco Felsch
2023-02-20 12:25 ` [PATCH v4 4/5] iio: temperature: tmp117: add TI TMP116 support Marco Felsch
2023-02-20 12:25 ` [PATCH v4 5/5] iio: temperature: tmp117: cosmetic alignment cleanup Marco Felsch
2023-02-26 13:09   ` 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=20230226130925.47a6e8d8@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=puranjay12@gmail.com \
    --cc=robh+dt@kernel.org \
    /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