linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c
       [not found] <[PATCH 1/2]Staging: comedi: fix line over 80 character warning issues in unioxx5.c>
@ 2011-07-07  7:00 ` Ravishankar
  2011-07-07  8:28   ` Denis Kirjanov
  2011-07-07  9:01   ` Dan Carpenter
  0 siblings, 2 replies; 4+ messages in thread
From: Ravishankar @ 2011-07-07  7:00 UTC (permalink / raw)
  To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar, Ravishankar

From: Ravishankar <ravi.shankar@greenturtles.in>

This is a patch to the unioxx5.c file that fixes up a  warning:line over 80 charcter found by the checkpatch.pl tool

Signed-off-by: Ravishankar <ravishankarkm32@gmail.com>
---
 drivers/staging/comedi/drivers/unioxx5.c |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
index 598884e..9b311c7 100644
--- a/drivers/staging/comedi/drivers/unioxx5.c
+++ b/drivers/staging/comedi/drivers/unioxx5.c
@@ -75,8 +75,13 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5),
 /* 'private' structure for each subdevice */
 struct unioxx5_subd_priv {
 	int usp_iobase;
-	unsigned char usp_module_type[12];	/* 12 modules. each can be 70L or 73L */
-	unsigned char usp_extra_data[12][4];	/* for saving previous written value for analog modules */
+	unsigned char usp_module_type[12];	/* 12 modules. each can be 70L
+						 * or 73L
+						*/
+	unsigned char usp_extra_data[12][4];	/* for saving previous written
+						 * value for analog modules
+						*/
+
 	unsigned char usp_prev_wr_val[3];	/* previous written value */
 	unsigned char usp_prev_cn_val[3];	/* previous channel value */
 };
@@ -398,7 +402,10 @@ static int __unioxx5_digital_read(struct unioxx5_subd_priv *usp,
 	*data &= mask;
 
 	if (channel_offset > 1)
-		channel -= 2 << channel_offset;	/* this operation is created for correct readed value to 0 or 1 */
+		channel -= 2 << channel_offset;	/* this operation is created for
+						 * correct readed value to
+						 * 0 or 1
+						*/
 
 	*data >>= channel;
 	return 1;
@@ -444,7 +451,9 @@ static int __unioxx5_analog_write(struct unioxx5_subd_priv *usp,
 	usp->usp_extra_data[module][i] = (unsigned char)((*data & 0xFF00) >> 8);
 
 	/* while(!((inb(usp->usp_iobase + 0)) & TxBE)); */
-	outb(module + 1, usp->usp_iobase + 5);	/* sending module number to card(1 .. 12) */
+	outb(module + 1, usp->usp_iobase + 5);	/* sending module number
+						 * to card (1..12)
+						*/
 	outb('W', usp->usp_iobase + 6);	/* sends (W)rite command to module */
 
 	/* sending for bytes to module(one byte per cycle iteration) */
@@ -475,7 +484,9 @@ static int __unioxx5_analog_read(struct unioxx5_subd_priv *usp,
 	}
 
 	__unioxx5_analog_config(usp, channel);
-	outb(module_no + 1, usp->usp_iobase + 5);	/* sends module number to card(1 .. 12) */
+	outb(module_no + 1, usp->usp_iobase + 5);	/* sends module number
+							 * to card (1. .12)
+							*/
 	outb('V', usp->usp_iobase + 6);	/* sends to module (V)erify command */
 	control = inb(usp->usp_iobase);	/* get control register byte */
 
-- 
1.6.5.2


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

* Re: [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c
  2011-07-07  7:00 ` [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c Ravishankar
@ 2011-07-07  8:28   ` Denis Kirjanov
  2011-07-07  9:26     ` Dan Carpenter
  2011-07-07  9:01   ` Dan Carpenter
  1 sibling, 1 reply; 4+ messages in thread
From: Denis Kirjanov @ 2011-07-07  8:28 UTC (permalink / raw)
  To: Ravishankar; +Cc: gregkh, wfp5p, devel, linux-kernel, Ravishankar

I wonder if this patch improves code readability

On Thu, Jul 7, 2011 at 11:00 AM, Ravishankar <ravishankarkm32@gmail.com> wrote:
> From: Ravishankar <ravi.shankar@greenturtles.in>
>
> This is a patch to the unioxx5.c file that fixes up a  warning:line over 80 charcter found by the checkpatch.pl tool
>
> Signed-off-by: Ravishankar <ravishankarkm32@gmail.com>
> ---
>  drivers/staging/comedi/drivers/unioxx5.c |   25 ++++++++++++++++++-------
>  1 files changed, 18 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
> index 598884e..9b311c7 100644
> --- a/drivers/staging/comedi/drivers/unioxx5.c
> +++ b/drivers/staging/comedi/drivers/unioxx5.c
> @@ -75,8 +75,13 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5),
>  /* 'private' structure for each subdevice */
>  struct unioxx5_subd_priv {
>        int usp_iobase;
> -       unsigned char usp_module_type[12];      /* 12 modules. each can be 70L or 73L */
> -       unsigned char usp_extra_data[12][4];    /* for saving previous written value for analog modules */
> +       unsigned char usp_module_type[12];      /* 12 modules. each can be 70L
> +                                                * or 73L
> +                                               */
> +       unsigned char usp_extra_data[12][4];    /* for saving previous written
> +                                                * value for analog modules
> +                                               */
> +
>        unsigned char usp_prev_wr_val[3];       /* previous written value */
>        unsigned char usp_prev_cn_val[3];       /* previous channel value */
>  };
> @@ -398,7 +402,10 @@ static int __unioxx5_digital_read(struct unioxx5_subd_priv *usp,
>        *data &= mask;
>
>        if (channel_offset > 1)
> -               channel -= 2 << channel_offset; /* this operation is created for correct readed value to 0 or 1 */
> +               channel -= 2 << channel_offset; /* this operation is created for
> +                                                * correct readed value to
> +                                                * 0 or 1
> +                                               */
>
>        *data >>= channel;
>        return 1;
> @@ -444,7 +451,9 @@ static int __unioxx5_analog_write(struct unioxx5_subd_priv *usp,
>        usp->usp_extra_data[module][i] = (unsigned char)((*data & 0xFF00) >> 8);
>
>        /* while(!((inb(usp->usp_iobase + 0)) & TxBE)); */
> -       outb(module + 1, usp->usp_iobase + 5);  /* sending module number to card(1 .. 12) */
> +       outb(module + 1, usp->usp_iobase + 5);  /* sending module number
> +                                                * to card (1..12)
> +                                               */
>        outb('W', usp->usp_iobase + 6); /* sends (W)rite command to module */
>
>        /* sending for bytes to module(one byte per cycle iteration) */
> @@ -475,7 +484,9 @@ static int __unioxx5_analog_read(struct unioxx5_subd_priv *usp,
>        }
>
>        __unioxx5_analog_config(usp, channel);
> -       outb(module_no + 1, usp->usp_iobase + 5);       /* sends module number to card(1 .. 12) */
> +       outb(module_no + 1, usp->usp_iobase + 5);       /* sends module number
> +                                                        * to card (1. .12)
> +                                                       */
>        outb('V', usp->usp_iobase + 6); /* sends to module (V)erify command */
>        control = inb(usp->usp_iobase); /* get control register byte */
>
> --
> 1.6.5.2
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
>



-- 
Regards,
Denis

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

* Re: [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c
  2011-07-07  7:00 ` [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c Ravishankar
  2011-07-07  8:28   ` Denis Kirjanov
@ 2011-07-07  9:01   ` Dan Carpenter
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-07-07  9:01 UTC (permalink / raw)
  To: Ravishankar; +Cc: gregkh, wfp5p, devel, linux-kernel, Ravishankar

On Thu, Jul 07, 2011 at 12:30:39PM +0530, Ravishankar wrote:
> From: Ravishankar <ravi.shankar@greenturtles.in>
> 
> This is a patch to the unioxx5.c file that fixes up a  warning:line over 80 charcter found by the checkpatch.pl tool
> 
> Signed-off-by: Ravishankar <ravishankarkm32@gmail.com>
> ---
>  drivers/staging/comedi/drivers/unioxx5.c |   25 ++++++++++++++++++-------
>  1 files changed, 18 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
> index 598884e..9b311c7 100644
> --- a/drivers/staging/comedi/drivers/unioxx5.c
> +++ b/drivers/staging/comedi/drivers/unioxx5.c
> @@ -75,8 +75,13 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5),
>  /* 'private' structure for each subdevice */
>  struct unioxx5_subd_priv {
>  	int usp_iobase;
> -	unsigned char usp_module_type[12];	/* 12 modules. each can be 70L or 73L */
> -	unsigned char usp_extra_data[12][4];	/* for saving previous written value for analog modules */
> +	unsigned char usp_module_type[12];	/* 12 modules. each can be 70L
> +						 * or 73L
> +						*/
                                                ^^^
	The asterisks should line up.  Maybe move the comment to the
	line before.

	/* 12 modules. each can be 70L or 73L */
	unsigned char usp_module_type[12];

regards,
dan carpenter



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

* Re: [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c
  2011-07-07  8:28   ` Denis Kirjanov
@ 2011-07-07  9:26     ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2011-07-07  9:26 UTC (permalink / raw)
  To: Denis Kirjanov; +Cc: Ravishankar, devel, gregkh, linux-kernel, Ravishankar

On Thu, Jul 07, 2011 at 12:28:21PM +0400, Denis Kirjanov wrote:
> I wonder if this patch improves code readability
> 

I would like for the line width warning to be removed or that we
would allow longer lines.  I don't see a lot of value in it and it's
all to common to see code that does stuff like this:
							foo->
							  bar_fw_baz
							    [10 + 1
							       + 1]
							         = x;

But I've given up hoping that it will change.  People are going to
keep submitting these patches until we merge one of them so we might
as well merge the half way decent one that gets submitted.

regards,
dan carpenter



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

end of thread, other threads:[~2011-07-07  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <[PATCH 1/2]Staging: comedi: fix line over 80 character warning issues in unioxx5.c>
2011-07-07  7:00 ` [PATCH 5/5] Staging: comedi: fix warning issue in unioxx5.c Ravishankar
2011-07-07  8:28   ` Denis Kirjanov
2011-07-07  9:26     ` Dan Carpenter
2011-07-07  9:01   ` Dan Carpenter

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).