Re: [PATCH v3 03/10] iio: accel: mma8452: cleanup codestyle warning

From: Joshua Crofts

Date: Wed May 06 2026 - 05:25:35 EST


On Tue, 5 May 2026 at 19:48, Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx> wrote:
>
> From: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
>
> Reported by checkpatch:
> FILE: drivers/iio/accel/mma8452.c
>
> CHECK: Alignment should match open parenthesis
>
> Signed-off-by: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
> ---
> drivers/iio/accel/mma8452.c | 47 +++++++++++++++++++------------------
> 1 file changed, 24 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c
> index 279a9b364886..916631519d3f 100644
> --- a/drivers/iio/accel/mma8452.c
> +++ b/drivers/iio/accel/mma8452.c
> @@ -706,8 +706,8 @@ static int mma8452_set_hp_filter_frequency(struct mma8452_data *data,
> }
>
> static int __mma8452_write_raw(struct iio_dev *indio_dev,
> - struct iio_chan_spec const *chan,
> - int val, int val2, long mask)
> + struct iio_chan_spec const *chan,
> + int val, int val2, long mask)

This is still not aligned by 1 character, it should be aligned with the first
character after the opening parenthesis.

> {
> struct mma8452_data *data = iio_priv(indio_dev);
> int i, j, ret;
> @@ -788,8 +788,9 @@ static int mma8452_write_raw(struct iio_dev *indio_dev,
> }
>
> static int mma8452_get_event_regs(struct mma8452_data *data,
> - const struct iio_chan_spec *chan, enum iio_event_direction dir,
> - const struct mma8452_event_regs **ev_reg)
> + const struct iio_chan_spec *chan,
> + enum iio_event_direction dir,
> + const struct mma8452_event_regs **ev_reg)

Same here.

> {
> if (!chan)
> return -EINVAL;
> @@ -818,11 +819,11 @@ static int mma8452_get_event_regs(struct mma8452_data *data,
> }
>
> static int mma8452_read_event_value(struct iio_dev *indio_dev,
> - const struct iio_chan_spec *chan,
> - enum iio_event_type type,
> - enum iio_event_direction dir,
> - enum iio_event_info info,
> - int *val, int *val2)
> + const struct iio_chan_spec *chan,
> + enum iio_event_type type,
> + enum iio_event_direction dir,
> + enum iio_event_info info,
> + int *val, int *val2)

Same here.

> {
> struct mma8452_data *data = iio_priv(indio_dev);
> int ret, us, power_mode;
> @@ -881,11 +882,11 @@ static int mma8452_read_event_value(struct iio_dev *indio_dev,
> }
>
> static int mma8452_write_event_value(struct iio_dev *indio_dev,
> - const struct iio_chan_spec *chan,
> - enum iio_event_type type,
> - enum iio_event_direction dir,
> - enum iio_event_info info,
> - int val, int val2)
> + const struct iio_chan_spec *chan,
> + enum iio_event_type type,
> + enum iio_event_direction dir,
> + enum iio_event_info info,
> + int val, int val2)

Same here.

The rest is correct though.

--
Kind regards

CJD