Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

2021-04-15 Thread Ian Abbott
-const-variable=] Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Greg Kroah-Hartman Cc: Thierry Reding Cc: "Uwe Kleine-König" Cc: Lee Jones Cc: "David A. Schleef" Cc: Mori Hess Cc: Truxton Fulton Cc: linux-stag...@lists.linux.dev Cc: linux-...@vger.kernel.org Signed-off-by: Lee

Re: [PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale'

2021-04-15 Thread Ian Abbott
-variable] Cc: Ian Abbott Cc: H Hartley Sweeten Cc: Greg Kroah-Hartman Cc: "Alexander A. Klimov" Cc: Anders Blomdell Cc: linux-stag...@lists.linux.dev Signed-off-by: Lee Jones --- drivers/staging/comedi/drivers/jr3_pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

Re: mmotm 2021-04-11-20-47 uploaded (ni_routes_test.c)

2021-04-13 Thread Ian Abbott
Fix COMEDI_TESTS_NI_ROUTES selections") in linux-next master. Sorry for the trouble! -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOC

Re: [PATCH] Staging: Remove line to fix checkpatch error

2021-04-12 Thread Ian Abbott
during the kernel build process. There is no point checking them with checkpatch.pl. If you are adding them to your git repository, then you are doing something wrong. -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=(

Re: [PATCH] staging: comedi: das800: fix request_irq() warn

2021-03-17 Thread Ian Abbott
userspace, so we are changing the parameters passed to request_irq() Suggested-by: Ian Abbott Signed-off-by: Tong Zhang --- drivers/staging/comedi/drivers/das800.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging

Re: [PATCH] staging: comedi: replace slash in name

2021-03-16 Thread Ian Abbott
name argument of request_irq(), but that is "cio-das802/16" for one of the boards supported by the driver. On Mon, Mar 15, 2021 at 6:48 AM Ian Abbott wrote: On 15/03/2021 10:44, Ian Abbott wrote: On 14/03/2021 03:57, Tong Zhang wrote: request_irq() wont accept a name which contains slas

Re: [PATCH v2] staging: comedi: cb_pcidas64: fix request_irq() warn

2021-03-16 Thread Ian Abbott
] proc_mkdir+0x18/0x20 [1.576629] request_threaded_irq+0xfe/0x160 [1.576859] auto_attach+0x60a/0xc40 [cb_pcidas64] Suggested-by: Ian Abbott Signed-off-by: Tong Zhang --- v2: revert changes to .name field so that we dont break userspace drivers/staging/comedi/drivers/cb_pcidas64.c | 2

Re: [PATCH v2] staging: comedi: cb_pcidas: fix request_irq() warn

2021-03-16 Thread Ian Abbott
] proc_mkdir+0x18/0x20 [1.641946] request_threaded_irq+0xfe/0x160 [1.642186] cb_pcidas_auto_attach+0xf4/0x610 [cb_pcidas] Suggested-by: Ian Abbott Signed-off-by: Tong Zhang --- v2: revert changes to .name field so that we dont break userspace drivers/staging/comedi/drivers/cb_pcidas.c | 2

Re: [PATCH] staging: comedi: cb_pcidas: replace slash in name

2021-03-15 Thread Ian Abbott
.name = "pci-das1602/16/jr", > + .name = "pci-das1602-16-jr", > .ai_speed = 5000, > .fifo_size = 512, > .is_16bit = 1, > As for cb_pcidas64, the board name may be

Re: [PATCH] staging: comedi: replace slash in name

2021-03-15 Thread Ian Abbott
On 15/03/2021 10:44, Ian Abbott wrote: > On 14/03/2021 03:57, Tong Zhang wrote: >> request_irq() wont accept a name which contains slash so we need to >> repalce it with something else -- otherwise it will trigger a warning >> and the entry in /proc/irq/ will not be create

Re: [PATCH] staging: comedi: replace slash in name

