Skip to contentSkip to conversation

Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

PATCH New Amit Ghadge 2 participants 3 messages Sep 3, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:

WARNING: Block comments use * on subsequent lines

---
 drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 +++++++++++++--------------
 1 file changed, 26 insertions(+), 26 deletions(-)
drivers/staging/comedi/drivers/ni_daq_dio24.c +26 -26
index d9de83a..ff3716c 100644
@@ -1,35 +1,35 @@
 /*
-    comedi/drivers/ni_daq_dio24.c
-    Driver for National Instruments PCMCIA DAQ-Card DIO-24
-    Copyright (C) 2002 Daniel Vecino Castel <[email protected]>
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel <[email protected]>
 
-    PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
-    2001/08/24 12:13:13 from the pcmcia package.
-    The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
-    <[email protected]>.  Portions created by David A. Hinds
-    are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
+ * PCMCIA crap at end of file is adapted from dummy_cs.c 1.31
+ * 2001/08/24 12:13:13 from the pcmcia package.
+ * The initial developer of the pcmcia dummy_cs.c code is David A. Hinds
+ * <[email protected]>.  Portions created by David A. Hinds
+ * are Copyright (C) 1999 David A. Hinds.  All Rights Reserved.
 
-    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 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.
-*/
+ * 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_daq_dio24
-Description: National Instruments PCMCIA DAQ-Card DIO-24
-Author: Daniel Vecino Castel <[email protected]>
-Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
-Status: ?
-Updated: Thu, 07 Nov 2002 21:53:06 -0800
+ * Driver: ni_daq_dio24
+ * Description: National Instruments PCMCIA DAQ-Card DIO-24
+ * Author: Daniel Vecino Castel <[email protected]>
+ * Devices: [National Instruments] PCMCIA DAQ-Card DIO-24 (ni_daq_dio24)
+ * Status: ?
+ * Updated: Thu, 07 Nov 2002 21:53:06 -0800
 
-This is just a wrapper around the 8255.o driver to properly handle
-the PCMCIA interface.
-*/
+ * This is just a wrapper around the 8255.o driver to properly handle
+ * the PCMCIA interface.
+ */
 
 #include <linux/module.h>
 #include "../comedi_pcmcia.h"
Signature · 1 line
2.5.5
#1 lore raw

PATCH 2/2 Staging: comedi: pcl726.c, ni_670x.c: Fix warnings and check.

pcl726.c:
Replace CamelCase range_0_20mA by range_0_20ma

ni_670x.c:
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 CamelCase range_0_20mA to range_0_20ma.

---
 drivers/staging/comedi/drivers/ni_670x.c | 66 ++++++++++++++++----------------
 drivers/staging/comedi/drivers/pcl726.c  |  2 +-
 2 files changed, 33 insertions(+), 35 deletions(-)
drivers/staging/comedi/drivers/ni_670x.c +32 -34
index 3e7271880..86d26aa 100644
@@ -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 <[email protected]>
-
-    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 <[email protected]>
+
+ * 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 <[email protected]>
-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 <[email protected]>
+ * 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 <[email protected]> Last updated on 20/08/2001
-
-	Manuals:
+ * Bart Joris <[email protected]> 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;
drivers/staging/comedi/drivers/pcl726.c +1 -1
index 256850c..8664cb2 100644
@@ -96,7 +96,7 @@ static const struct comedi_lrange *const rangelist_728[] = {
 	&range_bipolar5,
 	&range_bipolar10,
 	&range_4_20mA,
-	&range_0_20mA
+	&range_0_20ma
 };
 
 struct pcl726_board {
Signature · 1 line
2.5.5
#2 lore raw

Re: [PATCH 2/2] Staging: comedi: pcl726.c, ni_670x.c: Fix warnings and check.

url: https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-062934 config: xtensa-allmodconfig (attached as .config)…

Hi Amit,

[auto build test ERROR on v4.8-rc4]
[cannot apply to staging/staging-testing next-20160825]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on] [Check https://git-scm.com/docs/git-format-patch for more information]

url: https://github.com/0day-ci/linux/commits/Amit-Ghadge/Staging-comedi-ni_daq_dio24-c-Fix-block-comments-use-on-subsequent-lines/20160904-062934
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 4.9.0
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa

All errors (new ones prefixed by >>):

>> drivers/staging/comedi/drivers/pcl726.c:99:3: error: 'range_0_20ma' undeclared here (not in a function)
     &range_0_20ma
      ^

vim +/range_0_20ma +99 drivers/staging/comedi/drivers/pcl726.c

    93	static const struct comedi_lrange *const rangelist_728[] = {
    94		&range_unipolar5,
    95		&range_unipolar10,
    96		&range_bipolar5,
    97		&range_bipolar10,
    98		&range_4_20mA,
  > 99		&range_0_20ma

100 };
101
102 struct pcl726_board {

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation