linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] Staging: cxt1e1: Fix line length over 80 characters in musycc.c
@ 2014-05-09  1:39 Daeseok Youn
  2014-05-09  8:07 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Daeseok Youn @ 2014-05-09  1:39 UTC (permalink / raw)
  To: gregkh
  Cc: daeseok.youn, himangi774, peter.p.waskiewicz.jr, sachin.kamat,
	fempsci, nandu.hgowda, devel, linux-kernel

clean up checkpatch.pl warning
 WARNING: Line length over 80 characters

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/cxt1e1/musycc.c |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c
index 71bcef3..89f905d 100644
--- a/drivers/staging/cxt1e1/musycc.c
+++ b/drivers/staging/cxt1e1/musycc.c
@@ -392,7 +392,8 @@ musycc_wq_chan_restart(void *arg)      /* channel private structure */
 #endif
 		}
 #endif
-		musycc_serv_req(pi, SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION | ch->gchan);
+		musycc_serv_req(pi, SR_CHANNEL_ACTIVATE |
+				SR_RX_DIRECTION | ch->gchan);
 	}
 
 	/* check for TX restart request */
@@ -816,9 +817,10 @@ musycc_init(ci_t *ci)
 		}
 		/* save orig value for free's usage */
 		pi->regram_saved = regaddr;
-		pi->regram = (struct musycc_groupr *)((unsigned long)(regaddr + GROUP_BOUNDARY - 1) &
-				(~(GROUP_BOUNDARY - 1)));        /* this calculates
-								  * closest boundary */
+		/* this calculates closest boundary */
+		pi->regram = (struct musycc_groupr *)((unsigned long)(regaddr +
+						      GROUP_BOUNDARY - 1) &
+						      (~(GROUP_BOUNDARY - 1)));
 	}
 
 	/* any board centric MUSYCC commands will use group ZERO as its "home" */
@@ -1100,7 +1102,9 @@ musycc_bh_rx_eom(mpi_t *pi, int gchan)
 			 */
 			if (hdlcnum >= 228) {
 				if (nciProcess_RX_packet)
-					(*nciProcess_RX_packet) (hdlcnum, status & 0x3fff, m, ch->user);
+					(*nciProcess_RX_packet)(hdlcnum, status &
+								0x3fff, m,
+								ch->user);
 			} else
 #endif /* CONFIG_SBE_WAN256T3_NCOMM */
 			{
@@ -1379,7 +1383,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
 			else
 				ci->iqd_p[headx] =
 					__constant_cpu_to_le32(INT_EMPTY_ENTRY);
-			ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1); /* insure wrapness */
+			/* insure wrapness */
+			ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1);
 			FLUSH_MEM_WRITE();
 			FLUSH_MEM_READ();
 			continue;
@@ -1516,7 +1521,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
 					pr_info("%s: RX buffer overflow [ONR] on channel %d, mode %x\n",
 						ci->devname, ch->channum,
 						ch->p.chan_mode);
-					//musycc_dump_rxbuffer_ring (ch, 0);        /* RLD DEBUG */
+					/* RLD DEBUG */
+					//musycc_dump_rxbuffer_ring (ch, 0);
 				}
 			}
 			musycc_chan_restart(ch);
@@ -1573,7 +1579,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
 		} /* switch on err */
 
 		/* Check for interrupt lost condition */
-		if ((currInt & INTRPT_ILOST_M) && (cxt1e1_log_level >= LOG_ERROR))
+		if ((currInt & INTRPT_ILOST_M) &&
+		    (cxt1e1_log_level >= LOG_ERROR))
 			pr_info("%s: Interrupt queue overflow - ILOST asserted\n",
 				ci->devname);
 		/* insure wrapness */
@@ -1684,7 +1691,8 @@ musycc_del_chan(ci_t *ci, int channum)
 {
 	mch_t      *ch;
 
-	if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)))  /* sanity chk param */
+	/* sanity chk param */
+	if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)))
 		return ECHRNG;
 	ch = sd_find_chan(ci, channum);
 	if (!ch)
