Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Gustavo Silva <gustavograzs@gmail.com>
Cc: Alex Lanzano <lanzano.alex@gmail.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: imu: bmi270: rename variable bmi270_device to data
Date: Sat, 22 Feb 2025 17:31:46 +0000	[thread overview]
Message-ID: <20250222173146.089ba66a@jic23-huawei> (raw)
In-Reply-To: <20250219-bmi270-irq-v1-2-145d02bbca3b@gmail.com>

On Wed, 19 Feb 2025 20:54:46 -0300
Gustavo Silva <gustavograzs@gmail.com> wrote:

> Rename all instances of 'struct bmi270_data' to 'data', to ensure
> consistency across the driver.
> 
> Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
> ---
>  drivers/iio/imu/bmi270/bmi270_core.c | 79 ++++++++++++++++++------------------
>  1 file changed, 39 insertions(+), 40 deletions(-)
> 
> diff --git a/drivers/iio/imu/bmi270/bmi270_core.c b/drivers/iio/imu/bmi270/bmi270_core.c
> index 9f24d4044ed6f00f67fd3a8f5adda821c3140a18..56ebd887fcec94b684dc23f1b4503b719fb39239 100644
> --- a/drivers/iio/imu/bmi270/bmi270_core.c
> +++ b/drivers/iio/imu/bmi270/bmi270_core.c
> @@ -90,7 +90,7 @@ struct bmi270_data {
>  	struct {
>  		__le16 channels[6];
>  		aligned_s64 timestamp;
> -	} data __aligned(IIO_DMA_MINALIGN);
> +	} buffer __aligned(IIO_DMA_MINALIGN);
>  };
>  
>  enum bmi270_scan {
> @@ -284,7 +284,7 @@ static int bmi270_set_scale(struct bmi270_data *data, int chan_type, int uscale)
>  	return -EINVAL;
>  }
>  
> -static int bmi270_get_scale(struct bmi270_data *bmi270_device, int chan_type,
> +static int bmi270_get_scale(struct bmi270_data *data, int chan_type,
>  			    int *scale, int *uscale)
>  {
>  	int ret;
> @@ -293,7 +293,7 @@ static int bmi270_get_scale(struct bmi270_data *bmi270_device, int chan_type,
>  
>  	switch (chan_type) {
>  	case IIO_ACCEL:
> -		ret = regmap_read(bmi270_device->regmap,
> +		ret = regmap_read(data->regmap,
>  				  BMI270_ACC_CONF_RANGE_REG, &val);

Given shorter naming, a few places like this should be re line wrapped.

>  		if (ret)
>  			return ret;


  parent reply	other threads:[~2025-02-22 17:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 23:54 [PATCH 0/3] BMI270 data ready interrupt support Gustavo Silva
2025-02-19 23:54 ` [PATCH 1/3] iio: imu: bmi270: move private struct declaration to source file Gustavo Silva
2025-02-22 16:25   ` Alex Lanzano
2025-02-22 17:28     ` Jonathan Cameron
2025-02-19 23:54 ` [PATCH 2/3] iio: imu: bmi270: rename variable bmi270_device to data Gustavo Silva
2025-02-22 16:39   ` Alex Lanzano
2025-02-22 17:31   ` Jonathan Cameron [this message]
2025-02-19 23:54 ` [PATCH 3/3] iio: imu: bmi270: add support for data ready interrupt trigger Gustavo Silva
2025-02-22 21:05   ` Alex Lanzano

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=20250222173146.089ba66a@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=gustavograzs@gmail.com \
    --cc=lanzano.alex@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.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