Re: [PATCH 4/6] media: dvb_dummy_fe: Fix long lines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Sun, 1 Dec 2019 22:07:22 +0530
Amit Choudhary <amitchoudhary2305@xxxxxxxxx> 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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux