Introduce a generic (*detach) function for comedi PCI drivers to handle
the boilerplate code needed to detach a PCI driver.
This function works similar to comedi_legacy_detach() where it will:
* free the dev->irq if it has been requested
* iounmap the dev->mmio addres if it has been ioremap'e
Currently the dma buffers are freed during the detach of the driver using
the function s626_close_dma_b(). The buffers are also freed while the
interrupt handler is still attached. This could result in a race condition.
Refactor the code so that the buffers are freed after the interrupt handler
is
This member is set at the end of the driver attach and is only used to
verify that icp_multi_reset() can be called in the (*detach). The only
requirement for icp_multi_reset() to work is that the dev->mmio is valid.
Remove the 'valid' member from the private data and use 'dev->mmio' to
see if the
Use comedi_pci_detach() to handle the boilerplate part of the (*detach)
for this PCI driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/s626.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/stagin
Factor the freeing of the dma buffers out of the (*detach).
Move the freeing of the buffers so that it occurs after the PCI device
has been disabled to avoid any race condition.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/gsc_hpdi.
This member is set at the end of the driver attach and is only used to
verify that pci_dio_reset() can be called in the (*detach). The only
requirement for pci_dio_reset() to work is that the dev->iobase is valid.
Remove the 'valid' member from the private data and use 'dev->iobase' to
see if the
Introduce a new helper function, comedi_pci_detach(), that can be used
as the (*detach) of a comedi PCI driver to handle the boilerplate code
of the PCI driver detach.
Use the the new helper to remove the boilerplate from most of the comedi
PCI drivers.
Some of the drivers need additional cleanup
Factor the freeing of the dma buffers out of the (*detach).
Move the freeing of the buffers so that it occurs after the PCI device
has been disabled to avoid any race condition.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 33
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
For aesthetics, rename the (*insn_write) and (*insn_read) functions.
Signed-off-by: H Hartley Sweeten
Cc
The comedi core validates the insn->chanspec and data values before
calling the (*insn_write) functions. The 'chan' will always be valid.
Tidy up this function up a bit and remove the unnecessary code.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas64.c | 22 +++---
1 fil
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/rti800.c | 26 +++---
1 file
The comedi core validates the insn->chanspec and data values before
calling the (*insn_write) functions. The 'chan' will always be valid
and the data values do not need to be masked.
Tidy up this function and remove the unnecessary code.
For aesthetics, rename the function.
Signed-off-by: H Hart
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_3501.c | 19 +--
1 fil
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/stag
This code has been disabled since it's initial commit. It must not be
needed so just remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/daqboard2000.c | 16
1 file changed, 16 deletions(-)
diff --git a/drivers/
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 30 +++---
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/stag
For aesthetics, rename this function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_670x.c | 40 +---
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.
Currently, this function only writes the first value. The core also
validates all the data values so the extra masking with s->maxdata is
not needed. Fix this function t
The comedi core does the sanity checking of the comedi_insn before
calling the (*insn_write). Remove the unnecessary checks.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 33 ++---
1 file changed
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, tidy up the (*insn_write) a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driver
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
The das08_ao_initialize() function is only called when the subdevice
is first setup during the attach. It is used to initialize the channels
to a known state.
The unmunged data should be saved for readback not the munged data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/rti800.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/rti8
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/mf6x4.c | 27 +++
1 file
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, tidy up pcl812_ao_insn_write().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
driver
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_mio_common.c | 25 +++--
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt9812.c | 27 ---
1 fil
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl818.c | 33 +++--
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_670x.c | 26 +++---
1 fil
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me_daq.c | 26 +++---
1 file
For aesthetics, rename the function and tidy it up a bit. Also rename the
registers used by this function and add a macro to set the 'chan' bits in
the MSB data register.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dmm32at.c | 44 ++
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcimdas.c | 29 +++--
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
The loop used to write the values could timeout. Move the saving of
the readback value so that the last value written is always saved.
Remove the unused priv
The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.
Currently, this function only writes the first value. Fix it to work
like the core expects.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
--
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/quatech_daqp_cs.c | 7 +++
1 file changed, 7
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/usbdux.c | 25 -
1 file
The unmunged data should be saved for readback not the munged data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ii_pci20kc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ii
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 30 ++
1
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_at_ao.c | 35 +--
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/rtd520.c | 26 ++
1 file
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt2801.c | 28 ++--
1 fi
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl711.c | 27 +++
1 fil
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcmmio.c | 29 +++--
1 f
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/rti802.c | 29 -
1 f
The comedi core expects (*insn_write) functions to write insn->n values
to the hardware and return the number of values written.
Currently, this function only writes the first value. Fix it to work
like the core expects.
For aesthetics, rename the function and tidy it up a bit.
Signed-off-by: H
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
The comedi core validates that all the data values are <= s->maxdata
before calling the (*insn_write) function. The extra masking is not
needed. Remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/mf6x4.c | 8
1 file cha
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/usbduxsigma.c | 22 ++
1 fil
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl726.c | 29 -
1 f
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcmda12.c | 16 +++-
1 file changed,
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_atmio16d.c | 23 +++
1 fi
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt282x.c | 31 ---
1
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das6402.c | 14 ++
1 file changed, 6
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/stag
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/s626.c | 41 +++
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_3xxx.c | 11 ++-
1 file change
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/adl_pci9111.c | 28
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
The hardware for the analog output subdevices is normally write-only. In
order to provide a 'readback' mechanism the last values written to the
analog output channels is cached in the private data of the comedi driver.
This allows the user to do an (*insn_read) operation to get back the last
values
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Add a comment about the 'readback' member.
Signed-off-by: H Hartley Sweeten
Cc: Ian
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
driver
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/driv
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
For aesthetics, rename the (*insn_write) function and tidy it up a bit.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
driver
The analog output hardware in most comedi drivers does not provide a
way to readback to last values written to the channels. In order to
provide an (*insn_read) for the analog output subdevice, the comedi
drivers save the last values for each channel in the private data.
Add a new member, 'readbac
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/das16.c | 11 +--
1 file changed, 9 inse
Use the new comedi_subdevice 'readback' member and the core provided
(*insn_read) for the readback of the analog output subdevice channels.
Remove the unused private data and its allocation.
For aesthetics, rename the (*insn_write) function and tidy it up.
Signed-off-by: H Hartley Sweeten
Cc: I
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_1564.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c
b/drivers/staging/comedi/
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_65xx.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_65xx.c
b/drivers/staging/comedi/drivers/ni_65xx.c
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/pcl726.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl726.c
b/drivers/staging/comedi/drivers/pcl726.c
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_1032.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c
b/drivers/staging/comedi/
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/amplc_pc236_common.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/amplc_pc236_common.c
b/drivers/staging
This code wants to allocate two arrays of struct urb pointers not two
arrays of struct urb objects. The size argument for both kcalloc calls
should be sizeof(urb) not sizeof(*urb).
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/gsc_hpdi.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c
b/drivers/staging/comedi/drivers/gsc_hp
These should both be checking the -errno.
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/usbduxsigma.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbduxs
The local variable 'd' is used to read a 32-bit register. One branch of
the code shifts the register value 16 bits to the right to get the high
16-bits. Change the type of the local variable so that this shift works
correctly.
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_mio_common.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c
b/drivers/staging/comedi/driv
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_tiocmd.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_tiocmd.c
b/drivers/staging/comedi/drivers/ni_ti
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/addi_apci_2032.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c
b/drivers/staging/comedi/dri
This series fixes a number of issues reported by coverity.
H Hartley Sweeten (19):
staging: comedi: usbduxsigma: fix errno (EL2NSYNC) check
staging: comedi: usbduxsigma: fix kcalloc 'size' argument
staging: comedi: usbdux: fix errno (EL2NSYNC) check
staging: comedi: usbdux: remove deadcode
The 'aref' (CR_AREF) values are all AREF_* defines. The SDF_* defines are
subdevice flags. Fix the test in this function.
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 2 +-
1 file changed, 1 insertion
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/comedi_parport.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/comedi_parport.c
b/drivers/staging/comedi/
These should both be checking the -errno.
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/usbdux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/usbdux.c
b/
The previous mask by 0xf ensures that calib_source will not be > 0xf.
Remove the dead code.
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_mio_common.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/driv
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/dt3000.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/dt3000.c
b/drivers/staging/comedi/drivers/dt3000.c
index 56e21cc..96a25a
The 'aref' (CR_AREF) values are all AREF_* defines. The SDF_* defines are
subdevice flags. Fix the test in this function.
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 2 +-
1 file changed, 1 insertion
Reported by: coverity
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/ni_6527.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/comedi/drivers/ni_6527.c
b/drivers/staging/comedi/drivers/ni_6527.c
> -Original Message-
> From: Sitsofe Wheeler [mailto:sits...@gmail.com]
> Sent: Monday, August 25, 2014 2:43 PM
> To: Dan Carpenter
> Cc: KY Srinivasan; Greg Kroah-Hartman; Jason Wang; linux-
> ker...@vger.kernel.org; David S. Miller; Daniel Borkmann;
> net...@vger.kernel.org; de...@linux
On Mon, Aug 25, 2014 at 12:36:48PM +0300, Dan Carpenter wrote:
> The code here is:
>
> drivers/hv/channel.c
>460 BUG_ON(ret != 0);
>461 t = wait_for_completion_timeout(&info->waitevent, 5*HZ);
>462 BUG_ON(t == 0);
>
There is also a case of the BUG_ON at lin
The Elecom WDC-150SU2M uses this chip.
Reported-by: Hiroki Kondo
Signed-off-by: Larry Finger
---
drivers/staging/rtl8188eu/os_dep/usb_intf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index 264e6
On 08/25, Dan Carpenter wrote:
> Hello Konrad Zapalowicz,
>
> The patch ea6e9dea2e72: "staging: dgnc: Fix frame size is larger than
> 1024B" from Aug 6, 2014, leads to the following static checker
> warning:
>
> drivers/staging/dgnc/dgnc_tty.c:479 dgnc_sniff_nowait_nolock()
> error: s
Add two new lines that are missing after declerations as detected by
checkpatch.pl
Signed-off-by: Koray Gulcu
---
drivers/staging/android/sw_sync.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/android/sw_sync.c
b/drivers/staging/android/sw_sync.c
index a76db3f..863d
> -Original Message-
> From: Sitsofe Wheeler [mailto:sits...@gmail.com]
> Sent: Monday, August 25, 2014 11:48 AM
> To: KY Srinivasan
> Cc: Daniel Borkmann; David Miller; Haiyang Zhang;
> de...@linuxdriverproject.org; net...@vger.kernel.org; linux-
> ker...@vger.kernel.org; Jesper Dangaard
On Tue, Aug 19, 2014 at 12:40:53PM +0100, Sitsofe Wheeler wrote:
> On Tue, Aug 19, 2014 at 10:57:30AM +0200, Daniel Borkmann wrote:
> > On 08/19/2014 10:15 AM, Sitsofe Wheeler wrote:
> > >After a variety of issues on Hyper-V (host is running Windows 2012 R2) I
> > >updated to the latest kernel (3.1
> -Original Message-
> From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org]
> Sent: Monday, August 25, 2014 10:50 AM
> To: KY Srinivasan
> Cc: Dan Carpenter; Sitsofe Wheeler; Jason Wang; linux-
> ker...@vger.kernel.org; David S. Miller; Daniel Borkmann;
> net...@vger.kernel.org; d
On Mon, Aug 25, 2014 at 05:34:27PM +, KY Srinivasan wrote:
>
>
> > -Original Message-
> > From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> > Sent: Monday, August 25, 2014 2:37 AM
> > To: Sitsofe Wheeler
> > Cc: KY Srinivasan; Greg Kroah-Hartman; Jason Wang; linux-
> > ker...@vg
1 - 100 of 121 matches
Mail list logo