linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.
@ 2016-09-03 20:11 Amit Ghadge
  2016-09-03 20:11 ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check 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
  0 siblings, 2 replies; 10+ messages in thread
From: Amit Ghadge @ 2016-09-03 20:11 UTC (permalink / raw)
  To: abbotti; +Cc: gregkh, devel, linux-kernel, Amit Ghadge

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

WARNING: Block comments use * on subsequent lines

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

diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index d9de83a..ff3716c 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -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 <dvecino@able.es>
+ * comedi/drivers/ni_daq_dio24.c
+ * Driver for National Instruments PCMCIA DAQ-Card DIO-24
+ * Copyright (C) 2002 Daniel Vecino Castel <dvecino@able.es>
 
-    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
-    <dahinds@users.sourceforge.net>.  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
+ * <dahinds@users.sourceforge.net>.  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 <dvecino@able.es>
-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 <dvecino@able.es>
+ * 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"
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  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
  2016-09-03 20:42   ` kbuild test robot
                     ` (2 more replies)
  2016-09-05 13:15 ` [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines Ian Abbott
  1 sibling, 3 replies; 10+ messages in thread
From: Amit Ghadge @ 2016-09-03 20:11 UTC (permalink / raw)
  To: abbotti; +Cc: gregkh, devel, linux-kernel, Amit Ghadge

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  2016-09-03 20:11 ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check Amit Ghadge
@ 2016-09-03 20:42   ` kbuild test robot
  2016-09-04  8:35   ` Greg KH
  2016-09-05 13:32   ` Ian Abbott
  2 siblings, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2016-09-03 20:42 UTC (permalink / raw)
  To: Amit Ghadge; +Cc: kbuild-all, abbotti, devel, gregkh, Amit Ghadge, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1960 bytes --]

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-041301
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/ni_670x.c: In function 'ni_670x_auto_attach':
>> drivers/staging/comedi/drivers/ni_670x.c:223:32: error: 'range_0_20ma' undeclared (first use in this function)
       range_table_list[16 + i] = &range_0_20ma;
                                   ^
   drivers/staging/comedi/drivers/ni_670x.c:223:32: note: each undeclared identifier is reported only once for each function it appears in