@@ -1749,7 +1757,8 @@ musycc_start_xmit(ci_t *ci, int channum, void *mem_token)
 	{
 		pr_info("++ start_xmt[%d]: state %x start %x full %d free %d required %d stopped %x\n",
 			channum, ch->state, ch->ch_start_tx, ch->tx_full,
-			ch->txd_free, ch->txd_required, sd_queue_stopped(ch->user));
+			ch->txd_free, ch->txd_required,
+			sd_queue_stopped(ch->user));
 	}
 
 	/* Determine total amount of data to be sent */
-- 
1.7.1


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

* Re: [PATCH 2/3] Staging: cxt1e1: Fix line length over 80 characters in musycc.c
  2014-05-09  1:39 [PATCH 2/3] Staging: cxt1e1: Fix line length over 80 characters in musycc.c Daeseok Youn
@ 2014-05-09  8:07 ` Dan Carpenter
  2014-05-09  8:26   ` DaeSeok Youn
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-05-09  8:07 UTC (permalink / raw)
  To: Daeseok Youn
  Cc: gregkh, devel, nandu.hgowda, sachin.kamat, peter.p.waskiewicz.jr,
	linux-kernel, himangi774, fempsci

This patch is ok, but here are some additional hints.

On Fri, May 09, 2014 at 10:39:48AM +0900, Daeseok Youn wrote:
> @@ -1100,7 +1102,9 @@ musycc_bh_rx_eom(mpi_t *pi, int gchan)
>  			 */
>  			if (hdlcnum >= 228) {
>  				if (nciProcess_RX_packet)
> -					(*nciProcess_RX_packet) (hdlcnum, status & 0x3fff, m, ch->user);
> +					(*nciProcess_RX_packet)(hdlcnum, status &
> +								0x3fff, m,
> +								ch->user);

It's possible to break this one up at the commas.

					(*nciProcess_RX_packet)(hdlcnum,
								status & 0x3fff,
								m, ch->user);

>  			} else
>  #endif /* CONFIG_SBE_WAN256T3_NCOMM */
>  			{
> @@ -1379,7 +1383,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
>  			else
>  				ci->iqd_p[headx] =
>  					__constant_cpu_to_le32(INT_EMPTY_ENTRY);
> -			ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1); /* insure wrapness */
> +			/* insure wrapness */
> +			ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1);
>  			FLUSH_MEM_WRITE();
>  			FLUSH_MEM_READ();
>  			continue;
> @@ -1516,7 +1521,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
>  					pr_info("%s: RX buffer overflow [ONR] on channel %d, mode %x\n",
>  						ci->devname, ch->channum,
>  						ch->p.chan_mode);
> -					//musycc_dump_rxbuffer_ring (ch, 0);        /* RLD DEBUG */
> +					/* RLD DEBUG */
> +					//musycc_dump_rxbuffer_ring (ch, 0);

Just delete this commented out code.

>  				}
>  			}
>  			musycc_chan_restart(ch);
> @@ -1573,7 +1579,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
>  		} /* switch on err */
>  
>  		/* Check for interrupt lost condition */
> -		if ((currInt & INTRPT_ILOST_M) && (cxt1e1_log_level >= LOG_ERROR))
> +		if ((currInt & INTRPT_ILOST_M) &&
> +		    (cxt1e1_log_level >= LOG_ERROR))
>  			pr_info("%s: Interrupt queue overflow - ILOST asserted\n",
>  				ci->devname);
>  		/* insure wrapness */
> @@ -1684,7 +1691,8 @@ musycc_del_chan(ci_t *ci, int channum)
>  {
>  	mch_t      *ch;
>  
> -	if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)))  /* sanity chk param */
> +	/* sanity chk param */

This kind of comment is too obvious.  Just delete it.

> +	if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)))
>  		return ECHRNG;
>  	ch = sd_find_chan(ci, channum);
>  	if (!ch)

regards,
dan carpenter

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

* Re: [PATCH 2/3] Staging: cxt1e1: Fix line length over 80 characters in musycc.c
  2014-05-09  8:07 ` Dan Carpenter
@ 2014-05-09  8:26   ` DaeSeok Youn
  0 siblings, 0 replies; 3+ messages in thread
