mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gábor Stefanik" <netrolller.3d@gmail.com>
To: Maurice Dawson <mauricedawson2699@googlemail.com>
Cc: gregkh@suse.de, wfp5p@virginia.edu, mithlesh@linsyssoft.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 23/23] Staging: comedi: fix brace, print(k), indent and  over 80 character coding style issues in adq12b.c
Date: Wed, 24 Mar 2010 13:19:38 +0100	[thread overview]
Message-ID: <69e28c911003240519r1915f0fcid869f741ecad3c12@mail.gmail.com> (raw)
In-Reply-To: <1269432269-3417-1-git-send-email-mauricedawson2699@googlemail.com>

On Wed, Mar 24, 2010 at 1:04 PM, Maurice Dawson
<mauricedawson2699@googlemail.com> wrote:
> This is a patch to the adq12b.c file that fixes up brace, print(k), indent and over 80 character warnings found by the checkpatch.pl tool
>
> Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
> ---
>  drivers/staging/comedi/drivers/adq12b.c |   30 +++++++++++++++++-------------
>  1 files changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c
> index 00b2009..ac3d42d 100644
> --- a/drivers/staging/comedi/drivers/adq12b.c
> +++ b/drivers/staging/comedi/drivers/adq12b.c
> @@ -200,19 +200,21 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>        unipolar = it->options[1];
>        differential = it->options[2];
>
> -       printk("comedi%d: adq12b called with options base=0x%03lx, %s and %s\n",
> +       printk(KERN_ERR "comedi%d: adq12b called with options base=0x%03lx, "
> +                                                               "%s and %s\n",
>               dev->minor, iobase, (unipolar == 1) ? "unipolar" : "bipolar",
>               (differential == 1) ? "differential" : "single-ended");
>
>        /* if no address was specified, try the default 0x300 */
>        if (iobase == 0) {
> -               printk
> -                   ("comedi%d: adq12b warning: I/O base address not specified. Trying the default 0x300.\n",
> -                    dev->minor);
> +               printk("comedi%d: adq12b warning: "
> +                       "I/O base address not specified. "
> +                       "Trying the default 0x300.\n",
> +                                               dev->minor);
>                iobase = 0x300;
>        }
>
> -       printk("comedi%d: adq12b: 0x%04lx ", dev->minor, iobase);
> +       printk(KERN_ERR "comedi%d: adq12b: 0x%04lx ", dev->minor, iobase);
>        if (!request_region(iobase, ADQ12B_SIZE, "adq12b")) {
>                printk("I/O port conflict\n");
>                return -EIO;
> @@ -259,11 +261,10 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>                s->n_chan = thisboard->ai_se_chans;
>        }
>
> -       if (unipolar) {
> +       if (unipolar)
>                s->range_table = &range_adq12b_ai_unipolar;
> -       } else {
> +       else
>                s->range_table = &range_adq12b_ai_bipolar;
> -       }
>
>        s->maxdata = (1 << thisboard->ai_bits) - 1;
>
> @@ -289,7 +290,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>        s->range_table = &range_digital;
>        s->insn_bits = adq12b_do_insn_bits;
>
> -       printk("attached\n");
> +       printk(KERN_ERR "attached\n");
>
>        return 0;
>  }
> @@ -309,7 +310,7 @@ static int adq12b_detach(struct comedi_device *dev)
>
>        kfree(devpriv);
>
> -       printk("comedi%d: adq12b: removed\n", dev->minor);
> +       printk(KERN_ERR "comedi%d: adq12b: removed\n", dev->minor);
>
>        return 0;
>  }
> @@ -344,17 +345,20 @@ static int adq12b_ai_rinsn(struct comedi_device *dev,
>                /* wait for end of convertion */
>                i = 0;
>                do {
> -/* udelay(1); */
> +                       /* udelay(1); */
>                        status = inb(dev->iobase + ADQ12B_STINR);
>                        status = status & ADQ12B_EOC;
>                } while (status == 0 && ++i < TIMEOUT);
> -/* } while (++i < 10); */
> +                       /* } while (++i < 10); */
>
>                /* read data */
>                hi = inb(dev->iobase + ADQ12B_ADHIG);
>                lo = inb(dev->iobase + ADQ12B_ADLOW);
>
> -               /* printk("debug: chan=%d range=%d status=%d hi=%d lo=%d\n", channel, range, status,  hi, lo); */
> +               /*
> +                *printk("debug: chan=%d range=%d status=%d hi=%d lo=%d\n",
> +                *channel, range, status,  hi, lo);
> +                */

AFAIK this is not the right way to format commented-out code - not
sure if we prefer plain /*...*/ or #if 0...#endif in such cases, but
definitely not boxed comments.

>                data[n] = (hi << 8) | lo;
>
>        }
> --
> 1.6.3.3
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/devel
>



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

  reply	other threads:[~2010-03-24 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24 12:04 Maurice Dawson
2010-03-24 12:19 ` Gábor Stefanik [this message]
2010-04-08 19:38 ` Greg KH

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=69e28c911003240519r1915f0fcid869f741ecad3c12@mail.gmail.com \
    --to=netrolller.3d@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mauricedawson2699@googlemail.com \
    --cc=mithlesh@linsyssoft.com \
    --cc=wfp5p@virginia.edu \
    /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

all inboxes | Powered by JetHome®