From: Conrad Gomes <conrad.s.j.gomes@gmail.com>
To: abbotti@mev.co.uk, hsweeten@visionengravers.com,
gregkh@linuxfoundation.org
Cc: joe@perches.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Conrad Gomes <conrad.s.j.gomes@gmail.com>
Subject: [PATCH] Staging: comedi: fix coding style issues in unioxx5.c
Date: Fri, 1 Nov 2013 18:01:56 +0530 [thread overview]
Message-ID: <1383309116-8042-1-git-send-email-conrad.s.j.gomes@gmail.com> (raw)
This is a patch which fixes coding style issues in unioxx5.c found
by checkpatch.pl
1) Replaced printk with pr_info and pr_err
2) Reinitialized n_subd before for loop to fix over 80 character
warning
3) Reworded comment to fix 80 character warning
Signed-off-by: Conrad Gomes <conrad.s.j.gomes@gmail.com>
---
drivers/staging/comedi/drivers/unioxx5.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
index 93eec2f..de68e3a 100644
--- a/drivers/staging/comedi/drivers/unioxx5.c
+++ b/drivers/staging/comedi/drivers/unioxx5.c
@@ -96,7 +96,7 @@ static void __unioxx5_digital_config(struct unioxx5_subd_priv *usp, int mode)
int i, mask;
mask = (mode == ALL_2_OUTPUT) ? 0xFF : 0x00;
- printk("COMEDI: mode = %d\n", mask);
+ pr_info("COMEDI: mode = %d\n", mask);
outb(1, usp->usp_iobase + 0);
@@ -185,7 +185,7 @@ static int __unioxx5_analog_read(struct unioxx5_subd_priv *usp,
/* if four bytes readding error occurs - return 0(false) */
if ((control & Rx4CA_ERR_MASK)) {
- printk("COMEDI: 4 bytes error\n");
+ pr_err("COMEDI: 4 bytes error\n");
return 0;
}
@@ -436,8 +436,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) {
+ n_subd = 0;
+
+ /* getting number of subdevices with types 'g01'*/
+ for (i = 0, ba = iobase; i < 4; i++, ba += UNIOXX5_SUBDEV_ODDS) {
id = inb(ba + 0xE);
num = inb(ba + 0xF);
--
1.7.9.5
next reply other threads:[~2013-11-01 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 12:31 Conrad Gomes [this message]
2013-11-12 0:15 ` Greg KH
[not found] ` <CALxff2GmatgMQF_2yQ9g=tZzh=J-5fKt89sFAU4oYq_FBJHNag@mail.gmail.com>
2013-11-18 10:40 ` Ian Abbott
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=1383309116-8042-1-git-send-email-conrad.s.j.gomes@gmail.com \
--to=conrad.s.j.gomes@gmail.com \
--cc=abbotti@mev.co.uk \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®