From: DaeSeok Youn @ 2014-05-09  8:26 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg KH, devel, nandini h, sachin.kamat, peter.p.waskiewicz.jr,
	linux-kernel, Himangi Saraogi, Chekameh Cobbler

2014-05-09 17:07 GMT+09:00 Dan Carpenter <dan.carpenter@oracle.com>:
> This patch is ok, but here are some additional hints.
>
> On Fri, May 09, 2014 at 10:39:48AM +0900, Daeseok Youn wrote:
>> @@ -1100,7 +1102,9 @@ musycc_bh_rx_eom(mpi_t *pi, int gchan)
>>                        */
>>                       if (hdlcnum >= 228) {
>>                               if (nciProcess_RX_packet)
>> -                                     (*nciProcess_RX_packet) (hdlcnum, status & 0x3fff, m, ch->user);
>> +                                     (*nciProcess_RX_packet)(hdlcnum, status &
>> +                                                             0x3fff, m,
>> +                                                             ch->user);
>
> It's possible to break this one up at the commas.
Oh.. I will do that.
>
>                                         (*nciProcess_RX_packet)(hdlcnum,
>                                                                 status & 0x3fff,
>                                                                 m, ch->user);
>
>>                       } else
>>  #endif /* CONFIG_SBE_WAN256T3_NCOMM */
>>                       {
>> @@ -1379,7 +1383,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
>>                       else
>>                               ci->iqd_p[headx] =
>>                                       __constant_cpu_to_le32(INT_EMPTY_ENTRY);
>> -                     ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1); /* insure wrapness */
>> +                     /* insure wrapness */
>> +                     ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1);
>>                       FLUSH_MEM_WRITE();
>>                       FLUSH_MEM_READ();
>>                       continue;
>> @@ -1516,7 +1521,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
>>                                       pr_info("%s: RX buffer overflow [ONR] on channel %d, mode %x\n",
>>                                               ci->devname, ch->channum,
>>                                               ch->p.chan_mode);
>> -                                     //musycc_dump_rxbuffer_ring (ch, 0);        /* RLD DEBUG */
>> +                                     /* RLD DEBUG */
>> +                                     //musycc_dump_rxbuffer_ring (ch, 0);
>
> Just delete this commented out code.
Yes. it can be removed.
>
>>                               }
>>                       }
>>                       musycc_chan_restart(ch);
>> @@ -1573,7 +1579,8 @@ musycc_intr_bh_tasklet(ci_t *ci)
>>               } /* switch on err */
>>
>>               /* Check for interrupt lost condition */
>> -             if ((currInt & INTRPT_ILOST_M) && (cxt1e1_log_level >= LOG_ERROR))
>> +             if ((currInt & INTRPT_ILOST_M) &&
>> +                 (cxt1e1_log_level >= LOG_ERROR))
>>                       pr_info("%s: Interrupt queue overflow - ILOST asserted\n",
>>                               ci->devname);
>>               /* insure wrapness */
>> @@ -1684,7 +1691,8 @@ musycc_del_chan(ci_t *ci, int channum)
>>  {
>>       mch_t      *ch;
>>
>> -     if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)))  /* sanity chk param */
>> +     /* sanity chk param */
>
> This kind of comment is too obvious.  Just delete it.
musycc_del_chan() in "#if 0" block will be removed it is not needed.
>
>> +     if ((channum < 0) || (channum >= (MUSYCC_NPORTS * MUSYCC_NCHANS)))
>>               return ECHRNG;
>>       ch = sd_find_chan(ci, channum);
>>       if (!ch)
>
> regards,
> dan carpenter

Thanks.

Regards,
Daeseok Youn.

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

end of thread, other threads:[~2014-05-09  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-09  1:39 [PATCH 2/3] Staging: cxt1e1: Fix line length over 80 characters in musycc.c Daeseok Youn
2014-05-09  8:07 ` Dan Carpenter
2014-05-09  8:26   ` DaeSeok Youn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).