Re: [patch 1/2] staging: r8188eu: array overflow in rtw_mp_ioctl_hdl()

2014-02-06 Thread Larry Finger
On 02/03/2014 04:38 PM, Dan Carpenter wrote: MAX_MP_IOCTL_SUBCODE (35) and mp_ioctl_hdl (32 elements) are no longer in sync. It leads to a bogus pointer dereference. Signed-off-by: Dan Carpenter Acked-by: Larry Finger Larry diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/

[PATCH 07/12] staging: r8188eu: Remove wrappers around vmalloc and vzalloc

2014-02-06 Thread Larry Finger
Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 4 ++-- drivers/staging/rtl8188eu/core/rtw_mp.c | 2 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/rtl8188eu/c

[PATCH 06/12] staging: r8188eu: Remove ODM_Write4Byte

2014-02-06 Thread Larry Finger
This routine is the equivalent of rtw_write32. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c| 2 +- drivers/staging/rtl8188eu/hal/odm_interface.c | 7 --- drivers/staging/rtl8188eu/include/odm_interface.h | 2 -- 3 files changed, 1 insertion(+), 10 de

[PATCH 09/12] staging: r8188eu: Remove ODM_AllocateMemory

2014-02-06 Thread Larry Finger
This wrapper for vzalloc() is not used. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/odm_interface.c | 6 -- drivers/staging/rtl8188eu/include/odm_interface.h | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/st

[PATCH 03/12] staging: r8188eu: Remove ODM_Read4Byte

2014-02-06 Thread Larry Finger
This routine is essentially a duplicate of rtw_read32. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 9 + drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 2 +- drivers/staging/rtl8188eu/hal/odm.c | 8 drivers/stagi

Re: [patch] staging: r8188eu: memory corruption handling long ssids

2014-02-06 Thread Larry Finger
On 02/06/2014 02:42 PM, Dan Carpenter wrote: We should cap the SSID length at NDIS_802_11_LENGTH_SSID (32) characters to avoid memory corruption. If the SSID is too long then I have opted to ignore it instead of truncating it. We don't need to clear bssid->Ssid.Ssid[0] because this struct is al

[PATCH 12/12] staging: r8188eu: Remove ODM_InitializeTimer

2014-02-06 Thread Larry Finger
This wrapper is not used. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/odm_interface.c | 8 drivers/staging/rtl8188eu/include/odm_interface.h | 4 2 files changed, 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rt

[PATCH 05/12] staging: r8188eu: Remove ODM_Write2Byte

2014-02-06 Thread Larry Finger
This routine is the equivalent of rtw_write16. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 4 +++- drivers/staging/rtl8188eu/hal/odm_interface.c| 6 -- drivers/staging/rtl8188eu/include/odm_interface.h| 2 -- 3 files changed, 3 insertion

[PATCH 00/12] Remove several pointless wrapper routines

2014-02-06 Thread Larry Finger
The driver contains a large number of wrapper routines. None of them are needed. Signed-off-by: Larry Finger Larry Finger (12): staging: r8188eu: Remove ODM_Read1Byte staging: r8188eu: Remove ODM_Read2Byte staging: r8188eu: Remove ODM_Read4Byte staging: r8188eu: Remove ODM_Write1Byte s

[PATCH 08/12] staging: r8188eu: Remove wrappers around vfree

2014-02-06 Thread Larry Finger
Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 5 ++--- drivers/staging/rtl8188eu/core/rtw_mp.c | 2 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 2 +- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 2 +- drivers/staging/rtl8188eu/core

[PATCH 04/12] staging: r8188eu: Remove ODM_Write1Byte

2014-02-06 Thread Larry Finger
This routine is the equivalent of rtl_write6. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 23 +- drivers/staging/rtl8188eu/hal/odm.c| 3 ++- drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c | 4 +++- drivers/staging

[PATCH 11/12] staging: r8188eu: Remove ODM_SetTimer

2014-02-06 Thread Larry Finger
This wrapper is not used. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/odm_interface.c | 5 - drivers/staging/rtl8188eu/include/odm_interface.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl8188e

[PATCH 02/12] staging: r8188eu: Remove ODM_Read2Byte

2014-02-06 Thread Larry Finger
This routine is never used. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/odm_interface.c | 6 -- drivers/staging/rtl8188eu/include/odm_interface.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm_interface.c b/drivers/staging/rtl81

[PATCH 01/12] staging: r8188eu: Remove ODM_Read1Byte

2014-02-06 Thread Larry Finger
This is essentially a synonym for rtw_read8. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c| 6 +++--- drivers/staging/rtl8188eu/hal/odm_interface.c | 6 -- drivers/staging/rtl8188eu/include/odm_interface.h | 2 -- 3 files changed, 3 insertions(+), 11

[PATCH 10/12] staging: r8188eu: Remove ODM_CompareMemory

2014-02-06 Thread Larry Finger
This routine is a wrapper for _rtw_memcmp(), which is a wrapper for memcmp. In a later change, _rtw_memcmp will be removed. Signed-off-by: Larry Finger --- drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c| 4 ++-- drivers/staging/rtl8188eu/hal/odm_interface.c | 5 - drivers/staging/rtl

Re: [patch 2/2] staging: r8188eu: overflow in rtw_p2p_get_go_device_address()

2014-02-06 Thread Larry Finger
On 02/03/2014 04:38 PM, Dan Carpenter wrote: The go_devadd_str[] array is two characters too small to hold the address so we corrupt memory. I've changed the user space API slightly and I don't have a way to test if this breaks anything. In the original code we truncated away the last digit of

[PATCH 00/48] staging: comedi: cleanup the "timeout" loops

2014-02-06 Thread H Hartley Sweeten
Many of the comedi drivers implement a "timeout" loop of some sort in the analog input (*insn_read) or analog output (*insn_write) functions. Some of these are just crazy loop this many times for some status to change. There are a couple that could actually deadlock the system if the status does no

[PATCH 31/48] staging: comedi: adq12b: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. This also fixes a possible bug where invalid data is returned if the conversion did not complete. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adq12b.c | 31 ++

[PATCH 19/48] staging: comedi: dt2811: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2811.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/staging/c

[PATCH 33/48] staging: comedi: das1800: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Use break to exit the loop so that the common path can be used to unlock the spinlock. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das1800.c | 33

[PATCH 04/48] staging: comedi: das16: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 27/48] staging: comedi: rti800: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Change the errno returned for an overrun from -EIO to -EOVERFLOW. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rti800.c | 29 + 1 file

[PATCH 30/48] staging: comedi: adv_pci1710: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 38 +--- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/driver

[PATCH 16/48] staging: comedi: cb_pcimdas: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Remove the unnecessary comments. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcimdas.c | 35 - 1 file changed, 19 insertions(+), 16

[PATCH 36/48] staging: comedi: dyna_pci10xx: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Also, remove some unnecessary comments. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dyna_pci10xx.c | 40 --- 1 file changed, 24 insertions

[PATCH 40/48] staging: comedi: ni_daq_700: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_daq_700.c | 53 ++--- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/driver

[PATCH 02/48] staging: comedi: skel: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Since this is the sample skeleton driver, add comments about how the callback function works with comedi_timeout(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/sk

[PATCH 23/48] staging: comedi: addi_apci_3xx: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input and output end-of- conversions. This prevents a deadlock condition that could occur by providing a timeout in case the end-of-conversion does not happen. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/stagin

[PATCH 05/48] staging: comedi: das800: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das800.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi

[PATCH 44/48] staging: comedi: rtd520: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input and output end-of- conversions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/rtd520.c | 84 +++-- 1 file changed, 38 insertions(+), 46 deletions(-) diff -

[PATCH 06/48] staging: comedi: ii_pci20kc: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ii_pci20kc.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/staging/

[PATCH 28/48] staging: comedi: adl_pci9111: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 36 +++- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/driver

[PATCH 15/48] staging: comedi: cb_pcidas64: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas64.c | 44 +--- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/driver

[PATCH 41/48] staging: comedi: pcl812: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Combine the logic for the pcl812 and acl812 end-of-conversion in the helper function to simplify the driver. The interrupt routine also uses the timeout check to make sure data is actually available. Using NULL here for the 'ins

[PATCH 37/48] staging: comedi: dmm32at: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input settle and end-of- conversion. These tests use different registers but the same bit so the register is passed as the 'context'. The same test is used in dmm32at_ai_cmd() but the 'insn' is not available. This is ok since the test function, and comedi

[PATCH 21/48] staging: comedi: mpc624: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mpc624.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/drivers/sta

[PATCH 47/48] staging: comedi: move (*insn_{read, write}) timeout debug message to core

2014-02-06 Thread H Hartley Sweeten
All the comedi drivers that now use comedi_timeout() return a standard errno when a timeout occurs. Remove all the private debug messages and have the core output the dev_dbg() message. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fop

[PATCH 43/48] staging: comedi: pcl818: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. The interrupt routine also uses the timeout check to make sure data is actually available. Using NULL here for the 'insn' is safe since nothing uses it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman -

[PATCH 38/48] staging: comedi: icp_multi: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input and output end-of- conversion. Use break to exit the loop when a timeout occurs during the analog input read so that common code can be used to disable the device. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- driv

[PATCH 14/48] staging: comedi: cb_pcidas: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_pcidas.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/st

[PATCH 18/48] staging: comedi: das16m1: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das16m1.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/stag

[PATCH 34/48] staging: comedi: daqboard2000: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input pipe full, scanning, amd end-of-conversion status. The status to check it passed as the 'context' to comedi_timeout(). Use comedi_timeout() to wait for the analog output end-of-conversion. This also fixes a possible bug where invalid data is retur

[PATCH 10/48] staging: comedi: pcmad: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmad.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/com

[PATCH 29/48] staging: comedi: adl_pci9118: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9118.c | 34 ++-- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/driver

[PATCH 13/48] staging: comedi: cb_das16_cs: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/cb_das16_cs.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/s

[PATCH 42/48] staging: comedi: pcl816: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. The interrupt routine also uses the timeout check to make sure data is actually available. Using NULL here for the 'insn' is safe since nothing uses it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman -

[PATCH 39/48] staging: comedi: multiq3: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/multiq3.c | 38 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/driver

[PATCH 09/48] staging: comedi: pcl711: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcl711.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/staging/co

[PATCH 22/48] staging: comedi: s526: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/s526.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/drivers/s

[PATCH 48/48] staging: comedi: don't clear 'data' on (*insn_read) timeout

2014-02-06 Thread H Hartley Sweeten
It's not necessary to clear the returned data pointer when an (*insn_read) times out. For aesthetics, remove all of these in the drivers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 1 - drivers/staging/comedi/drive

[PATCH 11/48] staging: comedi: pcmmio: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input and output end-of- conversions. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/pcmmio.c | 42 +++-- 1 file changed, 24 insertions(+), 18 deletions(-) diff -

[PATCH 24/48] staging: comedi: ni_at_a2150: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_at_a2150.c | 42 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/driver

[PATCH 03/48] staging: comedi: adl_pci6208x: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog output end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci6208.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/sta

[PATCH 12/48] staging: comedi: aio_aio12_8: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_aio12_8.c | 30 ++-- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/driver

[PATCH 01/48] staging: comedi: introduce comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Introduce a comedi core helper function to handle the boilerplate needed by the drivers to wait for a condition to occur. Typically this condition is the analog input/output end-of-conversion used with the comedi (*insn_read) and (*insn_write) operations. To use this function, the drivers just nee

[PATCH 46/48] staging: comedi: dt282x: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
The wait_for() macro in this driver is a bit nasty. It effects control flow which according to the CodingStyle is a _very_ bad idea. The mux_busy() and ad_done() macros are also bad since they rely on a local variable having a specific name. Remove these macros and use comedi_timeout() to wait fo

[PATCH 35/48] staging: comedi: dt2814: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2814.c | 44 +++-- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/driver

[PATCH 32/48] staging: comedi: amplc_pci230: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/amplc_pci230.c | 32 +++ 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/driver

[PATCH 08/48] staging: comedi: ni_labpc: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_labpc.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/staging/c

[PATCH 25/48] staging: comedi: ni_atmio16d: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Change the errno returned when the conversion overflows from -ETIME to -EOVERFLOW. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_atmio16d.c | 52

[PATCH 45/48] staging: comedi: s626: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. This prevents a deadlock condition that could occur by providing a timeout in case the end-of-conversion does not happen. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/driv

[PATCH 20/48] staging: comedi: me_daq: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/me_daq.c | 35 ++--- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/driver

[PATCH 26/48] staging: comedi: dt2815: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog output end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/dt2815.c | 39 ++--- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/drive

[PATCH 17/48] staging: comedi: das08: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/das08.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/drivers/staging

[PATCH 07/48] staging: comedi: mf6x4: use comedi_timeout()

2014-02-06 Thread H Hartley Sweeten
Use comedi_timeout() to wait for the analog input end-of-conversion. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/mf6x4.c | 23 ++- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/staging/c

[patch] staging: r8188eu: memory corruption handling long ssids

2014-02-06 Thread Dan Carpenter
We should cap the SSID length at NDIS_802_11_LENGTH_SSID (32) characters to avoid memory corruption. If the SSID is too long then I have opted to ignore it instead of truncating it. We don't need to clear bssid->Ssid.Ssid[0] because this struct is allocated with rtw_zmalloc() Signed-off-by: Dan

Re: [PATCH 7/8] staging:rtl8821ae: fix ERROR: spaces required around that '&&' in pci.c

2014-02-06 Thread Dan Carpenter
I just saw Greg's email that this would be deleted... On Thu, Feb 06, 2014 at 11:27:52PM +0300, Dan Carpenter wrote: > if (rtlpriv->mac80211.opmode == NL80211_IFTYPE_AP && > rtlpriv->rtlhal.current_bandtype == BAND_ON_2_4G) && >

Re: [PATCH 7/8] staging:rtl8821ae: fix ERROR: spaces required around that '&&' in pci.c

2014-02-06 Thread Dan Carpenter
On Fri, Feb 07, 2014 at 12:45:28AM +0530, Gokulnath A wrote: > Fixed the error found by checkpatch.pl related to spacing requirement > in the && condition. > > Signed-off-by: Gokulnath A > --- > drivers/staging/rtl8821ae/pci.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff

Re: [PATCH 5/8] staging:rtl8821ae fix ERROR: space prohibited after that

2014-02-06 Thread Dan Carpenter
On Fri, Feb 07, 2014 at 12:45:26AM +0530, Gokulnath A wrote: > Fixed all the errors related to space prohibition found by > checkpatch.pl script > > Signed-off-by: Gokulnath A > --- > drivers/staging/rtl8821ae/pci.c | 26 +- > 1 file changed, 13 insertions(+), 13 deletio

Re: [PATCH 3/8] staging:rtl8821ae fix ERROR: space required after that in pci.c

2014-02-06 Thread Greg KH
On Thu, Feb 06, 2014 at 11:01:11PM +0300, Dan Carpenter wrote: > On Fri, Feb 07, 2014 at 12:45:24AM +0530, Gokulnath A wrote: > > fixed all the spacing related issues found by checkpatch.pl script. > > > > A lot of this stuff should just be removed. This whole driver is going to be deleted for

Re: [PATCH 3/8] staging:rtl8821ae fix ERROR: space required after that in pci.c

2014-02-06 Thread Dan Carpenter
On Fri, Feb 07, 2014 at 12:45:24AM +0530, Gokulnath A wrote: > fixed all the spacing related issues found by checkpatch.pl script. > A lot of this stuff should just be removed. > Signed-off-by: Gokulnath A The signed off by should match the email you are using to send so we can verify it a bi

Re: [PATCH 2/8] staging:rtl8821ae remove C99 comments in pci.c

2014-02-06 Thread Dan Carpenter
On Fri, Feb 07, 2014 at 12:45:23AM +0530, Gokulnath A wrote: > Removed all the C99 comments found by checkpatch.pl script > Just delete these. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproj

[PATCH 8/8] staging:rtl8821ae: fix ERROR: (foo*) should be (foo *)

2014-02-06 Thread Gokulnath A
This patch fixes the following checkpatch.pl issues in rtl8821ae/pci.c file ERROR: (foo*) should be (foo *) Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging

[PATCH 6/8] staging:rtl8821ae: Fix code indentation errors in pci.c

2014-02-06 Thread Gokulnath A
fixed all the code indentation errors found by checkpatch.pl script Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c index

[PATCH 7/8] staging:rtl8821ae: fix ERROR: spaces required around that '&&' in pci.c

2014-02-06 Thread Gokulnath A
Fixed the error found by checkpatch.pl related to spacing requirement in the && condition. Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c index

[PATCH 3/8] staging:rtl8821ae fix ERROR: space required after that in pci.c

2014-02-06 Thread Gokulnath A
fixed all the spacing related issues found by checkpatch.pl script. Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 54 - 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rt

[PATCH 0/8] staging:rtl8821ae:pci.c code cleanup

2014-02-06 Thread Gokulnath A
The following series of patches are used to Fix all the errors found by checkpatch.pl script in the pci.c. Few warnings are still present in the patches submitted. That can be taken care in the next set of patches. Gokulnath A (8): staging:rtl8821ae:pci.c trailing whitespace cleanup staging:

[PATCH 5/8] staging:rtl8821ae fix ERROR: space prohibited after that

2014-02-06 Thread Gokulnath A
Fixed all the errors related to space prohibition found by checkpatch.pl script Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl88

[PATCH 4/8] staging:rtl8821ae fix ERROR: space required before that

2014-02-06 Thread Gokulnath A
Fixed all the errors related to spacing found by checkpatch.pl script Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c index

[PATCH 2/8] staging:rtl8821ae remove C99 comments in pci.c

2014-02-06 Thread Gokulnath A
Removed all the C99 comments found by checkpatch.pl script Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/staging/rtl8821ae/pci.c index 618a3cb..a1bf11b 100644

[PATCH 1/8] staging:rtl8821ae: trailing whitespace cleanup in pci.c

2014-02-06 Thread Gokulnath A
Fixed all the trailing whitespace errors found by checkpatch.pl script Signed-off-by: Gokulnath A --- drivers/staging/rtl8821ae/pci.c | 250 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/drivers/staging/rtl8821ae/pci.c b/drivers/stagin

[PATCH v3 1/3] mfd: Add realtek USB card reader driver

2014-02-06 Thread rogerable
From: Roger Tseng Realtek USB card reader provides a channel to transfer command or data to flash memory cards. This driver exports host instances for mmc and memstick subsystems and handles basic works. Signed-off-by: Roger Tseng --- drivers/mfd/Kconfig | 10 + drivers/mfd/Makefile

[PATCH v3 2/3] mmc: Add realtek USB sdmmc host driver

2014-02-06 Thread rogerable
From: Roger Tseng Realtek USB SD/MMC host driver provides mmc host support based on the Realtek USB card reader MFD driver. Signed-off-by: Roger Tseng --- drivers/mmc/host/Kconfig |7 + drivers/mmc/host/Makefile |1 + drivers/mmc/host/rtsx_usb_sdmmc.c | 1500 ++

[PATCH v3 3/3] memstick: Add realtek USB memstick host driver

2014-02-06 Thread rogerable
From: Roger Tseng Realtek USB memstick host driver provides memstick host support based on the Realtek USB card reader MFD driver. Signed-off-by: Roger Tseng --- drivers/memstick/host/Kconfig | 10 + drivers/memstick/host/Makefile | 1 + drivers/memstick/host/rtsx_usb_ms.c | 849

[PATCH v3 0/3] Add modules for realtek USB card reader

2014-02-06 Thread rogerable
From: Roger Tseng This patchset adds modules to support Realtek USB vendor specific class flash card reader: one base module in MFD subsystem and two host modules in both mmc and memstick subsystems. The architecture is similar to rtsx_pci. This work is done primarily to replace the staging driv

Re: vme_tsi148 question

2014-02-06 Thread Michael Kenney
On Thu, Feb 6, 2014 at 12:40 AM, Martyn Welch wrote: > > > On 05/02/14 23:21, Michael Kenney wrote: >> >> On Wed, Feb 5, 2014 at 1:38 PM, Michael Kenney wrote: >>> >>> On Wed, Feb 5, 2014 at 1:22 PM, Martyn Welch wrote: On 5 February 2014 17:41, Greg KH wrote: > >>>

[PATCH v2] imx-drm: imx-hdmi: Remove parentheses from returns

2014-02-06 Thread Fabio Estevam
Fix the following checkpatch warnings: ERROR: return is not a function, parentheses are not required #462: FILE: drivers/staging/imx-drm/imx-hdmi.c:462: + return (hdmi->hdmi_data.enc_in_format != ERROR: return is not a function, parentheses are not required #468: FILE: drivers/staging/imx-d

Re: [PATCH v2] imx-drm: imx-hdmi: Remove parentheses from returns

2014-02-06 Thread Dan Carpenter
On Thu, Feb 06, 2014 at 10:12:03AM -0200, Fabio Estevam wrote: > Fix the following checkpatch warnings: > > ERROR: return is not a function, parentheses are not required > #462: FILE: drivers/staging/imx-drm/imx-hdmi.c:462: > + return (hdmi->hdmi_data.enc_in_format != > > ERROR: return is n

Re: [PATCH v2] staging: comedi: adv_pci1710: fix analog output readback value

2014-02-06 Thread Ian Abbott
On 2014-02-05 21:59, H Hartley Sweeten wrote: The last value written to a analog output channel is cached in the private data of this driver for readback. Currently, the wrong value is cached in the (*insn_write) functions. The current code stores the data[n] value for readback afer the loop has

Re: vme_tsi148 question

2014-02-06 Thread Martyn Welch
On 05/02/14 23:21, Michael Kenney wrote: On Wed, Feb 5, 2014 at 1:38 PM, Michael Kenney wrote: On Wed, Feb 5, 2014 at 1:22 PM, Martyn Welch wrote: On 5 February 2014 17:41, Greg KH wrote: On Tue, Feb 04, 2014 at 06:34:13PM +, Martyn Welch wrote: On 04/02/14 16:34, Michael Kenney

Re: [PATCH] imx-drm: imx-hdmi: Remove parentheses from returns

2014-02-06 Thread Dan Carpenter
On Wed, Feb 05, 2014 at 06:36:42PM -0200, Fabio Estevam wrote: > From: Fabio Estevam > Don't use the From: header. It is for maintainers sending patches on behalf of other people. Figure out how to send emails from within freescale. That way we can do a minimum of verifying that your signed-o