2021-03-15 Thread Ian Abbott
nst struct pcidas64_board pcidas64_boards[] = { > .has_8255 = 0, > }, > [BOARD_PCIDAS4020_12] = { > - .name = "pci-das4020/12", > + .name = "pci-das4020-12", > .ai_se_chan

Re: [PATCH -next] staging: comedi dt2814: Removed unused variables

2021-02-22 Thread Ian Abbott
s commands in this driver has always been broken. I'm tempted to remove the code for handling asynchronous commands in this driver altogether for that reason. (The naive fix of writing the data to the Comedi buffer is insufficient without an additional check that the command is running. The end-of-convers

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-19 Thread Ian Abbott
mbers, which would look a bit odd. The union also kind of hides the problem. -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

Re: [PATCH] Staging: comedi: Replaced strlcpy to strscpy

2021-02-18 Thread Ian Abbott
EN); > + strscpy(devinfo.driver_name, dev->driver->driver_name, COMEDI_NAMELEN); > + strscpy(devinfo.board_name, dev->board_name, COMEDI_NAMELEN); > > s = comedi_file_read_subdevice(file); > if (s) > Thanks, but you are too late. It has already been fixe

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-18 Thread Ian Abbott
the unused `data` and `data_len` members (which need to be kept in the user version of the struct for compatibility reasons). -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Ian Abbott
eebe3 ("staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings") by B K Karthik. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d5d041eebe3dcf7591ff7004896c329eb841ca6 -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in

Re: [PATCH] drivers: staging: comedi: Fixed side effects from macro definition.

2021-02-18 Thread Ian Abbott
in constant expressions. -- -=( Ian Abbott || MEV Ltd. is a company )=- -=( registered in England & Wales. Regd. number: 02862268. )=- -=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=- -=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-

{PATCH 0/2] HID: wiimote: Minor change to spinlock usage

2020-09-04 Thread Ian Abbott
[I have posted these patches previously, but that was over a year ago. --IA] A couple of minor changes to the wiimote core module. They do not change functionality of the driver: 1) HID: wiimote: make handlers[] const 2) HID: wiimote: narrow spinlock range in wiimote_hid_event()

[PATCH 2/2] HID: wiimote: narrow spinlock range in wiimote_hid_event()

2020-09-04 Thread Ian Abbott
In `wiimote_hid_event()`, the `wdata->state.lock` spinlock does not need to be held while searching `handlers[]` for a suitable handler function. Change it so the spinlock is only held during the call to the handler function itself. Signed-off-by: Ian Abbott --- drivers/hid/hid-wiimote-cor

[PATCH 1/2] HID: wiimote: make handlers[] const

2020-09-04 Thread Ian Abbott
The `handlers[]` array contents are never modified, so use the `const` qualifier. Signed-off-by: Ian Abbott --- drivers/hid/hid-wiimote-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index

Re: [PATCH] drivers: staging: comedi: fixed duplicate words from checkpatch

2020-08-24 Thread Ian Abbott
* multiple reads on the status register to achieve this). */ while (--loops) { status = inb(dev->iobase + DAQP_STATUS_REG); -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 0

[PATCH 4/4] staging: comedi: addi_apci_1500: check INSN_CONFIG_DIGITAL_TRIG shift

2020-07-17 Thread Ian Abbott
") Cc: #4.0+: ef75e14a6c93: staging: comedi: verify array index is correct before using it Cc: #4.0+ Signed-off-by: Ian Abbott --- .../staging/comedi/drivers/addi_apci_1500.c | 24 +++ 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/drivers/staging/come

[PATCH 3/4] staging: comedi: addi_apci_1564: check INSN_CONFIG_DIGITAL_TRIG shift

2020-07-17 Thread Ian Abbott
code to deal with this. Fixes: 1e15687ea472 ("staging: comedi: addi_apci_1564: add Change-of-State interrupt subdevice and required functions" Cc: #3.17+ Signed-off-by: Ian Abbott --- .../staging/comedi/drivers/addi_apci_1564.c | 20 +-- 1 file changed, 14 insert

[PATCH 1/4] staging: comedi: ni_6527: fix INSN_CONFIG_DIGITAL_TRIG support

2020-07-17 Thread Ian Abbott
less than that and everything from bit 24 upwards is ignored by `ni6527_set_edge_detection()` anyway. Fixes: 110f9e687c1a8 ("staging: comedi: ni_6527: support INSN_CONFIG_DIGITAL_TRIG") Cc: # 3.17+ Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_6527.c | 2 +- 1 file changed, 1 inse

[PATCH 2/4] staging: comedi: addi_apci_1032: check INSN_CONFIG_DIGITAL_TRIG shift

2020-07-17 Thread Ian Abbott
code to deal with this. Fixes: 33cdce6293dcc ("staging: comedi: addi_apci_1032: conform to new INSN_CONFIG_DIGITAL_TRIG" Cc: #3.8+ Signed-off-by: Ian Abbott --- .../staging/comedi/drivers/addi_apci_1032.c | 20 +-- 1 file changed, 14 insertions(+), 6 deletions(-)

[PATCH 0/4] staging: comedi: INSN_CONFIG_DIGITAL_TRIG fixes

2020-07-17 Thread Ian Abbott
These patches correct problems with INSN_CONFIG_DIGITAL_TRIG comedi configuration instructions in various comedi drivers, in particular the use of unconstrained bit shift amounts from userspace leading to undefined behaviour (although hopefully not the kernel crashy sort). The patches have been

Re: [PATCH v4] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-17 Thread Ian Abbott
t((unsigned int __user *)cmd->chanlist); v32.chanlist_len = cmd->chanlist_len; v32.data = ptr_to_compat(cmd->data); v32.data_len = cmd->data_len; Still looks good. Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a

Re: [PATCH v2] staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings

2020-07-16 Thread Ian Abbott
ser *)cmd->chanlist); v32.chanlist_len = cmd->chanlist_len; v32.data = ptr_to_compat(cmd->data); v32.data_len = cmd->data_len; Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=(

Re: [PATCH] staging: comedi: comedi_fops.c: changed type in assignment to unsigned int *

2020-07-15 Thread Ian Abbott
->chanlist); Those changes will get rid of the sparse warnings. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH v2] staging: comedi: s626: Remove pci-dma-compat wrapper APIs.

2020-07-14 Thread Ian Abbott
vpriv->ana_buf.physical_base); + dma_free_coherent(>dev, S626_DMABUF_SIZE, + devpriv->ana_buf.logical_base, + devpriv->ana_buf.physical_base); } static int s626_initialize(struct comedi_device *dev) Lo

Re: [PATCH] staging: comedi: s626: Remove pci-dma-compat wrapper APIs.

2020-07-13 Thread Ian Abbott
mory allocation using GFP_KERNEL. So it is likely that using GFP_KERNEL in your proposal is also valid. Indeed, GFP_KERNEL is perfectly fine here. It could be done as a follow-up patch, or done in a v2 of this patch with a mention in the patch description. -- -=( Ian Abbott || Web: www.mev.

Re: [PATCH] Staging: comedi: driver: Remove condition with no effect

2020-07-13 Thread Ian Abbott
else {' part that follows this part. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCHES] uaccess comedi compat

2020-05-29 Thread Ian Abbott
06-09. These should be Cc'd to Greg KH and to de...@driverdev.osuosl.org. Cheers, Ian -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOC

Re: [PATCH 09/10] comedi: do_cmd_ioctl(): lift copyin/copyout into the caller

2020-05-29 Thread Ian Abbott
On 29/05/2020 01:35, Al Viro wrote: From: Al Viro Signed-off-by: Al Viro --- drivers/staging/comedi/comedi_fops.c | 48 ++-- 1 file changed, 24 insertions(+), 24 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV

Re: [PATCH 06/10] comedi: get rid of compat_alloc_user_space() mess in COMEDI_INSNLIST compat

2020-05-29 Thread Ian Abbott
On 29/05/2020 01:35, Al Viro wrote: From: Al Viro Signed-off-by: Al Viro --- drivers/staging/comedi/comedi_fops.c | 138 --- 1 file changed, 48 insertions(+), 90 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV

Re: [PATCH 03/10] comedi: get rid of compat_alloc_user_space() mess in COMEDI_CHANINFO compat

2020-05-29 Thread Ian Abbott
1 file changed, 30 insertions(+), 38 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West

Re: [PATCH 01/10] comedi: move compat ioctl handling to native fops

2020-05-29 Thread Ian Abbott
/staging/comedi/comedi_fops.c | 451 +- 4 files changed, 448 insertions(+), 487 deletions(-) delete mode 100644 drivers/staging/comedi/comedi_compat32.c delete mode 100644 drivers/staging/comedi/comedi_compat32.h Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web

Re: [PATCH 02/10] comedi: get rid of indirection via translated_ioctl()

2020-05-29 Thread Ian Abbott
On 29/05/2020 01:35, Al Viro wrote: From: Al Viro Signed-off-by: Al Viro --- drivers/staging/comedi/comedi_fops.c | 26 -- 1 file changed, 8 insertions(+), 18 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd

Re: [PATCH 04/10] comedi: get rid of compat_alloc_user_space() mess in COMEDI_RANGEINFO compat

2020-05-29 Thread Ian Abbott
++-- drivers/staging/comedi/comedi_internal.h | 2 +- drivers/staging/comedi/range.c | 17 ++--- 3 files changed, 27 insertions(+), 35 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company

Re: [PATCH 08/10] comedi: do_cmdtest_ioctl(): lift copyin/copyout into the caller

2020-05-29 Thread Ian Abbott
On 29/05/2020 01:35, Al Viro wrote: From: Al Viro Signed-off-by: Al Viro --- drivers/staging/comedi/comedi_fops.c | 45 ++-- 1 file changed, 22 insertions(+), 23 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV

Re: [PATCH 07/10] comedi: lift copy_from_user() into callers of __comedi_get_user_cmd()

2020-05-29 Thread Ian Abbott
On 29/05/2020 01:35, Al Viro wrote: From: Al Viro Signed-off-by: Al Viro --- drivers/staging/comedi/comedi_fops.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) Signed-off-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company

Re: [PATCH 05/10] comedi: get rid of compat_alloc_user_space() mess in COMEDI_INSN compat

2020-05-29 Thread Ian Abbott
= -EFAULT; Missing an 'else' here: + rc = do_insn_ioctl(dev, , file); break; + } case COMEDI_POLL: -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered add

Re: [PATCH -next] staging: comedi: remove unused variable 'route_table_size'

2019-10-23 Thread Ian Abbott
Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH -next] staging: comedi: dt2814: remove set but not used variables 'data'

2019-10-23 Thread Ian Abbott
(lo >> 4); + inb(dev->iobase + DT2814_DATA); + inb(dev->iobase + DT2814_DATA); if (!(--devpriv->ntrig)) { int i; Those variables are currently unused due to a bug that I need to fix. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( ME

Re: [PATCH] staging: comedi: drivers: prevent memory leak

2019-09-17 Thread Ian Abbott
module); 1002 } 1003 /* On success, the driver module count has been incremented. */ Yes, everything should be freed properly by comedi_device_detach(). From comedi_device_detach(), some of the stuff is freed by dev->driver->detach(), and the remainder is freed

Re: [PATCH] staging: comedi: usbduxsigma: remove redundant assignment to variable fx2delay

2019-08-15 Thread Ian Abbott
x2delay = 255; + int fx2delay; if (period < MIN_PWM_PERIOD) return -EAGAIN; Looks fine, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268.

[PATCH] staging: comedi: dt3000: Fix signed integer overflow 'divider * base'

2019-08-12 Thread Ian Abbott
stance of this calculation in the same function. Reported-by: David Binderman Cc: Signed-off-by: Ian Abbott --- N.B. Greg: The original report suggested an actual build error, so may be prudent to queue this on your 'staging-linus' queue. drivers/staging/comedi/drivers/dt3000.c | 2 +- 1 file changed, 1 ins

Re: linux-5.3-rc4/drivers/staging/comedi/drivers/dt3000.c:373: (error) Signed integer overflow for expression 'divider*base'

2019-08-12 Thread Ian Abbott
to use longs. It wouldn't do any harm to change the `int` variables to `unsigned int`. Regards David Binderman time-_Base seems to be 50 or 100. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Re

Re: [PATCH][next] staging: comedi: usbdux: remove redundant initialization of fx2delay

2019-06-17 Thread Ian Abbott
if (period < MIN_PWM_PERIOD) return -EAGAIN; Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road,

Re: [PATCH 12/16] staging/comedi: mark as broken

2019-06-17 Thread Ian Abbott
dma_mmap_coherent() to mmap it. 2. Call dma_mmap_coherent() in a loop, adjusting vma->vm_start and vma->vm_end for each iteration (vma->vm_pgoff will be 0), and restoring the vma->vm_start and vma->vm_end at the end. I'm not sure if 2 is a legal option. -- -=( Ian Abbott || Web

Re: [PATCH] staging: comedi: Remove variable runflags

2019-05-31 Thread Ian Abbott
bjective'. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

[PATCH v2] staging: comedi: comedi_isadma: Use a non-NULL device for DMA API

2019-04-26 Thread Ian Abbott
bus limit of 16MB (24 bits). Signed-off-by: Ian Abbott --- v2: Use the comedi "class" device instead of a static fallback device. --- drivers/staging/comedi/drivers/comedi_isadma.c | 17 +++-- drivers/staging/comedi/drivers/comedi_isadma.h | 3 +++ 2 files changed, 18 insertion

Re: [PATCH] staging: comedi: comedi_isadma: Use a non-NULL device for DMA API

2019-04-26 Thread Ian Abbott
On 25/04/2019 18:13, Greg Kroah-Hartman wrote: On Thu, Apr 25, 2019 at 05:26:44PM +0100, Ian Abbott wrote: The "comedi_isadma" module calls `dma_alloc_coherent()` and `dma_free_coherent()` with a NULL device pointer which is no longer allowed. If the `hw_dev` member of t

[PATCH] staging: comedi: comedi_isadma: Use a non-NULL device for DMA API

2019-04-25 Thread Ian Abbott
rent users of the "comedi_isadma" module leave the `hw_dev` member set to NULL. In that case, use a static dummy fallback device structure with the coherent DMA mask set to the ISA bus limit of 16MB. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/comedi_isadma.c | 15

[PATCH] fuse: Add ioctl flag for x32 compat ioctl

2019-04-24 Thread Ian Abbott
is using the x32 ABI. This allows the server process to distinguish between requests from requesting client processes using IA32 emulation or the x32 ABI and so infer the size of the client process's `time_t` type and any other IA32/x32 differences. Signed-off-by: Ian Abbott Cc: Miklos Szeredi

Re: [PATCH] fuse: Add ioctl flag for compat ioctl with 64-bit time_t

2019-04-24 Thread Ian Abbott
On 24/04/2019 11:52, Miklos Szeredi wrote: On Tue, Apr 23, 2019 at 5:14 PM Ian Abbott wrote: On 23/04/2019 13:55, Miklos Szeredi wrote: On Fri, Mar 1, 2019 at 6:08 PM Ian Abbott wrote: Currently, a CUSE server running on a 64-bit kernel can tell when an ioctl request comes from a process

Re: [PATCH] fuse: Add ioctl flag for compat ioctl with 64-bit time_t

2019-04-23 Thread Ian Abbott
On 23/04/2019 13:55, Miklos Szeredi wrote: On Fri, Mar 1, 2019 at 6:08 PM Ian Abbott wrote: Currently, a CUSE server running on a 64-bit kernel can tell when an ioctl request comes from a process running a 32-bit ABI, but cannot tell whether the requesting process is using legacy IA32

Re: [PATCH] staging: comedi: use help instead of ---help--- in Kconfig

2019-04-17 Thread Ian Abbott
le changed, 127 insertions(+), 127 deletions(-) Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall,

Re: [PATCH] staging: comedi: adv_pci1710: fix spelling mistake: "droput" -> "dropout"

2019-04-16 Thread Ian Abbott
On 15/04/2019 18:49, Colin King wrote: From: Colin Ian King There is a spelling mistake in a dev_error message. Fix it. Signed-off-by: Colin Ian King Looks good, thanks! Reviewed-by: Ian Abbott --- drivers/staging/comedi/drivers/adv_pci1710.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 2/2] staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf

2019-04-15 Thread Ian Abbott
uble-free error. Fix it by removing the call to `kfree(devpriv->usb_rx_buf)` from `vmk80xx_alloc_usb_buffers()`, relying on `vmk80xx_detach()` to free the memory. Signed-off-by: Ian Abbott --- v2: Fix commit message because it incorrectly indicated that the call to `kfree()` was being removed f

[PATCH 2/2] staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf

2019-04-15 Thread Ian Abbott
ree error. Fix it bu removing the call to `kfree(devpriv->usb_rx_buf)` from `ni6501_alloc_usb_buffers()`, relying on `ni6501_detach()` to free the memory. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_usb6501.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH 1/2] staging: comedi: ni_usb6501: Fix use of uninitialized mutex

2019-04-15 Thread Ian Abbott
kernel/workqueue.c:2415 kthread+0x313/0x420 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Reported-by: syzbot+cf4f2b6c24aff0a3e...@syzkaller.appspotmail.com Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/ni_usb6501.c | 6 +++--- 1 file changed, 3 inse

[PATCH 0/2] staging: comedi: ni_usb6501: Fix a couple of bugs

2019-04-15 Thread Ian Abbott
Fix a bug detected by syzbot and another that I found while investigating it. 1) staging: comedi: ni_usb6501: Fix use of uninitialized mutex 2) staging: comedi: ni_usb6501: Fix possible double-free of ->usb_rx_buf drivers/staging/comedi/drivers/ni_usb6501.c | 10 -- 1 file changed, 4

[PATCH 2/2] staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf

2019-04-15 Thread Ian Abbott
uble-free error. Fix it by removing the call to `kfree(devpriv->usb_rx_buf)` from `vmk80xx_auto_attach()`, relying on `vmk80xx_detach()` to free the memory. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/vmk80xx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH 1/2] staging: comedi: vmk80xx: Fix use of uninitialized semaphore

2019-04-15 Thread Ian Abbott
/0xe20 kernel/workqueue.c:2415 kthread+0x313/0x420 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 Reported-by: syzbot+54c2f58f15fe6876b...@syzkaller.appspotmail.com Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/vmk80xx.c | 4 ++-- 1 file chan

[PATCH 0/2] staging: comedi: vmk80xx: Fix a couple of bugs

2019-04-15 Thread Ian Abbott
Fix a bug detected by syzbot and another bug that I noticed while investigating the syzbot reported bug. 1) staging: comedi: vmk80xx: Fix use of uninitialized semaphore 2) staging: comedi: vmk80xx: Fix possible double-free of ->usb_rx_buf drivers/staging/comedi/drivers/vmk80xx.c | 8 +++- 1

Re: [PATCH -next] staging: comedi: dyna_pci10xx: remove set but not used variables 'chan' and range'

2019-04-06 Thread Ian Abbott
03/150646/15/15_chapter%205.pdf> which describes the card as having a single channel D/A converter. Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:

Re: [PATCH V2] staging: comedi: dt2811: Fix spelling mistake

2019-04-06 Thread Ian Abbott
* r/w1=interrupts ena */ #define DT2811_ADCSR_ADMODE(x)(((x) & 0x3) << 0) #define DT2811_ADGCR_REG 0x01 /* r/w A/D Gain/Channel */ Looks good. Thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company register

Re: [PATCH] staging: comedi: Fix spelling mistake

2019-04-04 Thread Ian Abbott
fine. Thanks. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

[RESEND PATCH v1] fuse: Add ioctl flag for compat ioctl with 64-bit time_t

2019-04-01 Thread Ian Abbott
requesting process (running on a 64-bit kernel) uses a 64-bit `time_t` type. Signed-off-by: Ian Abbott --- This is a resend of a patch I sent on March 1. No changes. https://www.spinics.net/lists/linux-fsdevel/msg140531.html fs/fuse/file.c| 5 - include/uapi/linux/fuse.h | 2 ++ 2

Re: [PATCH] Staging: comedi: ni_mio_common.c: Added blank line after declarations

2019-03-22 Thread Ian Abbott
ni_timer_to_ns(dev, ni_ns_to_timer(dev, cmd->convert_arg, Looks good, thanks. Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England &

Re: [PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-13 Thread Ian Abbott
On 04/03/2019 14:33, Ian Abbott wrote: `ni_cdio_cmdtest()` validates Comedi asynchronous commands for the DIO subdevice (subdevice 2) of supported National Instruments M-series cards. It is called when handling the `COMEDI_CMD` and `COMEDI_CMDTEST` ioctls for this subdevice. There are two

Re: [PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-05 Thread Ian Abbott
On 05/03/2019 11:39, Dan Carpenter wrote: On Tue, Mar 05, 2019 at 11:32:18AM +, Ian Abbott wrote: On 05/03/2019 11:10, Dan Carpenter wrote: On Mon, Mar 04, 2019 at 02:33:54PM +, Ian Abbott wrote: The problem was reported on the COMEDI mailing list here: https://groups.google.com/forum

Re: [PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-05 Thread Ian Abbott
On 05/03/2019 11:10, Dan Carpenter wrote: On Mon, Mar 04, 2019 at 02:33:54PM +, Ian Abbott wrote: The problem was reported on the COMEDI mailing list here: https://groups.google.com/forum/#!topic/comedi_list/4t9WlHzMhKM Can you give Ivan a Reported-by tag? It's a public mailing list so

[PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-04 Thread Ian Abbott
orum/#!topic/comedi_list/4t9WlHzMhKM Fixes: f164cbf98fa8 ("staging: comedi: ni_mio_common: add finite regeneration to dio output") Cc: # 4.6+ Cc: Spencer E. Olson Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedidev.h| 2 ++ drivers/staging/comedi/drive

[PATCH] fuse: Add ioctl flag for compat ioctl with 64-bit time_t

2019-03-01 Thread Ian Abbott
requesting process (running on a 64-bit kernel) uses a 64-bit `time_t` type. Signed-off-by: Ian Abbott --- fs/fuse/file.c| 5 - include/uapi/linux/fuse.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 06096b60f1df

Re: [PATCH] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-15 Thread Ian Abbott
e NI660X_DMA_CFG register helpers") How should we proceed with this patch? Hi Sasha, the bug was introduced in v4.7 and hasn't been backported to any earlier stable kernels, so no need to do anything for v4.4.x or v3.18.x. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH v2] staging: comedi: ni_660x: fix missing break in switch statement

2019-02-13 Thread Ian Abbott
OUTPUT_DIO: if (chan > 31) return -EINVAL; + break; default: return -EINVAL; } Thanks for the bug fix! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in En

Re: [PATCH] staging: comedi: Removed not necessary braces for single block

2019-01-16 Thread Ian Abbott
; int ret = 0; - if (copy_from_user(, arg, sizeof(insn))) { + if (copy_from_user(, arg, sizeof(insn))) return -EFAULT; - } + n_data = max(n_data, insn.n); The patch looks fine. Thanks for the fix! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web

Re: [PATCH] staging: comedi: fix spelling mistake "desination" -> "destination"

2018-11-27 Thread Ian Abbott
"lookup invalid destination\n"); unittest(ni_lookup_route_register(rgout0_src0, TRIGGER_LINE(0), T) == -EINVAL, Thanks for spotting that! Looks good. Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company

Re: [PATCH] staging: comedi: fix spelling mistake "desination" -> "destination"

2018-11-27 Thread Ian Abbott
"lookup invalid destination\n"); unittest(ni_lookup_route_register(rgout0_src0, TRIGGER_LINE(0), T) == -EINVAL, Thanks for spotting that! Looks good. Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company

Re: [PATCH] staging: comedi: tio: fix multiple missing break in switch bugs

2018-10-12 Thread Ian Abbott
ret = ni_m_set_gate2(counter, chan); + break; case ni_gpct_variant_660x: ret = ni_660x_set_gate2(counter, chan); + break; default: return -EINVAL; } Thanks for ca

Re: [PATCH] staging: comedi: tio: fix multiple missing break in switch bugs

2018-10-12 Thread Ian Abbott
ret = ni_m_set_gate2(counter, chan); + break; case ni_gpct_variant_660x: ret = ni_660x_set_gate2(counter, chan); + break; default: return -EINVAL; } Thanks for ca

Re: [PATCH 1/4] staging: comedi: Correct multiline dereference as per TODO

2018-09-03 Thread Ian Abbott
On 03/09/18 15:47, Ian Abbott wrote: On 30/08/18 18:32, Ray Clinton wrote: Using checkpatch.pl I was able to find a multiline dereference which goes again the coding style for the kernel. I'm still working on my email client so the indentation looks bad here (in gmail) but the arguments

Re: [PATCH 1/4] staging: comedi: Correct multiline dereference as per TODO

2018-09-03 Thread Ian Abbott
On 03/09/18 15:47, Ian Abbott wrote: On 30/08/18 18:32, Ray Clinton wrote: Using checkpatch.pl I was able to find a multiline dereference which goes again the coding style for the kernel. I'm still working on my email client so the indentation looks bad here (in gmail) but the arguments

Re: [PATCH 1/4] staging: comedi: Correct multiline dereference as per TODO

2018-09-03 Thread Ian Abbott
onkarns/4354421 -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH 1/4] staging: comedi: Correct multiline dereference as per TODO

2018-09-03 Thread Ian Abbott
onkarns/4354421 -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH] staging: comedi: comedi_fops: Shift assignment operator '=' to previous line

2018-07-16 Thread Ian Abbott
fault_buf_maxsize_kb = + CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB; module_param(comedi_default_buf_maxsize_kb, uint, 0644); MODULE_PARM_DESC(comedi_default_buf_maxsize_kb, "default maximum size of asynchronous buffer in KiB (default " That looks fine, thanks! Reviewed-by:

Re: [PATCH] staging: comedi: comedi_fops: Shift assignment operator '=' to previous line

2018-07-16 Thread Ian Abbott
fault_buf_maxsize_kb = + CONFIG_COMEDI_DEFAULT_BUF_MAXSIZE_KB; module_param(comedi_default_buf_maxsize_kb, uint, 0644); MODULE_PARM_DESC(comedi_default_buf_maxsize_kb, "default maximum size of asynchronous buffer in KiB (default " That looks fine, thanks! Reviewed-by:

Re: [PATCH] staging: comedi: remove redundant variable segpos

2018-07-11 Thread Ian Abbott
--- drivers/staging/comedi/drivers/pcl816.c | 4 ++-- drivers/staging/comedi/drivers/pcl818.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & W

Re: [PATCH] staging: comedi: remove redundant variable segpos

2018-07-11 Thread Ian Abbott
--- drivers/staging/comedi/drivers/pcl816.c | 4 ++-- drivers/staging/comedi/drivers/pcl818.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) Looks good, thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & W

Re: can we drop the comedi serial2002 drivers from staging?

2018-06-18 Thread Ian Abbott
to similar to how kernel-mode comedi drivers link to the comedi core. I don't object to dropping it. Ian and Hartley, do you know of any users of this driver anymore? The only place I know it was in use was in Anders Blomdell's lab at Lund University. I've added him to the Cc: list.

Re: can we drop the comedi serial2002 drivers from staging?

2018-06-18 Thread Ian Abbott
to similar to how kernel-mode comedi drivers link to the comedi core. I don't object to dropping it. Ian and Hartley, do you know of any users of this driver anymore? The only place I know it was in use was in Anders Blomdell's lab at Lund University. I've added him to the Cc: list.

Re: [PATCH] Staging: comedi: ssv_dnp: fixed style line length warning

2018-06-14 Thread Ian Abbott
--- */ +/* include files -- */ #include #include "../comedidev.h" I cannot reproduce the checkpatch.pl warning. The line is only 79 columns wide. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -

Re: [PATCH] Staging: comedi: ssv_dnp: fixed style line length warning

2018-06-14 Thread Ian Abbott
--- */ +/* include files -- */ #include #include "../comedidev.h" I cannot reproduce the checkpatch.pl warning. The line is only 79 columns wide. -- -=( Ian Abbott || Web: www.mev.co.uk )=- -

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-14 Thread Ian Abbott
on't think it is safe to assume that no manual intervention would be required by the maintainer to deal with it. I wonder where the "scissors" advice on the kernelnewbies page came from? -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )

Re: [PATCH v4] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-14 Thread Ian Abbott
on't think it is safe to assume that no manual intervention would be required by the maintainer to deal with it. I wonder where the "scissors" advice on the kernelnewbies page came from? -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )

Re: [PATCH] staging: comedi: add error handling for vmap

2018-06-14 Thread Ian Abbott
.  This error condition is handled in the caller. regards, dan carpenter -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH] staging: comedi: add error handling for vmap

2018-06-14 Thread Ian Abbott
.  This error condition is handled in the caller. regards, dan carpenter -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address:)=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-

Re: [PATCH v5] staging: comedi: Improved readability of function comedi_nsamples_left.

2018-06-13 Thread Ian Abbott
nsamples) + return samples_left; return nsamples; } EXPORT_SYMBOL_GPL(comedi_nsamples_left); -- 2.1.4 The actual patch looks fine thanks! Reviewed-by: Ian Abbott -- -=( Ian Abbott || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=

  1   2   3   4   5   6   7   8   9   10   >