Re: [PATCH 1/1] staging: comedi: ni_pcidio.c: Spaces preferred around operators

2017-02-13 Thread Ian Abbott
#define IntEn (TransferReady|CountExpired|Waited|PrimaryTC|SecondaryTC) +#define IntEn (TransferReady | CountExpired | Waited | PrimaryTC | SecondaryTC) #endif enum nidio_boardid { That looks fine, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2 1/1] staging: comedi: dyna_pci10xx: usleep_range is preferred over udelay

2017-02-13 Thread Ian Abbott
3); - udelay(10); + usleep_range(10, 100); } data[1] = s->state; That looks fine, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- _

Re: [PATCH 1/1] staging: comedi: dt2815: usleep_range is preferred over udelay

2017-02-10 Thread Ian Abbott
ine, thanks! (Perhaps 'msleep(1);' would be better, although that might make the "incredibly slow" attach even slower if no hrtimer is available.) Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( We

Re: [PATCH 1/1] staging: comedi: s626: usleep_range is preferred over udelay

2017-02-10 Thread Ian Abbott
loop. I suggest using a tighter range such as 'usleep_range(10, 20);'. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdri

Re: [PATCH 1/1] staging: comedi: dyna_pci10xx: usleep_range is preferred over udelay

2017-02-10 Thread Ian Abbott
smp_mb(); outw_p(s->state, devpriv->BADR3); - udelay(10); + usleep_range(10, 100); } data[1] = s->state; Those ones are okay. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH 1/1] staging: comedi: dt2814: usleep_range is preferred over udelay

2017-02-10 Thread Ian Abbott
; outb(0, dev->iobase + DT2814_CSR); - udelay(100); + usleep_range(100, 200); if (inb(dev->iobase + DT2814_CSR) & DT2814_ERR) { dev_err(dev->class_dev, "reset error (fatal)\n"); return -EIO; It looks fine, thanks!

Re: [PATCH 1/1] staging: comedi: dt2801: usleep_range is preferred over udelay

2017-02-10 Thread Ian Abbott
gt;iobase + DT2801_CMD); /* dt2801_writecmd(dev,DT_C_RESET); */ - udelay(100); + usleep_range(100, 200); timeout = 1; do { stat = inb_p(dev->iobase + DT2801_STATUS); It looks fine, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ M

Re: [PATCH 1/1] staging: comedi: ni_at_a2150: usleep_range is preferred over udelay

2017-02-10 Thread Ian Abbott
It looks fine, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mai

Re: [PATCH 1/1] staging: comedi: dmm32at: usleep_range is preferred over udelay

2017-02-09 Thread Ian Abbott
nks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2017-02-09 Thread Ian Abbott
river, not system performance. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

2017-02-09 Thread Ian Abbott
ializing completely, since the module could still be used by manually configured COMEDI devices even if they fail. + +static void __exit comedi_test_exit(void) +{ + if (!config_mode) + comedi_auto_unconfig(ctdev); + + comedi_driver_unregister(&waveform_driver); + + if (!config_mode)

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

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

2017-02-08 Thread Ian Abbott
fer[M_SERIES_EEPROM_SIZE]; - __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 rip

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: )=- -=( 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 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

[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 |

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

2017-01-16 Thread Ian Abbott
I-6251 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/

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 @ ME

[PATCH 10/14] staging: comedi: daqboard2000: use shorter, consistent prefix

2017-01-04 Thread Ian Abbott
Use a consistent prefix of `db2k_` or `DB2K_` for identifiers. The existing prefixes `DAQBOARD2000_` and `daqboard2000_` are a bit on the lengthy side. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 214 -- 1 file changed, 100 insertions

[PATCH 13/14] staging: comedi: daqboard2000: change COMEDI device names

2017-01-04 Thread Ian Abbott
The COMEDI device name strings are currently set to "ids2" for the DaqBoard/2000, and to "ids4" for the DaqBoard/2001. Change them to "daqboard2000" and "daqboard2001" respectively. (The COMEDI driver name string is also "daqboard2000".) Sign

[PATCH 14/14] staging: comedi: daqboard2000: use pci_id_table 'driver_data'

2017-01-04 Thread Ian Abbott
so remove it. Also remove the subdevice ID macros `DB2K_SUBSYSTEM_IDS2` and `DB2K_SUBSYSTEM_IDS4` as the subdevice IDs are now specified as numbers in the PCI device table. Remove `db2k_find_boardinfo()` as it is no longer used. Signed-off-by: Ian Abbott --- drivers/staging/come

[PATCH 12/14] staging: comedi: daqboard2000: support 4 AO channels

2017-01-04 Thread Ian Abbott
appropriate. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index 18933c2565d9..8f0325ef0012 100644

[PATCH 11/14] staging: comedi: daqboard2000: use designated initializers

2017-01-04 Thread Ian Abbott
Replace the undesignated initializers for each element of `db2k_boardtypes[]` with an equivalent designated initializer for ease of future maintenance. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions

[PATCH 08/14] staging: comedi: daqboard2000: check CPLD status before writing firmware data

2017-01-04 Thread Ian Abbott
bit to be set is performed by new function `daqboard2000_wait_cpld_txready()`, which returns 0 if the status bit is set within 100 microseconds, or `-ETIMEDOUT` if not. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 41 ++- 1 file changed, 34

[PATCH 06/14] staging: comedi: daqboard2000: change daqboard2000_write_cpld() return value

2017-01-04 Thread Ian Abbott
`daqboard2000_write_cpld()` currently returns 1 on success, or 0 on failure. Change it to return 0 on success, or `-EIO` on failure. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 09/14] staging: comedi: daqboard2000: remove unused 'card' member

2017-01-04 Thread Ian Abbott
The `card` member of `struct daqboard2000_private` and the enumerated constant `card_daqboard_2000` are not used. Remove them. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/drivers

[PATCH 00/14] staging: comedi: daqboard2000: some clean-up

2017-01-04 Thread Ian Abbott
I've had these clean-up patches for the daqboard2000 driver sitting around for a few months, with a view to adding support for more boards in the same series, and adding support for extra subdevice types. I never got around to doing that, but I did manage to add support for a couple of extra DAC c

[PATCH 01/14] staging: comedi: daqboard2000: use macros from "plx9080.h"

2017-01-04 Thread Ian Abbott
board2000_auto_attach()` where the value is just thrown away, as it seems to serve no purpose there (such as flushing PCI writes). Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff

[PATCH 05/14] staging: comedi: daqboard2000: replace daqboard2000_poll_cpld()

2017-01-04 Thread Ian Abbott
f it has used up all its firmware loading attempts and that was the last error. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 33 +++ 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/drivers/daqboard2000.

[PATCH 07/14] staging: comedi: daqboard2000: check result of FPGA programming

2017-01-04 Thread Ian Abbott
runs out of checks. Call it from the firmware loading callback `daqboard2000_load_firmware()` after writing the firmware to the FPGA to check it is programmed successfully. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 19 +++ 1 file changed, 19 insertio

[PATCH 04/14] staging: comedi: daqboard2000: check firmware length

2017-01-04 Thread Ian Abbott
each time through the retry loop. Change it to adjust the start position and length before entering the loop. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/staging

[PATCH 03/14] staging: comedi: daqboard2000: use type 'u16' for CPLD data and status

2017-01-04 Thread Ian Abbott
The CPLD status and data registers used to load firmware are 16 bits wide. Use the type `u16` to represent data and status values instead of `int`. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PATCH 02/14] staging: comedi: daqboard2000: define macros for CPLD registers

2017-01-04 Thread Ian Abbott
register values for consistency. (Two status bits are defined, but the driver code only seems to use one of them.) Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/daqboard2000.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/staging

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
lied yet. http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2016-December/097854.html -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverp

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
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.

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

2016-12-19 Thread Ian Abbott
= 0; n < 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 &#

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/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev

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/ )=- ___ devel mailing list de...@linuxdriverproject.org http

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

2016-12-19 Thread Ian Abbott
letions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailma

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

2016-12-19 Thread Ian Abbott
letions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailma

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

2016-12-19 Thread Ian Abbott
letions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailma

[PATCH 10/12] staging: comedi: comedi_pcmcia.[ch]: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_pcmcia.c | 3 ++- drivers/staging/comedi/comedi_pcmcia.h | 22 -- 2 files ch

[PATCH 09/12] staging: comedi: comedi_internal.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_internal.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH 08/12] staging: comedi: comedi_compat32.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_compat32.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/come

[PATCH 11/12] staging: comedi: comedi_usb.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_usb.h | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/dr

[PATCH 07/12] staging: comedi: ni_tio_internal.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_tio_internal.h | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --g

[PATCH 12/12] staging: comedi: comedidev.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedidev.h | 47 -- 1 file changed, 25 insertions(+), 22 deletions(-)

[PATCH 01/12] staging: comedi: addi_watchdog.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/addi_watchdog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/st

[PATCH 03/12] staging: comedi: comedi_isadma.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/comedi_isadma.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dr

[PATCH 00/12] staging: comedi: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name" in various comedi header files. I omitted comedi_pci.h because Piotr Gregor already submitted a patch for that one. 01) staging: comedi: addi_watchdog.h: add identifiers to function

[PATCH 06/12] staging: comedi: ni_tio.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_tio.h | 42 + 1 file changed, 22 insertions(+), 20 deletions(-)

[PATCH 02/12] staging: comedi: comedi_8254.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/comedi_8254.h | 30 +++- 1 file changed, 16 insertions(+), 14 deletions(-)

[PATCH 05/12] staging: comedi: ni_labpc.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_labpc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/st

[PATCH 04/12] staging: comedi: mite.h: add identifiers to function parameters

2016-12-15 Thread Ian Abbott
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/mite.h | 37 ++- 1 file changed, 19 insertions(+), 18 deletions(-)

Re: [PATCH] drivers: staging: comedi: fix function prototypes

2016-12-15 Thread Ian Abbott
claration is just as clear as "struct foo *bar". Maybe, but checkpatch.pl doesn't agree (not since commit ca0d8929e75ab1f860f61208d46955f280a1b05e anyway)! -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- __

Re: [PATCH] drivers: staging: comedi: fix function prototypes

2016-12-15 Thread Ian Abbott
); /** * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de

Re: staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()

2016-12-08 Thread Ian Abbott
sizes; `urb` and `*devpriv->ai_urbs` have the same type `struct urb *`. Having said that, `sizeof(*devpriv->ai_urbs)` is cleaner code than `sizeof(urb)` in this case. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://w

[PATCH] staging: comedi: comedidev.h: Document usage of 'detach' handler

2016-12-08 Thread Ian Abbott
ready mentioned as part of the documentation for `comedi_auto_config()`, but is useful to document it for `struct comedi_driver` as well, since `comedi_auto_config()` is not usually called directly by low-level comedi drivers, and it is not called at all for "legacy" comedi devices that are

Re: [PATCH 4/5] staging: comedi: usbduxsigma: Split a condition check in usbduxsigma_alloc_usb_buffers()

2016-12-08 Thread Ian Abbott
ts on PATCH 2/5 about how comedi drivers handle clean-up apply to this patch too. So this patch will cause an Oops in the unlikely event of running out of memory during buffer allocation. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH 2/5] staging: comedi: usbdux: Split a condition check in usbdux_alloc_usb_buffers()

2016-12-08 Thread Ian Abbott
_buffers(). The net result is that devpriv->dux_commands and the others will be passed to kfree() twice, leading to the oops. That could be prevented by settting devpriv->dux_commands and the others to NULL in the error handling of usbdux_alloc_usb_buffers(),

Re: [PATCH] Staging: comedi: kcomedilib: Add module_init/exit function

2016-12-05 Thread Ian Abbott
kcomedilib_module_exit(void) +{ +} + +module_init(kcomedilib_module_init); +module_exit(kcomedilib_module_exit); Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk

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

2016-11-25 Thread Ian Abbott
7;u32' over 'uint32_t' Signed-off-by: Saber Rezvani --- drivers/staging/comedi/drivers/s626.c | 58 +-- 1 file changed, 29 insertions(+), 29 deletions(-) Thanks. Again, it's okay apart from the extra header stuff. Reviewed-by: Ian Abbott

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

2016-11-25 Thread Ian Abbott
7;u16' over 'uint16_t' Signed-off-by: Saber Rezvani --- drivers/staging/comedi/drivers/s626.c | 96 +-- 1 file changed, 48 insertions(+), 48 deletions(-) Thanks. It's okay apart from the extra header stuff in the patch description.

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

2016-11-25 Thread Ian Abbott
+ 1 file changed, 16 insertions(+), 16 deletions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@li

[PATCH 1/3] staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask

2016-11-14 Thread Ian Abbott
. Correct it. Fixes: 817144ae7fda ("staging: comedi: ni_mio_common: remove unnecessary use of 'board->adbits'") Signed-off-by: Ian Abbott Cc: # 4.7+ --- Needs backporting to stable kernels >= 3.17 --- drivers/staging/comedi/drivers/ni_mio_common.c | 2 +- 1 file changed,

[PATCH 2/3] staging: comedi: ni_mio_common: fix E series ni_ai_insn_read() data

2016-11-14 Thread Ian Abbott
]` with the mask 0x. Fixes: 0557344e2149 ("staging: comedi: ni_mio_common: fix local var for 32-bit read") Signed-off-by: Ian Abbott Cc: # 4.7+ Needs backporting to stable kernels 3.18 onwards. --- drivers/staging/comedi/drivers/ni_mio_common.c | 5 ++--- 1 file changed, 2 inse

[PATCH 3/3] staging: comedi: ni_mio_common: remove variable 'dl' in ni_ai_insn_read()

2016-11-14 Thread Ian Abbott
In `ni_ai_insn_read()`, local variable `dl` is declared as `unsigned long`, but `unsigned int` will do. Get rid of it and use local variable `d` instead. (That used to be `unsigned short`, but has been `unsigned int` since kernel version 3.18.) Signed-off-by: Ian Abbott --- drivers/staging

[PATCH 0/3] staging: comedi: ni_mio_common: ni_ai_insn_read() fixes

2016-11-14 Thread Ian Abbott
A couple of bug fixes for incorrect sample data read by ni_ai_insn_read(), plus removal of an unnecessary variable. 1) staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask 2) staging: comedi: ni_mio_common: fix E series ni_ai_insn_read() data 3) staging: comedi: ni_mio_commo

Re: [PATCH 10/15] staging: comedi: tio: implement global tio/ctr routing

2016-11-10 Thread Ian Abbott
red for output. + */ +int ni_tio_get_routing(struct ni_gpct_device *counter_dev, + unsigned int destination); The kerneldoc comments should go with the function definitions, not the declarations. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH 08/15] staging: comedi: ni_mio_common: implement global pfi,rtsi routing

2016-11-10 Thread Ian Abbott
atic inline void ni_set_pfi_direction(struct comedi_device *dev, int chan, + unsigned int direction) We tend not to use 'inline' in .c files, and let the compiler figure it out. (Sorry for the partially repeated email.) -- -=( Ian A

Re: [PATCH 08/15] staging: comedi: ni_mio_common: implement global pfi,rtsi routing

2016-11-10 Thread Ian Abbott
_PFI(0)) + /* allow new and old names of pfi channels to work. */ + chan -= NI_PFI(0); I think the last time I asked Greg about this, that counts as two lines under the 'if' as far as the coding style rules are concerned, so it should have braces. -- -=( Ian

Re: [PATCH 02/15] staging: comedi: add abstracted NI signal/terminal named constants

2016-11-10 Thread Ian Abbott
On 10/11/16 18:57, Spencer E Olson wrote: On Thu, 2016-11-10 at 16:29 +, Ian Abbott wrote: On 12/10/16 12:05, Spencer E. Olson wrote: + * Base of abstracted NI names. + * The first 16 bits of *_arg are reserved for channel selection. + * Since we only actually need the first 4 or 5 bits

Re: [PATCH 06/15] staging: comedi: add interface to ni routing table information

2016-11-10 Thread Ian Abbott
_reg_value(O(0), O(1), T) == 0, +"check trigger arg for first src->dest\n"); + unittest(ni_get_reg_value(O(5), O(6), T) == 5, + "check trigger arg for middle src->dest\n"); + unittest(ni_get_reg_valu

Re: [PATCH 04/15] staging: comedi: ni_routing: add ni routing tables

2016-11-10 Thread Ian Abbott
On 10/11/16 17:54, Greg Kroah-Hartman wrote: On Thu, Nov 10, 2016 at 05:17:22PM +, Ian Abbott wrote: On 12/10/16 12:05, Spencer E. Olson wrote: Adds tables of all register values for routing various signals to various terminals on National Instruments hardware. This information is

Re: [PATCH 03/15] staging: comedi: ni_routing: Add NI signal routing info

2016-11-10 Thread Ian Abbott
On 10/11/16 17:54, Greg Kroah-Hartman wrote: On Thu, Nov 10, 2016 at 05:08:36PM +, Ian Abbott wrote: On 12/10/16 12:05, Spencer E. Olson wrote: See README for a thorough discussion of this content. Adds two different collections of CSV files that: 1) summarize the various register values

Re: [PATCH 05/15] staging: comedi: add new device-global config interface

2016-11-10 Thread Ian Abbott
if (!dev->get_valid_routes) + dev->get_valid_routes = get_zero_valid_routes; + for (i = 0; i < dev->n_subdevices; i++) { s = &dev->subdevices[i]; -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://w

Re: [PATCH 04/15] staging: comedi: ni_routing: add ni routing tables

2016-11-10 Thread Ian Abbott
or it to be accepted. Since the problem is the number of lines, perhaps it can be split? -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproje

Re: [PATCH 03/15] staging: comedi: ni_routing: Add NI signal routing info

2016-11-10 Thread Ian Abbott
erated C files, I'm a bit worried that any future patches to these .csv files will also be incompatible with sending by email. I'm not sure of the best way to deal with this. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH 02/15] staging: comedi: add abstracted NI signal/terminal named constants

2016-11-10 Thread Ian Abbott
hand, writing `(1U << 15)` encourages people to submit patches to change it back to `BIT(15)`. So a `0x8000u` works well here. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel m

Re: [PATCH 01/15] staging: comedi: tests: add unittest framework for comedi

2016-11-10 Thread Ian Abbott
t;end of comedi:\"%s\" unittests - %i passed, %i failed\n", name, + unittest_results.passed, unittest_results.failed); +} + +#endif /* _COMEDI_DRIVERS_TESTS_UNITTEST_H */ -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- __

Re: [PATCH] staging: comedi: ni_tio: fix warnings of uninitialized variables

2016-10-31 Thread Ian Abbott
alize 'clk_src' and return early if 'ni_tio_generic_clock_src_select' returns an error. (I don't think you need to resend the patch for that, as I'm sure Greg can figure it out.) Apart from that, the patch looks fine, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott

[PATCH] staging: comedi: ni_tio: fix buggy ni_tio_clock_period_ps() return value

2016-10-27 Thread Ian Abbott
i_tio: remove BUG() checks for ni_tio_get_clock_src()") Signed-off-by: Ian Abbott Cc: # 4.7+ --- drivers/staging/comedi/drivers/ni_tio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c ind

Re: [PATCH v2] staging: comedi: ni_mio_common: split out ao arming from ni_ao_inttrig

2016-10-10 Thread Ian Abbott
ing/comedi/drivers/ni_mio_common.c | 150 - drivers/staging/comedi/drivers/ni_stc.h| 14 +++ 2 files changed, 112 insertions(+), 52 deletions(-) Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH] staging: comedi: ni_mio_common: split out ao arming from ni_ao_inttrig

2016-10-10 Thread Ian Abbott
_arming' or 'ao_cmd_needs_arming' to make it clear it is only for AO subdevices. The comment may need rewording slightly as a consequence. }; static const struct comedi_lrange range_ni_E_ao_ext; -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=(

Re: [PATCH] staging: comedi: make constants slightly more consistent

2016-10-10 Thread Ian Abbott
: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: comedi: porting NI_GPCT constants from comedi.org module

2016-10-10 Thread Ian Abbott
: Spencer E. Olson --- drivers/staging/comedi/comedi.h | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk

Re: [PATCH] staging: comedi_fops: fix checkpatch permission warnings

2016-09-13 Thread Ian Abbott
quot; task in the coming days/weeks. At least I got the submission part right, didn't I? Yes, the submission was fine! -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel

Re: [PATCH] staging: comedi: comedi_pcmcia: Fixes multiple blank lines issue

2016-09-12 Thread Ian Abbott
_pcmcia.h" /** But there is only one blank line, so why the warning about multiple blank lines? -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@

Re: [PATCH resend] staging: comedi: comedi_fops: coding style fixes

2016-09-12 Thread Ian Abbott
fault " __MODULE_STRING(CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB) ")"); It looks like the octal permissions have been blessed from above (Linus), so this is good. Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=-

Re: [PATCH resend] staging: comedi: comedi_fops: coding style fixes

2016-09-12 Thread Ian Abbott
said I was fine with the octal constants, but on reflection, I'm not sure it's worth changing them just for the hell of it. We'd probably get a patch from someone else later to change it back to symbolic constants. Is there an actual coding style issue, or is this jus

Re: [PATCH] staging: comedi: comedi_fops: coding style fixes

2016-09-09 Thread Ian Abbott
ts more readable, as POSIX octal file permissions have been burned into my brain for >30 years now! Reviewed-by: Ian Abbott -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___

Re: [PATCH v2] Staging: comedi: das08_cs: Fix block comments use * on subsequent lines.

2016-09-06 Thread Ian Abbott
changed, 38 insertions(+), 38 deletions(-) Thanks, but this has already been fixed by an earlier commit by H Hartley Sweeten in the staging-next branch of the staging repository, and in the master branch of the linux-next repository. -- -=( Ian Abbott @ MEV Ltd.E-mail

Re: [PATCH v3] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-06 Thread Ian Abbott
itory. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] Staging: comedi: ni_daq_dio24.c: Fix block comments use * on subsequent lines.

2016-09-05 Thread Ian Abbott
+-- 1 file changed, 30 insertions(+), 30 deletions(-) I guess this replaces the other "v2" patch (which had a problem with blank lines in the comment blocks). It looks okay, but could you repost it as "v3" to avoid confusion with the other patch? -- -=( Ian Ab

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

2016-09-05 Thread Ian Abbott
dding 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

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

2016-09-05 Thread Ian Abbott
o driver to properly handle + * the PCMCIA interface. + */ Same thing there. -- -=( Ian Abbott @ MEV Ltd.E-mail: )=- -=( Web: http://www.mev.co.uk/ )=- ___ devel mailing list de...@linuxdr

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

2016-09-05 Thread Ian Abbott
" 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-ma

Re: [PATCH 34/34] Staging: comedi: drivers: cd_pcidas: Compression of

2016-08-02 Thread Ian Abbott
al < 0) return retval; - num_samples = retval * fifo->num_segments * fifo->sample_packing_ratio; - - return num_samples; + return retval * fifo->num_segments * fifo->sample_packing_ratio; } /* query length of fifo

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