public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h
@ 2014-12-03 17:07 Sean Cleator
  2014-12-03 17:34 ` Greg KH
  2014-12-03 18:18 ` Valdis.Kletnieks
  0 siblings, 2 replies; 4+ messages in thread
From: Sean Cleator @ 2014-12-03 17:07 UTC (permalink / raw)
  To: lidza.louina, markh
  Cc: gregkh, driverdev-devel, devel, linux-kernel, Sean Cleator

A patch to fix the rest of the long line warnings in the dgnc_cls.h file
found by the checkpatch.pl tool

Signed-off-by: Sean Cleator <seancleator@hotmail.co.uk>

---
 drivers/staging/dgnc/dgnc_cls.h | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
index 465d79a..32034e4 100644
--- a/drivers/staging/dgnc/dgnc_cls.h
+++ b/drivers/staging/dgnc/dgnc_cls.h
@@ -38,7 +38,10 @@
 struct cls_uart_struct {
 	u8 txrx;		/* WR  RHR/THR - Holding Reg */
 	u8 ier;		/* WR  IER - Interrupt Enable Reg */
-	u8 isr_fcr;		/* WR  ISR/FCR - Interrupt Status Reg/Fifo Control Reg */
+	u8 isr_fcr;		/*
+				 * WR  ISR/FCR - Interrupt Status Reg/Fifo
+				 * Control Reg
+				 */
 	u8 lcr;		/* WR  LCR - Line Control Reg */
 	u8 mcr;		/* WR  MCR - Modem Control Reg */
 	u8 lsr;		/* WR  LSR - Line Status Reg */
@@ -61,8 +64,11 @@ struct cls_uart_struct {
 #define UART_16654_FCR_RXTRIGGER_56	0x80
 #define UART_16654_FCR_RXTRIGGER_60     0xC0
 
-#define UART_IIR_CTSRTS			0x20	/* Received CTS/RTS change of state */
-#define UART_IIR_RDI_TIMEOUT		0x0C    /* Receiver data TIMEOUT */
+#define UART_IIR_CTSRTS			0x20	/*
+						 *  Received CTS/RTS change of
+						 *  state
+						 */
+#define UART_IIR_RDI_TIMEOUT		0x0C	/* Receiver data TIMEOUT */
 
 /*
  * These are the EXTENDED definitions for the Exar 654's Interrupt
@@ -74,8 +80,14 @@ struct cls_uart_struct {
 #define UART_EXAR654_EFR_RTSDTR   0x40    /* Auto RTS/DTR Flow Control Enable */
 #define UART_EXAR654_EFR_CTSDSR   0x80    /* Auto CTS/DSR Flow COntrol Enable */
 
-#define UART_EXAR654_XOFF_DETECT  0x1     /* Indicates whether chip saw an incoming XOFF char  */
-#define UART_EXAR654_XON_DETECT   0x2     /* Indicates whether chip saw an incoming XON char */
+#define UART_EXAR654_XOFF_DETECT  0x1     /*
+					   * Indicates whether chip saw an
+					   * incoming XOFF char
+					   */
+#define UART_EXAR654_XON_DETECT   0x2     /*
+					   * Indicates whether chip saw an
+					   * incoming XON char
+					   */
 
 #define UART_EXAR654_IER_XOFF     0x20    /* Xoff Interrupt Enable */
 #define UART_EXAR654_IER_RTSDTR   0x40    /* Output Interrupt Enable */
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h
  2014-12-03 17:07 [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h Sean Cleator
@ 2014-12-03 17:34 ` Greg KH
  2014-12-03 18:10   ` Dan Carpenter
  2014-12-03 18:18 ` Valdis.Kletnieks
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2014-12-03 17:34 UTC (permalink / raw)
  To: Sean Cleator; +Cc: lidza.louina, markh, driverdev-devel, devel, linux-kernel

On Wed, Dec 03, 2014 at 05:07:28PM +0000, Sean Cleator wrote:
> A patch to fix the rest of the long line warnings in the dgnc_cls.h file
> found by the checkpatch.pl tool
> 
> Signed-off-by: Sean Cleator <seancleator@hotmail.co.uk>
> 
> ---
>  drivers/staging/dgnc/dgnc_cls.h | 22 +++++++++++++++++-----
>  1 file changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_cls.h b/drivers/staging/dgnc/dgnc_cls.h
> index 465d79a..32034e4 100644
> --- a/drivers/staging/dgnc/dgnc_cls.h
> +++ b/drivers/staging/dgnc/dgnc_cls.h
> @@ -38,7 +38,10 @@
>  struct cls_uart_struct {
>  	u8 txrx;		/* WR  RHR/THR - Holding Reg */
>  	u8 ier;		/* WR  IER - Interrupt Enable Reg */
> -	u8 isr_fcr;		/* WR  ISR/FCR - Interrupt Status Reg/Fifo Control Reg */
> +	u8 isr_fcr;		/*
> +				 * WR  ISR/FCR - Interrupt Status Reg/Fifo
> +				 * Control Reg
> +				 */
>  	u8 lcr;		/* WR  LCR - Line Control Reg */
>  	u8 mcr;		/* WR  MCR - Modem Control Reg */
>  	u8 lsr;		/* WR  LSR - Line Status Reg */
> @@ -61,8 +64,11 @@ struct cls_uart_struct {
>  #define UART_16654_FCR_RXTRIGGER_56	0x80
>  #define UART_16654_FCR_RXTRIGGER_60     0xC0
>  
> -#define UART_IIR_CTSRTS			0x20	/* Received CTS/RTS change of state */
> -#define UART_IIR_RDI_TIMEOUT		0x0C    /* Receiver data TIMEOUT */
> +#define UART_IIR_CTSRTS			0x20	/*
> +						 *  Received CTS/RTS change of
> +						 *  state
> +						 */

That's pretty ugly, don't you think?  How about putting the comments on
the line before the #define, instead of at the end?  That would make
things much nicer to read.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h
  2014-12-03 17:34 ` Greg KH
@ 2014-12-03 18:10   ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2014-12-03 18:10 UTC (permalink / raw)
  To: Greg KH; +Cc: Sean Cleator, lidza.louina, driverdev-devel, linux-kernel, devel

On Wed, Dec 03, 2014 at 09:34:41AM -0800, Greg KH wrote:
> > +#define UART_IIR_CTSRTS			0x20	/*
> > +						 *  Received CTS/RTS change of
> > +						 *  state
> > +						 */
> 
> That's pretty ugly, don't you think?  How about putting the comments on
> the line before the #define, instead of at the end?  That would make
> things much nicer to read.
> 

I was going to say the same thing but it looks worse in the mail client
because of how the tabs work out.  In the code it doesn't look terrible.

#define UART_IIR_CTSRTS			0x20	/*
						 *  Received CTS/RTS change of
						 *  state
						 */

Another idea would be to just remove a tab.  It wouldn't align with the
section before but it would align with the next section down.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h
  2014-12-03 17:07 [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h Sean Cleator
  2014-12-03 17:34 ` Greg KH
@ 2014-12-03 18:18 ` Valdis.Kletnieks
  1 sibling, 0 replies; 4+ messages in thread
From: Valdis.Kletnieks @ 2014-12-03 18:18 UTC (permalink / raw)
  To: Sean Cleator
  Cc: lidza.louina, markh, gregkh, driverdev-devel, devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 669 bytes --]

On Wed, 03 Dec 2014 17:07:28 +0000, Sean Cleator said:
> A patch to fix the rest of the long line warnings in the dgnc_cls.h file
> found by the checkpatch.pl tool

>  struct cls_uart_struct {
>  	u8 txrx;		/* WR  RHR/THR - Holding Reg */
>  	u8 ier;		/* WR  IER - Interrupt Enable Reg */
> -	u8 isr_fcr;		/* WR  ISR/FCR - Interrupt Status Reg/Fifo Control Reg */
> +	u8 isr_fcr;		/*
> +				 * WR  ISR/FCR - Interrupt Status Reg/Fifo
> +				 * Control Reg
> +				 */
>  	u8 lcr;		/* WR  LCR - Line Control Reg */
>  	u8 mcr;		/* WR  MCR - Modem Control Reg */
>  	u8 lsr;		/* WR  LSR - Line Status Reg */

It may shut up the warning, but is this really an improvement?

[-- Attachment #2: Type: application/pgp-signature, Size: 848 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-03 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 17:07 [PATCH] Staging: dgnc: Fix long line coding style issues in dgnc_cls.h Sean Cleator
2014-12-03 17:34 ` Greg KH
2014-12-03 18:10   ` Dan Carpenter
2014-12-03 18:18 ` Valdis.Kletnieks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox