Re: [PATCH v2] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
On 2017-05-24 17:06, Ian Abbott wrote: If "include/linux/kernel.h" includes , a circular dependency is introduced when "include/asm-generic/bug.h" includes . This results in build breakage when something includes before for architectures that select `CONFIG_GENERIC_

[PATCH v2] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
is that since most bug-related, function-link macros (`BUG()`, `WARN()` etc.) make use of facilities provided by , something else needs to include that before those macros are called. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> Cc: Arnd Bergmann <a...@arndb.de> Cc: Andrew Morton &l

[PATCH v2] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
is that since most bug-related, function-link macros (`BUG()`, `WARN()` etc.) make use of facilities provided by , something else needs to include that before those macros are called. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Cc: Andrew Morton Cc: Michal Nazarewicz Cc: Peter Zijlstra

Re: [PATCH 1/1] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
On 24/05/17 14:37, Rasmus Villemoes wrote: On 24 May 2017 at 15:21, Ian Abbott <abbo...@mev.co.uk> wrote: If "include/linux/kernel.h" includes , a circular dependency is introduced Then don't. Can't we just create linux/build_bug.h and have that contain the BUILD_BUG related

Re: [PATCH 1/1] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
On 24/05/17 14:37, Rasmus Villemoes wrote: On 24 May 2017 at 15:21, Ian Abbott wrote: If "include/linux/kernel.h" includes , a circular dependency is introduced Then don't. Can't we just create linux/build_bug.h and have that contain the BUILD_BUG related macros - they're really

[PATCH 0/1] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
PATCH 1 is a follow-up patch to my previous patch "[PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()": . The previous patch introduced a build failure: . The build

[PATCH 0/1] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
PATCH 1 is a follow-up patch to my previous patch "[PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()": . The previous patch introduced a build failure: . The build

[PATCH 1/1] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
is that since most bug-related, function-link macros (`BUG()`, `WARN()` etc.) make use of facilities provided by , something else needs to include that before those macros are called. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> Cc: Arnd Bergmann <a...@arndb.de> Cc: Andrew Morton &l

[PATCH 1/1] bug: fix problem including from linux/kernel.h

2017-05-24 Thread Ian Abbott
is that since most bug-related, function-link macros (`BUG()`, `WARN()` etc.) make use of facilities provided by , something else needs to include that before those macros are called. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Cc: Andrew Morton Cc: Michal Nazarewicz Cc: Peter Zijlstra ---

Re: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()

2017-05-24 Thread Ian Abbott
/Ian-Abbott/asm-generic-bug-h-declare-struct-pt_regs-before-function-prototype/20170524-070310 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings

Re: [PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()

2017-05-24 Thread Ian Abbott
/Ian-Abbott/asm-generic-bug-h-declare-struct-pt_regs-before-function-prototype/20170524-070310 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All error/warnings

[PATCH v4 1/2] asm-generic/bug.h: declare struct pt_regs; before function prototype

2017-05-23 Thread Ian Abbott
The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> Cc: Arnd Be

[PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
the macro to avoid these warnings. Make sure `*(ptr)` either has type compatible with the member, or has type compatible with `void`, ignoring qualifiers. Raise compiler errors if this is not true. This is stronger than the previous behaviour, which only resulted in compiler warnings for a t

[PATCH v4 1/2] asm-generic/bug.h: declare struct pt_regs; before function prototype

2017-05-23 Thread Ian Abbott
The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Acked-by: Arnd

[PATCH v4 2/2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
the macro to avoid these warnings. Make sure `*(ptr)` either has type compatible with the member, or has type compatible with `void`, ignoring qualifiers. Raise compiler errors if this is not true. This is stronger than the previous behaviour, which only resulted in compiler warnings for a type mi

[PATCH v4 0/2] kernel.h: container_of() pointer checking

2017-05-23 Thread Ian Abbott
[I screwed up an 'Acked-by:' line on v3.] Patch 2 changes the container_of() macro to improve the compatibility checking when the member has array type. As a bonus (?), if the pointer neither points to a type compatible with the member nor points to a type compatible with void, compiler errors

[PATCH v4 0/2] kernel.h: container_of() pointer checking

2017-05-23 Thread Ian Abbott
[I screwed up an 'Acked-by:' line on v3.] Patch 2 changes the container_of() macro to improve the compatibility checking when the member has array type. As a bonus (?), if the pointer neither points to a type compatible with the member nor points to a type compatible with void, compiler errors

[PATCH v3 1/2] asm-generic/bug.h: declare struct pt_regs; before function prototype

2017-05-23 Thread Ian Abbott
The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> Cc: Arnd Be

[PATCH v3 0/2] kernel.h: container_of() pointer checking

2017-05-23 Thread Ian Abbott
[Apologies for the resend. I got both mailing list addresses wrong!] Patch 2 changes the container_of() macro to improve the compatibility checking when the member has array type. As a bonus (?), if the pointer neither points to a type compatible with the member nor points to a type compatible

[PATCH v3 1/2] asm-generic/bug.h: declare struct pt_regs; before function prototype

2017-05-23 Thread Ian Abbott
The declaration of `__warn()` has `struct pt_regs *regs` as one of its parameters. This can result in compiler warnings if `struct regs` is not already declared. Add an empty declaration of `struct pt_regs` to avoid the warnings. Signed-off-by: Ian Abbott Cc: Arnd Bergmann Acked-by: Acked

[PATCH v3 0/2] kernel.h: container_of() pointer checking

2017-05-23 Thread Ian Abbott
[Apologies for the resend. I got both mailing list addresses wrong!] Patch 2 changes the container_of() macro to improve the compatibility checking when the member has array type. As a bonus (?), if the pointer neither points to a type compatible with the member nor points to a type compatible

[PATCH v3 2/2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
the macro to avoid these warnings. Make sure `*(ptr)` either has type compatible with the member, or has type compatible with `void`, ignoring qualifiers. Raise compiler errors if this is not true. This is stronger than the previous behaviour, which only resulted in compiler warnings for a t

[PATCH v3 2/2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
the macro to avoid these warnings. Make sure `*(ptr)` either has type compatible with the member, or has type compatible with `void`, ignoring qualifiers. Raise compiler errors if this is not true. This is stronger than the previous behaviour, which only resulted in compiler warnings for a type mi

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 23/05/17 14:23, Ian Abbott wrote: On 23/05/17 13:02, Ian Abbott wrote: On 23/05/17 12:24, Peter Zijlstra wrote: On Tue, May 23, 2017 at 11:32:02AM +0100, Ian Abbott wrote: #define container_of(ptr, type, member) (\ _Static_assert(__builtin_types_compatible_p

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 23/05/17 14:23, Ian Abbott wrote: On 23/05/17 13:02, Ian Abbott wrote: On 23/05/17 12:24, Peter Zijlstra wrote: On Tue, May 23, 2017 at 11:32:02AM +0100, Ian Abbott wrote: #define container_of(ptr, type, member) (\ _Static_assert(__builtin_types_compatible_p

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 23/05/17 13:02, Ian Abbott wrote: On 23/05/17 12:24, Peter Zijlstra wrote: On Tue, May 23, 2017 at 11:32:02AM +0100, Ian Abbott wrote: #define container_of(ptr, type, member) (\ _Static_assert(__builtin_types_compatible_p(\ typeof(*ptr), typeof

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 23/05/17 13:02, Ian Abbott wrote: On 23/05/17 12:24, Peter Zijlstra wrote: On Tue, May 23, 2017 at 11:32:02AM +0100, Ian Abbott wrote: #define container_of(ptr, type, member) (\ _Static_assert(__builtin_types_compatible_p(\ typeof(*ptr), typeof

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 23/05/17 12:24, Peter Zijlstra wrote: On Tue, May 23, 2017 at 11:32:02AM +0100, Ian Abbott wrote: #define container_of(ptr, type, member) ( \ _Static_assert(__builtin_types_compatible_p(\ typeof(*ptr), typeof( ((type *)0

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 23/05/17 12:24, Peter Zijlstra wrote: On Tue, May 23, 2017 at 11:32:02AM +0100, Ian Abbott wrote: #define container_of(ptr, type, member) ( \ _Static_assert(__builtin_types_compatible_p(\ typeof(*ptr), typeof( ((type *)0

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 22/05/17 18:58, Michal Nazarewicz wrote: On Mon, May 22 2017, Ian Abbott wrote: If the first parameter of container_of() is a pointer to a non-const-qualified array type (and the third parameter names a non-const-qualified array member), the local variable __mptr will be defined with a const

Re: [PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-23 Thread Ian Abbott
On 22/05/17 18:58, Michal Nazarewicz wrote: On Mon, May 22 2017, Ian Abbott wrote: If the first parameter of container_of() is a pointer to a non-const-qualified array type (and the third parameter names a non-const-qualified array member), the local variable __mptr will be defined with a const

[PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-22 Thread Ian Abbott
riable. This also avoids other GCC extensions. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> Cc: Andrew Morton <a...@linux-foundation.org> Cc: Michal Nazarewicz <min...@mina86.com> Cc: Hidehiro Kawai <hidehiro.kawai...@hitachi.com> Cc: Borislav Petkov <b...@suse.de> C

[PATCH v2] kernel.h: handle pointers to arrays better in container_of()

2017-05-22 Thread Ian Abbott
riable. This also avoids other GCC extensions. Signed-off-by: Ian Abbott Cc: Andrew Morton Cc: Michal Nazarewicz Cc: Hidehiro Kawai Cc: Borislav Petkov Cc: Rasmus Villemoes Cc: Johannes Berg Cc: Peter Zijlstra Cc: Alexander Potapenko --- v2: Rebased and altered description to provide an ex

Re: [PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-24 Thread Ian Abbott
ce_start(pcidev, 2); dev->mmio = pci_ioremap_bar(pcidev, 3); + if (!dev->mmio) + return -ENOMEM; if (pcidev->irq > 0) { ret = request_irq(pcidev->irq, apci3xxx_irq_handler, Looks good. Thanks for the fix. Reviewed-by: Ian Abbott <abbo...

Re: [PATCH 1/1] staging: comedi: addi_apci_3xxx: check return value

2017-04-24 Thread Ian Abbott
pcidev, 3); + if (!dev->mmio) + return -ENOMEM; if (pcidev->irq > 0) { ret = request_irq(pcidev->irq, apci3xxx_irq_handler, Looks good. Thanks for the fix. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH v2] staging: comedi: labpc: fix isadma dependency

2017-03-30 Thread Ian Abbott
+ depends on COMEDI_NI_LABPC_ISA != n + depends on ISA_DMA_API select COMEDI_ISADMA config COMEDI_NI_TIO Thanks for the fix! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2] staging: comedi: labpc: fix isadma dependency

2017-03-30 Thread Ian Abbott
C_ISA != n + depends on ISA_DMA_API select COMEDI_ISADMA config COMEDI_NI_TIO Thanks for the fix! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Ian Abbott
failed to auto-configure and fell back to unconfigured mode. For other devices with no fall back, module loading will fail. -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Ian Abbott
figure and fell back to unconfigured mode. For other devices with no fall back, module loading will fail. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 6/6] staging: comedi: Using macro DIV_ROUND_UP

2017-03-08 Thread Ian Abbott
TIMER_BASE; Thanks. Ideally, this should be split into two patches, one for each driver module, but I guess we can live with a single patch. (I don't know about the other 5 patches in this series.) Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: &l

Re: [PATCH 6/6] staging: comedi: Using macro DIV_ROUND_UP

2017-03-08 Thread Ian Abbott
ally, this should be split into two patches, one for each driver module, but I guess we can live with a single patch. (I don't know about the other 5 patches in this series.) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-08 Thread Ian Abbott
till need to check the value. It doesn't matter either way.) Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2 1/2] Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

2017-03-08 Thread Ian Abbott
_minors\". Valid values are 0 through %i.\n", COMEDI_NUM_BOARD_MINORS); return -EINVAL; Thanks. (There is no harm in making the parameter unsigned short rather than unsigned int, although it's probably not worth it as you still need to check the value. It

Re: [PATCH 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Ian Abbott
be used when comedi_num_legacy_minors=48 by configuring a "legacy" comedi_test device. Most of the other Comedi drivers support "legacy" devices exclusive-or auto-configured devices. Thanks. Brgds, CheahKC regards, dan carpenter -- -=( Ian Abbott @ MEV Ltd.E-mail

Re: [PATCH 2/2] Staging: comedi: comedi_fops: Fix "out of minor numbers for board device files"

2017-03-08 Thread Ian Abbott
be used when comedi_num_legacy_minors=48 by configuring a "legacy" comedi_test device. Most of the other Comedi drivers support "legacy" devices exclusive-or auto-configured devices. Thanks. Brgds, CheahKC regards, dan carpenter -- -=( Ian Abbott

Re: [PATCH v1 3/3] staging: comedi: Replace "is is" with "is"

2017-03-08 Thread Ian Abbott
s the command * Looks good. Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v1 3/3] staging: comedi: Replace "is is" with "is"

2017-03-08 Thread Ian Abbott
rs/ni_usb6501.c @@ -45,7 +45,7 @@ * byte 3 is the total packet length * * byte 4 is always 00 - * byte 5 is is the total packet length - 4 + * byte 5 is the total packet length - 4 * byte 6 is always 01 * byte 7 is the command * Looks good. Reviewed-by: Ian Abbott

Re: [Outreachy kernel] [PATCH 1/3] staging: rtl8192u: Replace "is is" with "is"

2017-03-08 Thread Ian Abbott
npt arguments. If is a command queue message or I can't figure out how to parse "If is a command...". I think it should be "If it is a command...". -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [Outreachy kernel] [PATCH 1/3] staging: rtl8192u: Replace "is is" with "is"

2017-03-08 Thread Ian Abbott
and queue message or I can't figure out how to parse "If is a command...". I think it should be "If it is a command...". -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-22 Thread Ian Abbott
/* unexpected underrun! (cancelled?) */ async->events |= COMEDI_CB_OVERFLOW; goto underrun; Looks good, thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: &l

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-22 Thread Ian Abbott
/* unexpected underrun! (cancelled?) */ async->events |= COMEDI_CB_OVERFLOW; goto underrun; Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-21 Thread Ian Abbott
On 21/02/2017 09:33, Cheah Kok Cheong wrote: On Mon, Feb 20, 2017 at 05:36:52PM +, Ian Abbott wrote: On 20/02/17 16:02, Cheah Kok Cheong wrote: On Mon, Feb 20, 2017 at 10:03:39AM +, Ian Abbott wrote: On 20/02/17 08:28, Cheah Kok Cheong wrote: Fix checkpatch warning "Avoid mul

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-21 Thread Ian Abbott
On 21/02/2017 09:33, Cheah Kok Cheong wrote: On Mon, Feb 20, 2017 at 05:36:52PM +, Ian Abbott wrote: On 20/02/17 16:02, Cheah Kok Cheong wrote: On Mon, Feb 20, 2017 at 10:03:39AM +, Ian Abbott wrote: On 20/02/17 08:28, Cheah Kok Cheong wrote: Fix checkpatch warning "Avoid mul

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-20 Thread Ian Abbott
On 20/02/17 16:02, Cheah Kok Cheong wrote: On Mon, Feb 20, 2017 at 10:03:39AM +, Ian Abbott wrote: On 20/02/17 08:28, Cheah Kok Cheong wrote: Fix checkpatch warning "Avoid multiple line dereference" using a local variable to avoid line wrap. Signed-off-by: Cheah Kok Che

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-20 Thread Ian Abbott
On 20/02/17 16:02, Cheah Kok Cheong wrote: On Mon, Feb 20, 2017 at 10:03:39AM +, Ian Abbott wrote: On 20/02/17 08:28, Cheah Kok Cheong wrote: Fix checkpatch warning "Avoid multiple line dereference" using a local variable to avoid line wrap. Signed-off-by: Cheah Kok Cheong -

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-20 Thread Ian Abbott
This leaves devpriv->ao_loopbacks[chan] unchanged. -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] Staging: comedi: drivers: comedi_test: Avoid multiple line dereference

2017-02-20 Thread Ian Abbott
gt;ao_loopbacks[chan] unchanged. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v3] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-16 Thread Ian Abbott
s drivers/staging/comedi/drivers/comedi_test.c | 135 --- 1 file changed, 123 insertions(+), 12 deletions(-) It all seems to be in order now. Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=-

Re: [PATCH v3] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-16 Thread Ian Abbott
rivers/comedi_test.c | 135 --- 1 file changed, 123 insertions(+), 12 deletions(-) It all seems to be in order now. Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-16 Thread Ian Abbott
On 15/02/17 06:05, Cheah Kok Cheong wrote: On Mon, Feb 13, 2017 at 11:14:14AM +, Ian Abbott wrote: On 11/02/17 10:37, Cheah Kok Cheong wrote: [snip] +static void __exit comedi_test_exit(void) +{ + comedi_auto_unconfig(ctdev); + + device_destroy(ctcls, MKDEV(0, 0

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-16 Thread Ian Abbott
On 15/02/17 06:05, Cheah Kok Cheong wrote: On Mon, Feb 13, 2017 at 11:14:14AM +, Ian Abbott wrote: On 11/02/17 10:37, Cheah Kok Cheong wrote: [snip] +static void __exit comedi_test_exit(void) +{ + comedi_auto_unconfig(ctdev); + + device_destroy(ctcls, MKDEV(0, 0

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-13 Thread Ian Abbott
calls need to go in an 'if' statement. Perhaps you could use 'if (ctcls) {', and set 'ctcls = NULL;' after calling 'class_destroy(ctcls);' in the init function. Apart from that, it looks fine. + + comedi_driver_unregister(_driver); +} +module_exit(comedi_test_exit

Re: [PATCH v2] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-13 Thread Ian Abbott
an 'if' statement. Perhaps you could use 'if (ctcls) {', and set 'ctcls = NULL;' after calling 'class_destroy(ctcls);' in the init function. Apart from that, it looks fine. + + comedi_driver_unregister(_driver); +} +module_exit(comedi_test_exit); MODULE_AUTHOR("Comedi http://www.comedi.org;); MODULE_DESCRIPTION("Comedi low-level driver"); -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config

2017-02-09 Thread Ian Abbott
oduced by the driver, not system performance. -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] Staging: comedi: drivers: comedi_test: Set max input value for auto config

2017-02-09 Thread Ian Abbott
, not system performance. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-09 Thread Ian Abbott
I devices even if they fail. + +static void __exit comedi_test_exit(void) +{ + if (!config_mode) + comedi_auto_unconfig(ctdev); + + comedi_driver_unregister(_driver); + + if (!config_mode) { + device_destroy(ctcls, MKDEV(0, 0)); + class_de

Re: [PATCH] Staging: comedi: drivers: comedi_test: Add auto-configuration capability

2017-02-09 Thread Ian Abbott
they fail. + +static void __exit comedi_test_exit(void) +{ + if (!config_mode) + comedi_auto_unconfig(ctdev); + + comedi_driver_unregister(_driver); + + if (!config_mode) { + device_destroy(ctcls, MKDEV(0, 0)); + class_destroy(ctcls); + } +} +module_exit(comedi_test_exit); MODULE_AUTHOR("Comedi http://www.comedi.org;); MODULE_DESCRIPTION("Comedi low-level driver"); -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: Fix incorrect type assignment

2017-02-09 Thread Ian Abbott
//ni_pcimio.c:1229:32:expected restricted __be32 [usertype] serial_number drivers/staging/comedi/drivers//ni_pcimio.c:1229:32:got unsigned int This is done by removing the whole code block, since the variable 'serial_number' is only assigned but never used. Helped-by: Ian Abbott <a

Re: [PATCH] staging: comedi: Fix incorrect type assignment

2017-02-09 Thread Ian Abbott
//ni_pcimio.c:1229:32:expected restricted __be32 [usertype] serial_number drivers/staging/comedi/drivers//ni_pcimio.c:1229:32:got unsigned int This is done by removing the whole code block, since the variable 'serial_number' is only assigned but never used. Helped-by: Ian Abbott There's

Re: [PATCH 2/2] staging: comedi: drop unused variable from struct 'ni_private'

2017-02-08 Thread Ian Abbott
u8 eeprom_buffer[M_SERIES_EEPROM_SIZE]; - unsigned int serial_number; struct mite *mite; struct mite_channel *ai_mite_chan; -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 2/2] staging: comedi: drop unused variable from struct 'ni_private'

2017-02-08 Thread Ian Abbott
ES_EEPROM_SIZE]; - unsigned int serial_number; struct mite *mite; struct mite_channel *ai_mite_chan; -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: Fix incorrect type assignment

2017-02-08 Thread Ian Abbott
On 08/02/17 13:26, Karthik Nayak wrote: Hello, On Wed, Feb 8, 2017 at 6:43 PM, Ian Abbott <abbo...@mev.co.uk> wrote: On 07/02/17 19:06, Karthik Nayak wrote: This patch fixes the following sparse error: drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assi

Re: [PATCH] staging: comedi: Fix incorrect type assignment

2017-02-08 Thread Ian Abbott
On 08/02/17 13:26, Karthik Nayak wrote: Hello, On Wed, Feb 8, 2017 at 6:43 PM, Ian Abbott wrote: On 07/02/17 19:06, Karthik Nayak wrote: This patch fixes the following sparse error: drivers/staging/comedi/drivers//ni_pcimio.c:1229:32: warning: incorrect type in assignment (different base

Re: [PATCH] staging: comedi: Fix incorrect type assignment

2017-02-08 Thread Ian Abbott
ZE]; - __be32 serial_number; + unsigned int serial_number; struct mite *mite; struct mite_channel *ai_mite_chan; That looks fine, thanks! (On a side note, nothing actually uses serial number, so the code that reads it from the EEPROM could just be ripped out.

Re: [PATCH] staging: comedi: Fix incorrect type assignment

2017-02-08 Thread Ian Abbott
umber; + unsigned int serial_number; struct mite *mite; struct mite_channel *ai_mite_chan; That looks fine, thanks! (On a side note, nothing actually uses serial number, so the code that reads it from the EEPROM could just be ripped out.) Reviewed-by: Ian Abbott -- -=(

[PATCH] staging: comedi: ni_660x: Support PCI-6224

2017-01-16 Thread Ian Abbott
Add support for the NI PCI-6224 board, assuming it behaves like the NI PXI-6224 board at the register level. The PCI device ID comes from the "nitiowv.inf" file in National Instrument's Windows drivers. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> --- drivers/stagin

[PATCH] staging: comedi: ni_660x: Support PCI-6224

2017-01-16 Thread Ian Abbott
Add support for the NI PCI-6224 board, assuming it behaves like the NI PXI-6224 board at the register level. The PCI device ID comes from the "nitiowv.inf" file in National Instrument's Windows drivers. Signed-off-by: Ian Abbott --- drivers/staging/comedi/Kconfig | 2 +

[PATCH] staging: comedi: ni_pcimio: Support more PXI cards

2017-01-16 Thread Ian Abbott
1 and PXIe-6251 need moving. Signed-off-by: Ian Abbott <abbo...@mev.co.uk> --- drivers/staging/comedi/Kconfig | 8 +- drivers/staging/comedi/drivers/ni_pcimio.c | 173 +++-- 2 files changed, 167 insertions(+), 14 deletions(-) diff --git a/drivers/staging/

[PATCH] staging: comedi: ni_pcimio: Support more PXI cards

2017-01-16 Thread Ian Abbott
1 and PXIe-6251 need moving. Signed-off-by: Ian Abbott --- drivers/staging/comedi/Kconfig | 8 +- drivers/staging/comedi/drivers/ni_pcimio.c | 173 +++-- 2 files changed, 167 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/Kconfig b/drive

Re: [PATCH 0/4] Staging: comedi: comedi_fops: Header cleanup

2017-01-09 Thread Ian Abbott
vmalloc.h header Staging: comedi: comedi_fops: Remove unused stat.h header drivers/staging/comedi/comedi_fops.c | 4 1 file changed, 4 deletions(-) I wasn't sure about the removal of the #include , but it seems to make sense. Thanks. Reviewed-by: Ian Abbott <abbo...@mev.co

Re: [PATCH 0/4] Staging: comedi: comedi_fops: Header cleanup

2017-01-09 Thread Ian Abbott
vmalloc.h header Staging: comedi: comedi_fops: Remove unused stat.h header drivers/staging/comedi/comedi_fops.c | 4 1 file changed, 4 deletions(-) I wasn't sure about the removal of the #include , but it seems to make sense. Thanks. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd

Re: [PATCH] Staging: comedi: comedidev.h: Drop old style zero-length array

2017-01-03 Thread Ian Abbott
ern const struct comedi_lrange range_unknown; */ struct comedi_lrange { int length; - struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; + struct comedi_krange range[]; }; /** Yes, that seems to be redundant. Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> --

Re: [PATCH] Staging: comedi: comedidev.h: Drop old style zero-length array

2017-01-03 Thread Ian Abbott
nge range_unknown; */ struct comedi_lrange { int length; - struct comedi_krange range[GCC_ZERO_LENGTH_ARRAY]; + struct comedi_krange range[]; }; /** Yes, that seems to be redundant. Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-m

Re: [PATCH] Staging: comedi: comedi_compat32: fixed a syntax error

2017-01-03 Thread Ian Abbott
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2016-December/097854.html -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] Staging: comedi: comedi_compat32: fixed a syntax error

2017-01-03 Thread Ian Abbott
://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2016-December/097854.html -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 0/5] Staging: comedi: Proc FS related cleanup

2017-01-03 Thread Ian Abbott
Staging: comedi: proc: Add module owner Staging: comedi: proc: Warn if unable to create proc entry drivers/staging/comedi/comedi_fops.c | 6 +++--- drivers/staging/comedi/proc.c| 6 -- 2 files changed, 7 insertions(+), 5 deletions(-) Looks good, thanks! Reviewed-by: Ian Abbott

Re: [PATCH 0/5] Staging: comedi: Proc FS related cleanup

2017-01-03 Thread Ian Abbott
Staging: comedi: proc: Add module owner Staging: comedi: proc: Warn if unable to create proc entry drivers/staging/comedi/comedi_fops.c | 6 +++--- drivers/staging/comedi/proc.c| 6 -- 2 files changed, 7 insertions(+), 5 deletions(-) Looks good, thanks! Reviewed-by: Ian Abbott

Re: [PATCH] staging: comedi: cb_pcidas64: Fixed coding issue about multiple line dereferencing

2016-12-19 Thread Ian Abbott
Please put all declarations within a block before any statements in the block (in other words, avoid mixing declarations with code), and use a blank line to separate the declarations from the statements. -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=(

Re: [PATCH] staging: comedi: cb_pcidas64: Fixed coding issue about multiple line dereferencing

2016-12-19 Thread Ian Abbott
ck before any statements in the block (in other words, avoid mixing declarations with code), and use a blank line to separate the declarations from the statements. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: dyna_pci10xx: fixed check patch warnings about memory barrier comments

2016-12-19 Thread Ian Abbott
'/*' and before the '*/'. -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: dyna_pci10xx: fixed check patch warnings about memory barrier comments

2016-12-19 Thread Ian Abbott
; insn->n; n++) { + /*multi-processor memory barrier*/ smp_mb(); Thanks for the effort, but these comments add no useful information and serve only to silence the checkpatch warnings. Also, there is no space after the '/*' and before the '*/'. -- -=( Ian Abbott

Re: [PATCH] staging: comedi: ni_670x: using the BIT(x) macro

2016-12-19 Thread Ian Abbott
(+), 1 deletion(-) Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: ni_670x: using the BIT(x) macro

2016-12-19 Thread Ian Abbott
(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: ni_at_ao: using the BIT(x) macro

2016-12-19 Thread Ian Abbott
-- 1 file changed, 31 insertions(+), 31 deletions(-) Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH] staging: comedi: ni_at_ao: using the BIT(x) macro

2016-12-19 Thread Ian Abbott
insertions(+), 31 deletions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 3/3] staging: comedi: cb_pcidas64: use preferred kernel type u32

2016-12-19 Thread Ian Abbott
+), 19 deletions(-) Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 3/3] staging: comedi: cb_pcidas64: use preferred kernel type u32

2016-12-19 Thread Ian Abbott
! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 2/3] staging: comedi: cb_pcidas64: use preferred kernel type u16

2016-12-19 Thread Ian Abbott
+), 29 deletions(-) Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 2/3] staging: comedi: cb_pcidas64: use preferred kernel type u16

2016-12-19 Thread Ian Abbott
! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=-

Re: [PATCH 1/3] staging: comedi: cb_pcidas64: use preferred kernel type u8

2016-12-19 Thread Ian Abbott
+), 23 deletions(-) Thanks! Reviewed-by: Ian Abbott <abbo...@mev.co.uk> -- -=( Ian Abbott @ MEV Ltd.E-mail: <abbo...@mev.co.uk> )=- -=( Web: http://www.mev.co.uk/ )=-

<    1   2   3   4   5   6   7   8   9   10   >