Re: [PATCH 2/2] Staging: dgnc: fixed code style issues, mainly line width issues.

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

 



On Sun, Apr 19, 2015 at 02:04:39AM +0200, Yorick Rommers wrote:
> A patch for dgnc_mgmt.c and dgnc_neo.c to fix some code style issues.
> 
> Signed-off-by: Yorick Rommers <yorick-rommers@xxxxxxxxxxx>
> ---
>  drivers/staging/dgnc/dgnc_mgmt.c |   4 +-
>  drivers/staging/dgnc/dgnc_neo.c  | 210 +++++++++++++++++++++++++++------------
>  2 files changed, 151 insertions(+), 63 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_mgmt.c b/drivers/staging/dgnc/dgnc_mgmt.c
> index b13318a..2385da8 100644
> --- a/drivers/staging/dgnc/dgnc_mgmt.c
> +++ b/drivers/staging/dgnc/dgnc_mgmt.c
> @@ -148,7 +148,9 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  		di.info_bdstate = dgnc_Board[brd]->dpastatus;
>  		di.info_ioport = 0;
>  		di.info_physaddr = (ulong) dgnc_Board[brd]->membase;
> -		di.info_physsize = (ulong) dgnc_Board[brd]->membase - dgnc_Board[brd]->membase_end;
> +		di.info_physsize =
> +		(ulong) dgnc_Board[brd]->membase - dgnc_Board[brd]->membase_end;

New indenting is bad.

> +
>  		if (dgnc_Board[brd]->state != BOARD_FAILED)
>  			di.info_nports = dgnc_Board[brd]->nasync;
>  		else
> diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
> index f5a4d36..23afd78 100644
> --- a/drivers/staging/dgnc/dgnc_neo.c
> +++ b/drivers/staging/dgnc/dgnc_neo.c
> @@ -79,7 +79,8 @@ struct board_ops dgnc_neo_ops = {
>  	.send_immediate_char =		neo_send_immediate_char
>  };
> 
> -static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 };
> +static uint dgnc_offset_table[8] = { 0x01, 0x02, 0x04, 0x08,
> +0x10, 0x20, 0x40, 0x80 };

New indenting is bad.


> @@ -333,7 +358,8 @@ static inline void neo_set_new_start_stop_chars(struct channel_t *ch)
>  {
> 
>  	/* if hardware flow control is set, then skip this whole thing */
> -	if (ch->ch_digi.digi_flags & (CTSPACE | RTSPACE) || ch->ch_c_cflag & CRTSCTS)
> +	if (ch->ch_digi.digi_flags &
> +	(CTSPACE | RTSPACE) || ch->ch_c_cflag & CRTSCTS)

New indenting is bad.  It should be:

	if (ch->ch_digi.digi_flags & (CTSPACE | RTSPACE) ||
	    ch->ch_c_cflag & CRTSCTS)

There are several more mistakes with the patch but you get the idea.

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux