public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: ellwync@gmail.com
Cc: gregkh@suse.de, arun.thomas@gmail.com, julia@diku.dk,
	tj@kernel.org, john.d.sheehan@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Ellwyn C <ellwync@googlemail.com>
Subject: Re: [PATCH] Staging: comedi: Fix 80 characters limit and printk issues in unioxx5.c
Date: Mon, 4 Apr 2011 22:51:08 -0700	[thread overview]
Message-ID: <20110405055108.GA547@kroah.com> (raw)
In-Reply-To: <4d7ffceb.dd25e30a.10e8.1876@mx.google.com>

On Tue, Mar 15, 2011 at 11:57:04PM +0000, ellwync@gmail.com wrote:
> From: Ellwyn C <ellwync@googlemail.com>
> 
> This is a patch to the unioxx5.c file that fixes the 80 characters limit and
> printk warnings found by the checkpatch.pl tool
> 
> Signed-off-by: Ellwyn C <ellwync@googlemail.com>
> ---
>  drivers/staging/comedi/drivers/unioxx5.c |   61 +++++++++++++++++++-----------
>  1 files changed, 39 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
> index 598884e..0d91f53 100644
> --- a/drivers/staging/comedi/drivers/unioxx5.c
> +++ b/drivers/staging/comedi/drivers/unioxx5.c
> @@ -75,8 +75,10 @@ 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 */

No, it should be on the line before this, not after.

> +	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 */
>  };
> @@ -99,7 +101,8 @@ static int __unioxx5_digital_write(struct unioxx5_subd_priv *usp,
>  				   unsigned int *data, int channel, int minor);
>  static int __unioxx5_digital_read(struct unioxx5_subd_priv *usp,
>  				  unsigned int *data, int channel, int minor);
> -/* static void __unioxx5_digital_config(struct unioxx5_subd_priv* usp, int mode); */
> +/* static void __unioxx5_digital_config(struct unioxx5_subd_priv* usp, int mode)
> +; */

Don't put a ; on a new line, this is not needed at all.

>  static int __unioxx5_analog_write(struct unioxx5_subd_priv *usp,
>  				  unsigned int *data, int channel, int minor);
>  static int __unioxx5_analog_read(struct unioxx5_subd_priv *usp,
> @@ -139,8 +142,10 @@ static int unioxx5_attach(struct comedi_device *dev,
>  	dev->iobase = iobase;
>  	iobase += UNIOXX5_SUBDEV_BASE;
>  
> -	/* defining number of subdevices and getting they types (it must be 'g01')  */
> -	for (i = n_subd = 0, ba = iobase; i < 4; i++, ba += UNIOXX5_SUBDEV_ODDS) {
> +	/* defining number of subdevices and getting they types
> +	(it must be 'g01')  */
> +	for (i = n_subd = 0, ba = iobase; i < 4; i++, ba +=
> +	UNIOXX5_SUBDEV_ODDS) {

Ick, no, wrong way to indent this, sorry.

And see the proper way to handle multi-line comments, this isn't the way
to do this.

>  		id = inb(ba + 0xE);
>  		num = inb(ba + 0xF);
>  
> @@ -169,7 +174,7 @@ static int unioxx5_attach(struct comedi_device *dev,
>  			return -1;
>  	}
>  
> -	printk("attached\n");
> +	pr_info("attached\n");

This isnt needed at all.

>  	return 0;
>  }
>  
> @@ -181,7 +186,8 @@ static int unioxx5_subdev_read(struct comedi_device *dev,
>  	int channel, type;
>  
>  	channel = CR_CHAN(insn->chanspec);
> -	type = usp->usp_module_type[channel / 2];	/* defining module type(analog or digital) */
> +	type = usp->usp_module_type[channel / 2];
> +	/* defining module type(analog or digital) */

Same problem as above, and in other places in this patch.

Care to do it all over and resend?

thanks,

greg k-h

      reply	other threads:[~2011-04-05  7:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 23:57 [PATCH] Staging: comedi: Fix 80 characters limit and printk issues in unioxx5.c ellwync
2011-04-05  5:51 ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110405055108.GA547@kroah.com \
    --to=greg@kroah.com \
    --cc=arun.thomas@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=ellwync@gmail.com \
    --cc=ellwync@googlemail.com \
    --cc=gregkh@suse.de \
    --cc=john.d.sheehan@gmail.com \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox