Re: [PATCH v3] staging: writeboost: Add dm-writeboost

2015-02-20 Thread Akira Hayakawa
Hi, Very very sad to not receive any comments from dm maintainers in the past 2 mouths. I implemented read-caching for v3 because they like to see this feature in but no comment... I still believe they reevaluate dm-writeboost because I don't think this driver isn't bad as they claim. They

[PATCH] Drivers: hv: hv_balloon: keep locks balanced on add_memory() failure

2015-02-20 Thread Vitaly Kuznetsov
When add_memory() fails the following BUG is observed: [ 743.646107] hv_balloon: hot_add memory failed error is -17 [ 743.679973] [ 743.680930] = [ 743.680930] [ BUG: bad unlock balance detected! ] [ 743.680930] 3.19.0-rc5_bug1131426+ #552 Not tainted [

[PATCH] staging: android: ion: fix some format strings

2015-02-20 Thread Rasmus Villemoes
C99 says that a precision which is simply '.' with no following digits or * should be interpreted as 0, which means that these format strings actually mean 'print 16 spaces'. However, the kernel's printf implementation treats this case as if the precision was omitted. Don't rely on that quirk.

[PATCH] staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMIC

2015-02-20 Thread Tapasweni Pathak
To avoid deadlock, do not call blocking functions with spinlocks held. Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the pile doesn't have enough free pages but will not sleep and hence deadlock can be avoided. Found by Coccinelle. Signed-off-by: Tapasweni Pathak

[RFC PATCH 24/36] staging: comedi: cb_pcidas64: remove unnecessary include

2015-02-20 Thread H Hartley Sweeten
The hardware supported by this driver does not have an 8254 timer. Remove the unnecessary include of 8253.h. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[RFC PATCH 14/36] staging: comedi: amplc_pci230: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 13/36] staging: comedi: adv_pci1710: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. It also provides a comedi_subdevice to allow the user to use channel 0 of the 8254 timer. Currently the subdevice support does not work correctly due to and (*insn_config) that does not follow the

[RFC PATCH 36/36] staging: comedi: 8253.h: remove unused header

2015-02-20 Thread H Hartley Sweeten
All the comedi drivers have been converted to use the comedi_8254 module to provide support for the 8254 timers. Remove this unused header. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[RFC PATCH 34/36] staging: comedi: amplc_dio200_common: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
Convert this driver to use the comedi_8254 module to provide the 8254 timer support. Add 'clock_src' and 'gate_src' members to the comedi_8254 data for convienence. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 01/36] staging: comedi: comedi_8254: introduce module for 8254 timer support

2015-02-20 Thread H Hartley Sweeten
A 8254 timer/counter is commonly used on data acquisition boards to provide the internal pacer clock used to acquire analog input samples. Some boards also to allow the timers to be used externally. Currently the 8254 timers are supported by comedi using the 8253.h header and a number of inline

[RFC PATCH 20/36] staging: comedi: adv_pci_dio: simplify counter subdevice I/O

2015-02-20 Thread H Hartley Sweeten
Only two of the boards supported by this driver have an 8254 counter/timer. Both of these boards have a single 8254 device. Currently the counter subdevice functions are coded to support multiple 8254 devices. This is unnecessary and just complicates the codde. Simplfy the subdevice functions to

[RFC PATCH 15/36] staging: comedi: das08: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
Some of the hardware supported by this driver include an 8254 timer that is exposed to the user as a comedi_subdevice. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc:

[RFC PATCH 29/36] staging: comedi: amplc_dio200_common: remove 'clk_sce_ofs' from struct dio200_subdev_8254

2015-02-20 Thread H Hartley Sweeten
This member is only used one place in the driver. Remove it and calculate the register offset when needed. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[RFC PATCH 25/36] staging: comedi: das16: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 21/36] staging: comedi: adv_pci_dio: refactor 's8254' boardinfo

2015-02-20 Thread H Hartley Sweeten
The boardinfo for the 8254 timer is overly complex. The 8254 timer always has 3 channels and the 'regs' and 'specflags' members of diosubd_data are not used. The only necessary information is the base 'addr' offset to the 8254 registers. Replace the 's8254' member with an unsigned long

[RFC PATCH 31/36] staging: comedi: amplc_dio200_common: remove 'which' from struct dio200_subdev_8254

2015-02-20 Thread H Hartley Sweeten
This member is only used in the set gate and set clock helper functions. Remove it and calculate the value when needed. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[RFC PATCH 02/36] staging: comedi: add 'pacer' member to struct comedi_device

2015-02-20 Thread H Hartley Sweeten
Add a new member to the comedi_device struct for a comedi_8254 'pacer'. This provides a convient place to store the data allocated by the comedi_8254 module for boards that use an 8254 device to create the data acquisition pacer clock. Automatically free this pointer in

[RFC PATCH 33/36] staging: comedi: amplc_dio200_common: remove 'spinlock' from struct dio200_subdev_8254

2015-02-20 Thread H Hartley Sweeten
Currently this driver uses a spinlock in the 8254 subdevice (*insn_read), (*insn_write), and (*insn_config) functions. The comedi core checks if the subdevice is 'busy', in parse_insn(), before any of the subdevice functions are attempted. Remove the unnecessary spinlock. Signed-off-by: H

[RFC PATCH 27/36] staging: comedi: amplc_dio200_common: introduce DIO200_CLK_SEL() macro

2015-02-20 Thread H Hartley Sweeten
Replace the DIO200_[XYZ]CLK_SEL defines with a macro that returns the correct register offset. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/amplc_dio200_common.c

[RFC PATCH 17/36] staging: comedi: ni_at_a2150: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
The hardware supported by this driver includes an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 11/36] staging: comedi: das16m1: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses two 8254 timers. One to generate the analog input pacer clock and one to count the number of samples. Convert it to use the comedi_8254 module to provide support for the 8254 timers. Use the comedi_device 'pacer' member for the 8254 timer used for analog input. This data is

[RFC PATCH 28/36] staging: comedi: amplc_dio200_common: introduce DIO200_GAT_SEL() macro

2015-02-20 Thread H Hartley Sweeten
Replace the DIO200_[XYZ]GAT_SEL defines with a macro that returns the correct register offset. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org --- drivers/staging/comedi/drivers/amplc_dio200_common.c

[RFC PATCH 26/36] staging: comedi: adl_pci9118: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 22/36] staging: comedi: adv_pci_dio: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
Some of the hardware supported by this driver includes an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 05/36] staging: comedi: pcl818: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Note that the pacer does not have to be stopped when starting a new async command in pcl818_ai_cmd() or when the card

[RFC PATCH 19/36] staging: comedi: das1800: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Tidy up the (*do_cmdtest) validation of the timer arguments. Absorb the converted das1800_setup_counters() code into

[RFC PATCH 00/36] staging: comedi: cleanup 8254 timer code

2015-02-20 Thread H Hartley Sweeten
This series introduces a new module. comedi_8254, to support the 8254 timer devices that are commonly found on data acquisition card. This module replaces the current support provided by the inline functions in 8253.h and consolidates the subdevice support code found in the comedi drivers. H

[RFC PATCH 07/36] staging: comedi: adl_pci9111: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 09/36] staging: comedi: cb_pcidas: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses two 8254 timers to generate the pacer clocks. One for analog input acquisition and one for analog output data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timers. Use the comedi_device 'pacer' member for the 8254 timer used for analog

[RFC PATCH 12/36] staging: comedi: cb_das16_cs: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
The hardware supported by this drive has an 8254 timer. Currently this driver does not use the timer functions. For aesthetics, use the comedi_8254 module to provide support for the 8254 timer. This will ensure that the counters are all reset and make it easier to add functionality later.

[RFC PATCH 04/36] staging: comedi: pcl816: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 18/36] staging: comedi: das6402: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Remove the unnecessary programming of timer 0. The private data 'count' value is never set by the driver and the timer

[RFC PATCH 03/36] staging: comedi: pcl812: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Note that the pacer does not have to be stopped when starting a new async command in pcl812_ai_cmd() or when the card

[RFC PATCH 16/36] staging: comedi: ni_at_ao: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
The hardware supported by this driver includes an 8254 timer. This timer is not currently used, other than setting counters 1 and 2 to MODE4 to ensure that the outputs are high. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. This will make it

[RFC PATCH 10/36] staging: comedi: das800: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 35/36] staging: comedi: ni_labpc_common: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. The hardware actually has two 8254 devices. Timer B0 is the master for timed conversions, timer B1 sets the scan

[RFC PATCH 23/36] staging: comedi: me4000: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
Some of the hardware supported by this driver include an 8254 timer. For aesthetics, convert it to use the comedi_8254 module to provide support for the 8254 timer. This also fixes the (*insn_read) and (*insn_write) to work like the comedi API expects. Currently they only read or write a single

[RFC PATCH 32/36] staging: comedi: amplc_dio200_common: remove unnecessary 'counter_number' checks

2015-02-20 Thread H Hartley Sweeten
The 'counter_number' in these functions is the comedi channel number from the chanspec. The comedi core validates the chanspec before calling the driver functions. Remove the unnecessary checks. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc:

[RFC PATCH 30/36] staging: comedi: amplc_dio200_common: remove 'gat_sce_ofs' from struct dio200_subdev_8254

2015-02-20 Thread H Hartley Sweeten
This member is only used one place in the driver. Remove it and calculate the register offset when needed. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman gre...@linuxfoundation.org ---

[RFC PATCH 08/36] staging: comedi: amplc_pci224: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog output data conversion. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

[RFC PATCH 06/36] staging: comedi: pcl711: convert driver to use the comedi_8254 module

2015-02-20 Thread H Hartley Sweeten
This driver uses an 8254 timer to generate the pacer clock used for analog input data acquisition. Convert it to use the comedi_8254 module to provide support for the 8254 timer. Signed-off-by: H Hartley Sweeten hswee...@visionengravers.com Cc: Ian Abbott abbo...@mev.co.uk Cc: Greg Kroah-Hartman

Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma

2015-02-20 Thread Tolga Ceylan
On Fri, Feb 20, 2015 at 11:47 AM, Tolga Ceylan tolga.cey...@gmail.com wrote: On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches j...@perches.com wrote: Might as well remove the unnecessary cast too: memcpy(skb-cb, dev, sizeof(dev)); but it might be better to avoid the memcpy and

Re: dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-02-20 Thread Sumit Semwal
Hi Dan, On 21 February 2015 at 00:56, Dan Carpenter dan.carpen...@oracle.com wrote: Hello Sumit Semwal, The patch 817bd7253291: dma-buf: cleanup dma_buf_export() to make it easily extensible from Jan 23, 2015, leads to the following static checker warning:

Re: [PATCH v3] staging: writeboost: Add dm-writeboost

2015-02-20 Thread Akira Hayakawa
To be clear, bio's semantics doesn't require a io is written on persistent medium before any ack. The border line is that ios that's acked are persitent before ack to REQ_FLUSH request. So, writing on the volatile buffer (log chunk in this case) and then ack is safe if the data gets persistent

Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma

2015-02-20 Thread Joe Perches
On Fri, 2015-02-20 at 16:31 -0800, Tolga Ceylan wrote: On Fri, Feb 20, 2015 at 11:47 AM, Tolga Ceylan tolga.cey...@gmail.com wrote: On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches j...@perches.com wrote: Might as well remove the unnecessary cast too: memcpy(skb-cb, dev,

[PATCH 3/3] Staging: rtl8192u: ieee80211: rtl819x_TS: replaced C99 comments with C89

2015-02-20 Thread Tolga Ceylan
Replaced C99 comments with C89 while maintaining less than 80 char lines. Removed commented out struct member: DLRecord. Signed-off-by: Tolga Ceylan tolga.cey...@gmail.com --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-)

[PATCH 2/3] Staging: rtl8192u: ieee80211: dot11d: added parenthesis to RESET_CIE_WATCHDOG macro

2015-02-20 Thread Tolga Ceylan
Added parenthesis to RESET_CIE_WATCHDOG macro to resolve checkpatch error. Signed-off-by: Tolga Ceylan tolga.cey...@gmail.com --- drivers/staging/rtl8192u/ieee80211/dot11d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/dot11d.h

[PATCH 1/3] Staging: rtl8192u: ieee80211: ieee80211_crypt: removed commented out include

2015-02-20 Thread Tolga Ceylan
Removed a commented out header include Signed-off-by: Tolga Ceylan tolga.cey...@gmail.com --- drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c

Re: [PATCH v3] staging: writeboost: Add dm-writeboost

2015-02-20 Thread Joe Thornber
On Sat, Feb 21, 2015 at 12:25:53AM +0900, Akira Hayakawa wrote: Yes. How big are your log chunks? Presumably they're relatively small (eg, 256k). In which case you can optimise for the common case where you have enough bios to hand to build your log chunk by just referencing the bio payloads,

Re: [PATCH v3] staging: writeboost: Add dm-writeboost

2015-02-20 Thread Akira Hayakawa
The size is configurable but typically 512KB (that's the default). Refer to bio payload sounds really dangerous but it may be possible in some tricky way. but at the moment I am not sure how the implementation would be. Is there some fancy function that is like memcpy but actually move the

Re: [PATCH v3] staging: writeboost: Add dm-writeboost

2015-02-20 Thread Joe Thornber
On Sat, Feb 21, 2015 at 01:06:08AM +0900, Akira Hayakawa wrote: The size is configurable but typically 512KB (that's the default). Refer to bio payload sounds really dangerous but it may be possible in some tricky way. but at the moment I am not sure how the implementation would be. Is

Re: [PATCH v3] staging: writeboost: Add dm-writeboost

2015-02-20 Thread Joe Thornber
On Fri, Feb 20, 2015 at 05:44:01PM +0900, Akira Hayakawa wrote: I will wait for ack from dm maintainers. Are you still copying the contents of every bio to your own memory buffer before writing it to disk? - Joe ___ devel mailing list

[PATCH] [RFC] drivers/staging/fbtft: fix sparse warnings

2015-02-20 Thread Andrey Utkin
See below how sparse output changed with these changes. In few words: - fixed printf specifiers for size_t; - trying to fix address space specifiers issues, not sure what's correct approach, ASKING FOR COMMENTS AND HELP; - didn't touch was not declared. Should it be static? yet.

Re: [PATCH v8 2/4] fpga manager: add sysfs interface document

2015-02-20 Thread atull
On Thu, 19 Feb 2015, Michal Simek wrote: On 02/17/2015 08:17 PM, Pavel Machek wrote: On Tue 2015-02-17 11:07:53, Rob Landley wrote: On 02/15/2015 04:40 PM, Pavel Machek wrote: On Wed 2015-01-21 13:27:00, Jason Gunthorpe wrote: On Wed, Jan 21, 2015 at 06:33:12PM +0200, Pantelis

re: dma-buf: cleanup dma_buf_export() to make it easily extensible

2015-02-20 Thread Dan Carpenter
Hello Sumit Semwal, The patch 817bd7253291: dma-buf: cleanup dma_buf_export() to make it easily extensible from Jan 23, 2015, leads to the following static checker warning: drivers/staging/android/ion/ion.c:1112 ion_share_dma_buf() error: potentially dereferencing uninitialized

Re: [PATCH 4/4] Staging: rtl8192u: r819xU_firmware: added space after comma

2015-02-20 Thread Tolga Ceylan
On Thu, Feb 19, 2015 at 11:30 PM, Joe Perches j...@perches.com wrote: Might as well remove the unnecessary cast too: memcpy(skb-cb, dev, sizeof(dev)); but it might be better to avoid the memcpy and use an assign *(struct net_device *)skb-cb = dev; I'll submit

[PATCH 0/4] staging: comedi: fix some coverity reported issues

2015-02-20 Thread H Hartley Sweeten
H Hartley Sweeten (4): staging: comedi: vmk80xx: fix out-of-bounds write staging: comedi: ni_labpc_common: fix logically dead code issue staging: comedi: cb_pcidas64: fix possible integer overflow staging: comedi: rtd520: remove unnecessary interrupt disable

[PATCH 3/4] staging: comedi: cb_pcidas64: fix possible integer overflow

2015-02-20 Thread H Hartley Sweeten
The {min,max}_scan_divisor values could overflow due to the unsigned int * insigned int calculation. Change the type of the local variable 'convert_divisor' to unsigned long long to avoid the possible overflow. Reported-by: coverity (CID 200653) Signed-off-by: H Hartley Sweeten

[PATCH 4/4] staging: comedi: rtd520: remove unnecessary interrupt disable

2015-02-20 Thread H Hartley Sweeten
The read/write of the PLX_INTRCS_REG during the driver detach is not necessary. The rtd_reset() function writes 0 to this register which will disable all interrupts. This also fixes a dereference after null check reported by coverity. Reported-by: coverity (CID 751066) Signed-off-by: H Hartley

[PATCH 1/4] staging: comedi: vmk80xx: fix out-of-bounds write

2015-02-20 Thread H Hartley Sweeten
usb_blk_msg() will return the passed 'len' (64) as the 'actual_len' (cnt) of the transfer. The addition of the '\0' to the end of the returned string will overrun the 'rx' array. Increase the array size by 1 to fix the out-of-bounds write. Reported-by: coverity (CID 711413) Signed-off-by: H

[PATCH 2/4] staging: comedi: ni_labpc_common: fix logically dead code issue

2015-02-20 Thread H Hartley Sweeten
The quick exit check of (mode == MODE_SINGLE_CHAN) results in coverity reporting a logically dead code issue in the switch code in labpc_ai_check_chanlist(). Remove the quick exit check and allow the function to handle the MODE_SINGLE_CHAN normally (the for loop will only happen 1 time and the