[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20191202063555.0f75e68f@kernel.org>
Date: Mon, 2 Dec 2019 06:35:55 +0100
From: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Amit Choudhary <amitchoudhary2305@...il.com>
Cc: "Daniel W. S. Almeida" <dwlsalmeida@...il.com>,
gregkh@...uxfoundation.org, rfontana@...hat.com,
kstewart@...uxfoundation.org, tglx@...utronix.de,
skhan@...uxfoundation.org,
linux-kernel-mentees@...ts.linuxfoundation.org,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] media: dvb_dummy_fe: Fix long lines
Em Sun, 1 Dec 2019 22:07:22 +0530
Amit Choudhary <amitchoudhary2305@...il.com> escreveu:
> +static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend *fe,
>
> > + u16 *strength)
> >
>
> In my opinion, the arguments on new line should be just below the start of
> arguments on top line. Like this:
>
> +static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend *fe,
> + u16
> *strength)
No, that is not the way we indent. The alignment is relative to the open
parenthesis:
foo(arg1,
arg2);
Btw, if you run checkpatch --strict, you'll see it complaining if the
alignment is different:
CHECK: Alignment should match open parenthesis
#2: FILE: a.c:2:
+void foo(int arg1,
+ int arg2)
> + .caps = FE_CAN_FEC_1_2 |
> > + FE_CAN_FEC_2_3 |
The alignment here is given by the first argument:
bitfield = BIT_1 |
BIT_2 |
BIT_3 |
...
or
bitfield = BIT_1
| BIT_2
| BIT_3
...
On media, we usually prefer the first form.
Cheers,
Mauro
Powered by blists - more mailing lists