All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c
@ 2014-08-06 19:01 Konrad Zapalowicz
  2014-08-06 19:01 ` [PATCH 1/5] staging: dgnc: Fix included header from 'asm' Konrad Zapalowicz
  2014-08-07  0:04 ` [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c Greg KH
  0 siblings, 2 replies; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 19:01 UTC (permalink / raw)
  To: lidza.louina; +Cc: markh, gregkh, driverdev-devel, devel, Konrad Zapalowicz

This series of patches deals with the checkpatch error and warnings,
other than 'line length over 80 chars', found in dgnc_neo.c file. All
except of patch 5/5 do not change the behavior.

Konrad Zapalowicz (5):
  staging: dgnc: Fix included header from 'asm'
  staging: dgnc: Fix missing blank line after declarations
  staging: dgnc: Fix that open brace { should be on the previous line
  staging: dgnc: Fix braces {} are not necessary for single statement
    blocks
  staging: dgnc: Remove 'volatile' modifier where it is not needed

 drivers/staging/dgnc/dgnc_neo.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

-- 
1.8.1.2

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

* [PATCH 1/5] staging: dgnc: Fix included header from 'asm'
  2014-08-06 19:01 [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c Konrad Zapalowicz
@ 2014-08-06 19:01 ` Konrad Zapalowicz
  2014-08-06 19:01   ` [PATCH 2/5] staging: dgnc: Fix missing blank line after declarations Konrad Zapalowicz
  2014-08-07  0:04 ` [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c Greg KH
  1 sibling, 1 reply; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 19:01 UTC (permalink / raw)
  To: lidza.louina; +Cc: markh, gregkh, driverdev-devel, devel, Konrad Zapalowicz

This commit fixes the checkpatch warning:

drivers/staging/dgnc/dgnc_neo.c:37:
    WARNING: Use #include <linux/io.h> instead of <asm/io.h>

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
---
 drivers/staging/dgnc/dgnc_neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 68ff116..d58aaa0 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -34,7 +34,7 @@
 #include <linux/sched.h>	/* For jiffies, task states */
 #include <linux/interrupt.h>    /* For tasklet and interrupt structs/defines */
 #include <linux/delay.h>	/* For udelay */
-#include <asm/io.h>		/* For read[bwl]/write[bwl] */
+#include <linux/io.h>		/* For read[bwl]/write[bwl] */
 #include <linux/serial.h>	/* For struct async_serial */
 #include <linux/serial_reg.h>	/* For the various UART offsets */
 
-- 
1.8.1.2

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

* [PATCH 2/5] staging: dgnc: Fix missing blank line after declarations
  2014-08-06 19:01 ` [PATCH 1/5] staging: dgnc: Fix included header from 'asm' Konrad Zapalowicz
@ 2014-08-06 19:01   ` Konrad Zapalowicz
  2014-08-06 19:01     ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Konrad Zapalowicz
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 19:01 UTC (permalink / raw)
  To: lidza.louina; +Cc: markh, gregkh, driverdev-devel, devel, Konrad Zapalowicz

This commit deals with the checkapth warnings 'missing line after
declarations' in the dgnc_neo.c file.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
---
 drivers/staging/dgnc/dgnc_neo.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index d58aaa0..79684a3 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -397,6 +397,7 @@ static inline void neo_clear_break(struct channel_t *ch, int force)
 		if (time_after_eq(jiffies, ch->ch_stop_sending_break)
 		    || force) {
 			uchar temp = readb(&ch->ch_neo_uart->lcr);
+
 			writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
 			neo_pci_posting_flush(ch->ch_bd);
 			ch->ch_flags &= ~(CH_BREAK_SENDING);
@@ -1138,6 +1139,7 @@ static irqreturn_t neo_intr(int irq, void *voidbrd)
 static void neo_disable_receiver(struct channel_t *ch)
 {
 	uchar tmp = readb(&ch->ch_neo_uart->ier);
+
 	tmp &= ~(UART_IER_RDI);
 	writeb(tmp, &ch->ch_neo_uart->ier);
 	neo_pci_posting_flush(ch->ch_bd);
@@ -1152,6 +1154,7 @@ static void neo_disable_receiver(struct channel_t *ch)
 static void neo_enable_receiver(struct channel_t *ch)
 {
 	uchar tmp = readb(&ch->ch_neo_uart->ier);
+
 	tmp |= (UART_IER_RDI);
 	writeb(tmp, &ch->ch_neo_uart->ier);
 	neo_pci_posting_flush(ch->ch_bd);
@@ -1324,6 +1327,7 @@ static void neo_copy_data_from_uart_to_queue(struct channel_t *ch)
 		 */
 		if (linestatus & error_mask)  {
 			uchar discard;
+
 			linestatus = 0;
 			memcpy_fromio(&discard, &ch->ch_neo_uart->txrxburst, 1);
 			continue;
@@ -1822,6 +1826,7 @@ static void neo_send_break(struct channel_t *ch, int msecs)
 	if (msecs == 0) {
 		if (ch->ch_flags & CH_BREAK_SENDING) {
 			uchar temp = readb(&ch->ch_neo_uart->lcr);
+
 			writeb((temp & ~UART_LCR_SBC), &ch->ch_neo_uart->lcr);
 			neo_pci_posting_flush(ch->ch_bd);
 			ch->ch_flags &= ~(CH_BREAK_SENDING);
@@ -1841,6 +1846,7 @@ static void neo_send_break(struct channel_t *ch, int msecs)
 	/* Tell the UART to start sending the break */
 	if (!(ch->ch_flags & CH_BREAK_SENDING)) {
 		uchar temp = readb(&ch->ch_neo_uart->lcr);
+		
 		writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr);
 		neo_pci_posting_flush(ch->ch_bd);
 		ch->ch_flags |= (CH_BREAK_SENDING);
-- 
1.8.1.2

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

* [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
  2014-08-06 19:01   ` [PATCH 2/5] staging: dgnc: Fix missing blank line after declarations Konrad Zapalowicz
@ 2014-08-06 19:01     ` Konrad Zapalowicz
  2014-08-06 19:01       ` [PATCH 4/5] staging: dgnc: Fix braces {} are not necessary for single statement blocks Konrad Zapalowicz
  2014-08-06 20:28       ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Dan Carpenter
  0 siblings, 2 replies; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 19:01 UTC (permalink / raw)
  To: lidza.louina; +Cc: markh, gregkh, driverdev-devel, devel, Konrad Zapalowicz

This commit fixes the following checkpath error in dgnc_neo.c file:
'that open brace { should be on the previous line'

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
---
 drivers/staging/dgnc/dgnc_neo.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 79684a3..e6aeda3 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1846,7 +1846,7 @@ static void neo_send_break(struct channel_t *ch, int msecs)
 	/* Tell the UART to start sending the break */
 	if (!(ch->ch_flags & CH_BREAK_SENDING)) {
 		uchar temp = readb(&ch->ch_neo_uart->lcr);
-		
+
 		writeb((temp | UART_LCR_SBC), &ch->ch_neo_uart->lcr);
 		neo_pci_posting_flush(ch->ch_bd);
 		ch->ch_flags |= (CH_BREAK_SENDING);
@@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd)
 
 	if  (((brd->vpd[0x08] != 0x82)	   /* long resource name tag */
 		&&  (brd->vpd[0x10] != 0x82))   /* long resource name tag (PCI-66 files)*/
-		||  (brd->vpd[0x7F] != 0x78))   /* small resource end tag */
-	{
+		||  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
+
 		memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
 	} else {
 		/* Search for the serial number */
-- 
1.8.1.2

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

* [PATCH 4/5] staging: dgnc: Fix braces {} are not necessary for single statement blocks
  2014-08-06 19:01     ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Konrad Zapalowicz
@ 2014-08-06 19:01       ` Konrad Zapalowicz
  2014-08-06 19:01         ` [PATCH 5/5] staging: dgnc: Remove 'volatile' modifier where it is not needed Konrad Zapalowicz
  2014-08-06 20:28       ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Dan Carpenter
  1 sibling, 1 reply; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 19:01 UTC (permalink / raw)
  To: lidza.louina; +Cc: gregkh, driverdev-devel, Konrad Zapalowicz, devel

This commit fixes the following checkpath warning in dgnc_neo.c file:
'braces {} are not necessary for single statement blocks'

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
---
 drivers/staging/dgnc/dgnc_neo.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index e6aeda3..b4198e0 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1804,9 +1804,8 @@ static uint neo_get_uart_bytes_left(struct channel_t *ch)
 
 	/* Determine whether the Transmitter is empty or not */
 	if (!(lsr & UART_LSR_TEMT)) {
-		if (ch->ch_flags & CH_TX_FIFO_EMPTY) {
+		if (ch->ch_flags & CH_TX_FIFO_EMPTY)
 			tasklet_schedule(&ch->ch_bd->helper_tasklet);
-		}
 		left = 1;
 	} else {
 		ch->ch_flags |= (CH_TX_FIFO_EMPTY | CH_TX_FIFO_LWM);
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 5/5] staging: dgnc: Remove 'volatile' modifier where it is not needed
  2014-08-06 19:01       ` [PATCH 4/5] staging: dgnc: Fix braces {} are not necessary for single statement blocks Konrad Zapalowicz
@ 2014-08-06 19:01         ` Konrad Zapalowicz
  0 siblings, 0 replies; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 19:01 UTC (permalink / raw)
  To: lidza.louina; +Cc: gregkh, driverdev-devel, Konrad Zapalowicz, devel

This commit fixes the checkpath warning about misused 'volatile'
modifier. In this case the 'volatile' was not needed as it was used
for regular automatic variable. Thos commit removes the 'volatile'.

Signed-off-by: Konrad Zapalowicz <bergo.torino@gmail.com>
---
 drivers/staging/dgnc/dgnc_neo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index b4198e0..86a1cd7 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -1640,7 +1640,7 @@ static void neo_copy_data_from_queue_to_uart(struct channel_t *ch)
 
 static void neo_parse_modem(struct channel_t *ch, uchar signals)
 {
-	volatile uchar msignals = signals;
+	uchar msignals = signals;
 
 	if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
 		return;
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
  2014-08-06 19:01     ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Konrad Zapalowicz
  2014-08-06 19:01       ` [PATCH 4/5] staging: dgnc: Fix braces {} are not necessary for single statement blocks Konrad Zapalowicz
@ 2014-08-06 20:28       ` Dan Carpenter
  2014-08-06 20:35         ` Konrad Zapalowicz
  1 sibling, 1 reply; 9+ messages in thread
From: Dan Carpenter @ 2014-08-06 20:28 UTC (permalink / raw)
  To: Konrad Zapalowicz; +Cc: devel, lidza.louina, driverdev-devel, gregkh

On Wed, Aug 06, 2014 at 09:01:24PM +0200, Konrad Zapalowicz wrote:
> @@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd)
>  
>  	if  (((brd->vpd[0x08] != 0x82)	   /* long resource name tag */
>  		&&  (brd->vpd[0x10] != 0x82))   /* long resource name tag (PCI-66 files)*/
> -		||  (brd->vpd[0x7F] != 0x78))   /* small resource end tag */
> -	{
> +		||  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
> +

This condition should really be written like this:

	if  ((brd->vpd[0x08] != 0x82 &&  /* long resource name tag */
	      brd->vpd[0x10] != 0x82) || /* (PCI-66 files) */
	     brd->vpd[0x7F] != 0x78) {   /* small resource end tag */

Except that the magical numbers should be defines and then we could
remove the comments.

This stuff could be changed in a later patch, no worries.

TODO-list: 2014-08-06: dgnc: Too many magic numbers

regards,
dan carpenter

>  		memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
>  	} else {
>  		/* Search for the serial number */

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
  2014-08-06 20:28       ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Dan Carpenter
@ 2014-08-06 20:35         ` Konrad Zapalowicz
  0 siblings, 0 replies; 9+ messages in thread
From: Konrad Zapalowicz @ 2014-08-06 20:35 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: devel, lidza.louina, driverdev-devel, gregkh

On 08/06, Dan Carpenter wrote:
> On Wed, Aug 06, 2014 at 09:01:24PM +0200, Konrad Zapalowicz wrote:
> > @@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd)
> >  
> >  	if  (((brd->vpd[0x08] != 0x82)	   /* long resource name tag */
> >  		&&  (brd->vpd[0x10] != 0x82))   /* long resource name tag (PCI-66 files)*/
> > -		||  (brd->vpd[0x7F] != 0x78))   /* small resource end tag */
> > -	{
> > +		||  (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
> > +
> 
> This condition should really be written like this:
> 
> 	if  ((brd->vpd[0x08] != 0x82 &&  /* long resource name tag */
> 	      brd->vpd[0x10] != 0x82) || /* (PCI-66 files) */
> 	     brd->vpd[0x7F] != 0x78) {   /* small resource end tag */
> 
> Except that the magical numbers should be defines and then we could
> remove the comments.
> 
> This stuff could be changed in a later patch, no worries.

True, thanks for hint. Definitely something to look into in the future. 

> TODO-list: 2014-08-06: dgnc: Too many magic numbers
> 
> regards,
> dan carpenter
> 
> >  		memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
> >  	} else {
> >  		/* Search for the serial number */
> 
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c
  2014-08-06 19:01 [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c Konrad Zapalowicz
  2014-08-06 19:01 ` [PATCH 1/5] staging: dgnc: Fix included header from 'asm' Konrad Zapalowicz
@ 2014-08-07  0:04 ` Greg KH
  1 sibling, 0 replies; 9+ messages in thread
From: Greg KH @ 2014-08-07  0:04 UTC (permalink / raw)
  To: Konrad Zapalowicz; +Cc: lidza.louina, driverdev-devel, devel

On Wed, Aug 06, 2014 at 09:01:21PM +0200, Konrad Zapalowicz wrote:
> This series of patches deals with the checkpatch error and warnings,
> other than 'line length over 80 chars', found in dgnc_neo.c file. All
> except of patch 5/5 do not change the behavior.
> 
> Konrad Zapalowicz (5):
>   staging: dgnc: Fix included header from 'asm'
>   staging: dgnc: Fix missing blank line after declarations
>   staging: dgnc: Fix that open brace { should be on the previous line
>   staging: dgnc: Fix braces {} are not necessary for single statement
>     blocks
>   staging: dgnc: Remove 'volatile' modifier where it is not needed
> 
>  drivers/staging/dgnc/dgnc_neo.c | 17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)


Hi,

This is the friendly semi-automated patch-bot of Greg Kroah-Hartman.
You have sent him a patch that has triggered this response.

Right now, the development tree you have sent a patch for is "closed"
due to the timing of the merge window.  Don't worry, the patch(es) you
have sent are not lost, and will be looked at after the merge window is
over (after the -rc1 kernel is released by Linus).

So thank you for your patience and your patches will be reviewed at this
later time, you do not have to do anything further, this is just a short
note to let you know the patch status and so you don't worry they didn't
make it through.

thanks,

greg k-h's patch email bot
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2014-08-07  0:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 19:01 [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c Konrad Zapalowicz
2014-08-06 19:01 ` [PATCH 1/5] staging: dgnc: Fix included header from 'asm' Konrad Zapalowicz
2014-08-06 19:01   ` [PATCH 2/5] staging: dgnc: Fix missing blank line after declarations Konrad Zapalowicz
2014-08-06 19:01     ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Konrad Zapalowicz
2014-08-06 19:01       ` [PATCH 4/5] staging: dgnc: Fix braces {} are not necessary for single statement blocks Konrad Zapalowicz
2014-08-06 19:01         ` [PATCH 5/5] staging: dgnc: Remove 'volatile' modifier where it is not needed Konrad Zapalowicz
2014-08-06 20:28       ` [PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line Dan Carpenter
2014-08-06 20:35         ` Konrad Zapalowicz
2014-08-07  0:04 ` [PATCH 0/5] staging: dgnc: Fix checkpath issues in dgnc_neo.c Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.