vim +/range_0_20ma +223 drivers/staging/comedi/drivers/ni_670x.c

   217							 GFP_KERNEL);
   218			if (!range_table_list)
   219				return -ENOMEM;
   220			s->range_table_list = range_table_list;
   221			for (i = 0; i < 16; i++) {
   222				range_table_list[i] = &range_bipolar10;
 > 223				range_table_list[16 + i] = &range_0_20ma;
   224			}
   225		} else {
   226			s->range_table = &range_bipolar10;

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 46035 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  2016-09-03 20:11 ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check Amit Ghadge
  2016-09-03 20:42   ` kbuild test robot
@ 2016-09-04  8:35   ` Greg KH
  2016-09-04 10:15     ` Amit Ghadge
  2016-09-05 13:32   ` Ian Abbott
  2 siblings, 1 reply; 10+ messages in thread
From: Greg KH @ 2016-09-04  8:35 UTC (permalink / raw)
  To: Amit Ghadge; +Cc: abbotti, devel, linux-kernel

On Sun, Sep 04, 2016 at 01:41:03AM +0530, Amit Ghadge wrote:
> 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.

That's multiple things in the same patch, and you didn't even test build
your change :(

Please do better than this in the future.

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  2016-09-04  8:35   ` Greg KH
@ 2016-09-04 10:15     ` Amit Ghadge
  2016-09-05 13:11       ` Ian Abbott
  0 siblings, 1 reply; 10+ messages in thread
From: Amit Ghadge @ 2016-09-04 10:15 UTC (permalink / raw)
  To: Greg KH; +Cc: Ian Abbott, devel, linux-kernel

I will be send individual patches.

I was try,
 make M=drivers/staging/comedi/

No issue generated, Is there have any other option to test these changes?


Amit G

On Sun, Sep 4, 2016 at 2:05 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
> On Sun, Sep 04, 2016 at 01:41:03AM +0530, Amit Ghadge wrote:
>> 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.
>
> That's multiple things in the same patch, and you didn't even test build
> your change :(
>
> Please do better than this in the future.
>
> greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  2016-09-04 10:15     ` Amit Ghadge
@ 2016-09-05 13:11       ` Ian Abbott
  0 siblings, 0 replies; 10+ messages in thread
From: Ian Abbott @ 2016-09-05 13:11 UTC (permalink / raw)
  To: Amit Ghadge, Greg KH; +Cc: devel, linux-kernel

On 04/09/16 11:15, Amit Ghadge wrote:
> I will be send individual patches.
>
> I was try,
>  make M=drivers/staging/comedi/
>
> No issue generated, Is there have any other option to test these changes?

You need to configure the kernel to build the drivers you are changing.

Also, please don't top-post!

>
>
> Amit G
>
> On Sun, Sep 4, 2016 at 2:05 PM, Greg KH <gregkh@linuxfoundation.org> wrote:
>> On Sun, Sep 04, 2016 at 01:41:03AM +0530, Amit Ghadge wrote:
>>> 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.
>>
>> That's multiple things in the same patch, and you didn't even test build
>> your change :(
>>
>> Please do better than this in the future.
>>
>> greg k-h


-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.
  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 ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check Amit Ghadge
@ 2016-09-05 13:15 ` Ian Abbott
  2016-09-05 14:13   ` Amit Ghadge
  1 sibling, 1 reply; 10+ messages in thread
From: Ian Abbott @ 2016-09-05 13:15 UTC (permalink / raw)
  To: Amit Ghadge; +Cc: gregkh, devel, linux-kernel

On 03/09/16 21:11, Amit Ghadge wrote:
> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
>
> WARNING: Block comments use * on subsequent lines
>
> Signed-off-by: Amit Ghadge <amitg.b14@gmail.com>
> ---
>  drivers/staging/comedi/drivers/ni_daq_dio24.c | 52 +++++++++++++--------------
>  1 file changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
> index d9de83a..ff3716c 100644
> --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
> +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
> @@ -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 <dvecino@able.es>
> + * comedi/drivers/ni_daq_dio24.c
> + * Driver for National Instruments PCMCIA DAQ-Card DIO-24
> + * Copyright (C) 2002 Daniel Vecino Castel <dvecino@able.es>
>
> -    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
> -    <dahinds@users.sourceforge.net>.  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
> + * <dahinds@users.sourceforge.net>.  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.
> + */

The blank lines in that comment block should also have the " *" so it 
has an unbroken, vertical line of "*" down the left side of the comment 
block.

>  /*
> -Driver: ni_daq_dio24
> -Description: National Instruments PCMCIA DAQ-Card DIO-24
> -Author: Daniel Vecino Castel <dvecino@able.es>
> -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 <dvecino@able.es>
> + * 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.
> + */

Same thing there.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  2016-09-03 20:11 ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check Amit Ghadge
  2016-09-03 20:42   ` kbuild test robot
  2016-09-04  8:35   ` Greg KH
@ 2016-09-05 13:32   ` Ian Abbott
  2016-09-05 14:12     ` Amit Ghadge
  2 siblings, 1 reply; 10+ messages in thread
From: Ian Abbott @ 2016-09-05 13:32 UTC (permalink / raw)
  To: Amit Ghadge; +Cc: gregkh, devel, linux-kernel

On 03/09/16 21:11, Amit Ghadge wrote:
> 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
> + */

In addition to the problems mentioned by Greg, the blank lines in those 
comment blocks also need a " *" to give an unbroken line of "*" down the 
left hand side of the comment block.

>  #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;

You can't just rename variables shared by other modules like that. 
Besides, the "mA" suffix is perfectly fine here, because it is the 
correct S.I. suffix for "milliamps".  (Comedi doesn't bother adding a 
"V" suffix for voltage range variables, as in the "range_bipolar10" 
variable below, but it does add a suffix for the less common units such 
as milliamps.)

>  		}
>  	} else {
>  		s->range_table = &range_bipolar10;
>


-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check.
  2016-09-05 13:32   ` Ian Abbott
@ 2016-09-05 14:12     ` Amit Ghadge
  0 siblings, 0 replies; 10+ messages in thread
From: Amit Ghadge @ 2016-09-05 14:12 UTC (permalink / raw)
  To: Ian Abbott; +Cc: Greg KH, devel, linux-kernel

On Mon, Sep 5, 2016 at 7:02 PM, Ian Abbott <abbotti@mev.co.uk> wrote:
> On 03/09/16 21:11, Amit Ghadge wrote:
>>
>> 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
>> + */
>
>
> In addition to the problems mentioned by Greg, the blank lines in those
> comment blocks also need a " *" to give an unbroken line of "*" down the
> left hand side of the comment block.
>
>>  #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;
>
>
> You can't just rename variables shared by other modules like that. Besides,
> the "mA" suffix is perfectly fine here, because it is the correct S.I.
> suffix for "milliamps".  (Comedi doesn't bother adding a "V" suffix for
> voltage range variables, as in the "range_bipolar10" variable below, but it
> does add a suffix for the less common units such as milliamps.)
>

Hi Ian,

Thanks, for response. I never do that changes.

This patch is failed, please ignore this.


>>                 }
>>         } else {
>>                 s->range_table = &range_bipolar10;
>>
>
>
> --
> -=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
> -=(                          Web: http://www.mev.co.uk/  )=-



Amit G

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.
  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
  0 siblings, 0 replies; 10+ messages in thread
From: Amit Ghadge @ 2016-09-05 14:13 UTC (permalink / raw)
  To: Ian Abbott; +Cc: Greg KH, devel, linux-kernel

On Mon, Sep 5, 2016 at 6:45 PM, Ian Abbott <abbotti@mev.co.uk> wrote:
> On 03/09/16 21:11, Amit Ghadge wrote:
>>
>> This is a patch to the ni_daq_dio24.c that fixes checkpatch warning:
>>
>> WARNING: Block comments use * on subsequent lines
>>
>> Signed-off-by: Amit Ghadge <amitg.b14@gmail.com>
>> ---
>>  drivers/staging/comedi/drivers/ni_daq_dio24.c | 52
>> +++++++++++++--------------
>>  1 file changed, 26 insertions(+), 26 deletions(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> b/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> index d9de83a..ff3716c 100644
>> --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
>> @@ -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 <dvecino@able.es>
>> + * comedi/drivers/ni_daq_dio24.c
>> + * Driver for National Instruments PCMCIA DAQ-Card DIO-24
>> + * Copyright (C) 2002 Daniel Vecino Castel <dvecino@able.es>
>>
>> -    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
>> -    <dahinds@users.sourceforge.net>.  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
>> + * <dahinds@users.sourceforge.net>.  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.
>> + */
>
>
> The blank lines in that comment block should also have the " *" so it has an
> unbroken, vertical line of "*" down the left side of the comment block.
>
>>  /*
>> -Driver: ni_daq_dio24
>> -Description: National Instruments PCMCIA DAQ-Card DIO-24
>> -Author: Daniel Vecino Castel <dvecino@able.es>
>> -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 <dvecino@able.es>
>> + * 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.
>> + */
>
>
> Same thing there.
>
> --
> -=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
> -=(                          Web: http://www.mev.co.uk/  )=-


I will be send updated patch.

Amit G

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-09-05 14:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] Staging: comedi: ni_670x.c: Fix warnings and check Amit Ghadge
2016-09-03 20:42   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).