Messages in this thread |  | | Date | Wed, 6 May 2026 18:53:59 +0100 | | From | Jonathan Cameron <> | | Subject | Re: [PATCH v3 03/10] iio: accel: mma8452: cleanup codestyle warning |
| |
On Wed, 6 May 2026 11:24:25 +0200 Joshua Crofts <joshua.crofts1@gmail.com> wrote:
> On Tue, 5 May 2026 at 19:48, Sanjay Chitroda <sanjayembeddedse@gmail.com> wrote: > > > > From: Sanjay Chitroda <sanjayembeddedse@gmail.com> > > > > Reported by checkpatch: > > FILE: drivers/iio/accel/mma8452.c > > > > CHECK: Alignment should match open parenthesis > > > > Signed-off-by: Sanjay Chitroda <sanjayembeddedse@gmail.com> > > --- > > 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.
Hi Joshua,
Trap of reading patches in emails is that tabs and space combinations don't always look correct. Also your email client replaced them all with spaces to add more confusion ;)
From origin patch
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) {
With the leading chars removed removes one space from top line but nothing from the following ones as they have leading tabs.
So you get:
static int __mma8452_write_raw(struct iio_dev *indio_dev, struct iio_chan_spec const *chan, int val, int val2, long mask) {
So this is fine. I haven't checked the others but guess they are the same.
I frequently end up testing this by hand when I think indents are off and often turns out I'm wrong!
...
> > The rest is correct though. They all have leading tabs on all lines.
Jonathan
|  |