public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Amit Ghadge <amitg.b14@gmail.com>
To: abbotti@mev.co.uk
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Amit Ghadge <amitg.b14@gmail.com>
Subject: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
Date: Sun,  4 Sep 2016 01:41:03 +0530	[thread overview]
Message-ID: <1472933463-5290-2-git-send-email-amitg.b14@gmail.com> (raw)
In-Reply-To: <1472933463-5290-1-git-send-email-amitg.b14@gmail.com>

Fixes checkpatch warning:
WARNING: Block comments use * on subsequent lines

Replace (1<<7) by BIT(7) in the file ni_670x.c to get rid
of checkpatch.pl "CHECK" output "Prefer using the BIT macro".
Replace Avoid CamelCase range_0_20mA to range_0_20ma.

Signed-off-by: Amit Ghadge <amitg.b14@gmail.com>
---
 drivers/staging/comedi/drivers/ni_670x.c | 66 ++++++++++++++++----------------
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
index 3e7271880..86d26aa 100644
--- a/drivers/staging/comedi/drivers/ni_670x.c
+++ b/drivers/staging/comedi/drivers/ni_670x.c
@@ -1,40 +1,38 @@
 /*
-    comedi/drivers/ni_670x.c
-    Hardware driver for NI 670x devices
-
-    COMEDI - Linux Control and Measurement Device Interface
-    Copyright (C) 1997-2001 David A. Schleef <ds@schleef.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-*/
+ * comedi/drivers/ni_670x.c
+ * Hardware driver for NI 670x devices
+
+ * COMEDI - Linux Control and Measurement Device Interface
+ * Copyright (C) 1997-2001 David A. Schleef <ds@schleef.org>
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
 /*
-Driver: ni_670x
-Description: National Instruments 670x
-Author: Bart Joris <bjoris@advalvas.be>
-Updated: Wed, 11 Dec 2002 18:25:35 -0800
-Devices: [National Instruments] PCI-6703 (ni_670x), PCI-6704
-Status: unknown
-
-Commands are not supported.
-*/
-
+ * Driver: ni_670x
+ * Description: National Instruments 670x
+ * Author: Bart Joris <bjoris@advalvas.be>
+ * Updated: Wed, 11 Dec 2002 18:25:35 -0800
+ * Devices: [National Instruments] PCI-6703 (ni_670x), PCI-6704
+ * Status: unknown
+
+ * Commands are not supported.
+ */
 /*
-	Bart Joris <bjoris@advalvas.be> Last updated on 20/08/2001
-
-	Manuals:
+ * Bart Joris <bjoris@advalvas.be> Last updated on 20/08/2001
 
-	322110a.pdf	PCI/PXI-6704 User Manual
-	322110b.pdf	PCI/PXI-6703/6704 User Manual
+ * Manuals:
 
-*/
+ * 322110a.pdf	PCI/PXI-6704 User Manual
+ * 322110b.pdf	PCI/PXI-6703/6704 User Manual
+ */
 
 #include <linux/module.h>
 #include <linux/interrupt.h>
@@ -147,7 +145,7 @@ static int ni_670x_dio_insn_config(struct comedi_device *dev,
 
 /* ripped from mite.h and mite_setup2() to avoid mite dependency */
 #define MITE_IODWBSR	0xc0	 /* IO Device Window Base Size Register */
-#define WENAB		(1 << 7) /* window enable */
+#define WENAB		BIT(7) /* window enable */
 
 static int ni_670x_mite_init(struct pci_dev *pcidev)
 {
@@ -222,7 +220,7 @@ static int ni_670x_auto_attach(struct comedi_device *dev,
 		s->range_table_list = range_table_list;
 		for (i = 0; i < 16; i++) {
 			range_table_list[i] = &range_bipolar10;
-			range_table_list[16 + i] = &range_0_20mA;
+			range_table_list[16 + i] = &range_0_20ma;
 		}
 	} else {
 		s->range_table = &range_bipolar10;
-- 
2.5.5

  reply	other threads:[~2016-09-03 20:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03 20:11 [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines Amit Ghadge
2016-09-03 20:11 ` Amit Ghadge [this message]
2016-09-03 20:42   ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check kbuild test robot
2016-09-04  8:35   ` Greg KH
2016-09-04 10:15     ` Amit Ghadge
2016-09-05 13:11       ` Ian Abbott
2016-09-05 13:32   ` Ian Abbott
2016-09-05 14:12     ` Amit Ghadge
2016-09-05 13:15 ` [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines Ian Abbott
2016-09-05 14:13   ` Amit Ghadge

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=1472933463-5290-2-git-send-email-amitg.b14@gmail.com \
    --to=amitg.b14@gmail.com \
    --cc=abbotti@mev.co.uk \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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