[PATCH V2 01/41] staging: wilc1000: remove typedef from tstrWILC_WFIDrv

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrWILC_WFIDrv and rename it to host_if_drv. This patch includes the removal of the comment for tstrWILC_WFIDrv as well. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 354 +++

[PATCH V2 03/41] staging: wilc1000: host_interface.c : removes unused local variables

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes unused local variables from host_interface.c. The unused local variable, s32Error is used just to return zero, so this patch calls "returns 0" instead of "return s32Error" after removing s32Error. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/stag

[PATCH V2 02/41] staging: wilc1000: rename the member variable, drvHandler of host_if_msg

2015-10-12 Thread Tony Cho
From: Leo Kim This patch renames drvHandler of struct host_if_msg to drv. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 168 +++--- 1 file changed, 84 insertions(+), 84 deletions(-) diff --git a/drivers/staging/wilc1000

[PATCH V2 08/41] staging: wilc1000: remove typedef from tenuWIDtype

2015-10-12 Thread Tony Cho
From: Leo Kim This patch remove typedef from the enum tenuWIDtype and rename it to WID_TYPE. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_interface.h | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h |

[PATCH V2 10/41] staging: wilc1000: rename the member variable, u16WIDid of wid

2015-10-12 Thread Tony Cho
From: Leo Kim This patch renames u16WIDid of struct wid to id. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 8 +- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_interface.c | 186 ++---

[PATCH V2 07/41] staging: wilc1000: remove typedef from tstrWID

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrWID and rename it to wid. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 2 +- drivers/staging/wilc1000/coreconfigurator.h | 7 +-- drivers/staging/wilc1000/host_interface.c | 90

[PATCH V2 04/41] staging: wilc1000: wilc_wfi_cfgoperations.c : removes unused local variables

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes useless local variable, s32Error and returns directly zero from wilc_wfi_cfgoperations.c and also removes incorrect break in switch-case statement. The break is not useless which is being called right after return statement. Signed-off-by: Leo Kim Signed-off-by:

[PATCH V2 06/41] staging: wilc1000: change parameter names in send_config_pkt

2015-10-12 Thread Tony Cho
This patch changes the parameter names in send_config_pkt function as the followings: - u8Mode to mode - pstrWIDs to wids - u32WIDsCount to count - drvHandler to drv Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 41 ++--- drivers/staging/wilc1

[PATCH V2 05/41] staging: wilc1000: remove bool bRespRequired from send_config_pkt

2015-10-12 Thread Tony Cho
This patch removes 4th parameter, bool bRespRequired from the send_config_pkt function because it is not used inside the funcntion. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 2 +- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_

[PATCH V2 11/41] staging: wilc1000: rename the member variable, s32ValueSize of wid

2015-10-12 Thread Tony Cho
From: Leo Kim This patch renames s32ValueSize of struct wid to size. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 6 +- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_interface.c | 208 ++-

[PATCH V2 09/41] staging: wilc1000: rename the member variable, enuWIDtype of wid

2015-10-12 Thread Tony Cho
From: Leo Kim This patch renames enuWIDtype of struct wid to type. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_interface.c | 184 ++-- 2 files changed, 93 insertions(+), 93 del

[PATCH V2 12/41] staging: wilc1000: rename the member variable, ps8WidVal of wid

2015-10-12 Thread Tony Cho
From: Leo Kim This patch renames ps8WidVal of struct wid to val. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 4 +- drivers/staging/wilc1000/coreconfigurator.h | 2 +- drivers/staging/wilc1000/host_interface.c | 276 ++-

[PATCH V2 14/41] staging: wilc1000: remove unused struct tstrBssTable

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes struct tstrBssTable with related comment. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc100

[PATCH V2 21/41] staging: wilc1000: remove typedef from tstrHiddenNetworkInfo

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrHiddenNetworkInfo with related comments and renames it to hidden_net_info. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) d

[PATCH V2 18/41] staging: wilc1000: remove typedef from tstrWILC_UsrConnReq

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrWILC_UsrConnReq with the related comments and renames it to user_conn_req. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) d

[PATCH V2 17/41] staging: wilc1000: remove typedef from tstrWILC_UsrScanReq

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrWILC_UsrScanReq with related comments and renames it to user_scan_req. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff -

[PATCH V2 19/41] staging: wilc1000: remove typedef from tenuHostIFstate

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the enum tenuHostIFstate and rename it to host_if_state. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc10

[PATCH V2 24/41] staging: wilc1000: remove typedef from tstrStatistics

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrStatistics and rename it to rf_info. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- drivers/staging/wilc1000/host_interface.h | 7 +++ drivers/staging/wil

[PATCH V2 26/41] staging: wilc1000: rename typedef from tenuCfgParam

2015-10-12 Thread Tony Cho
From: Leo Kim This patch rename typedef from the enum tenuCfgParamand rename it to cfg_param. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_inte

[PATCH V2 22/41] staging: wilc1000: remove unused struct WILC_WFIDrvHandle

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes unused the struct WILC_WFIDrvHandle with related commnets. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers

[PATCH V2 29/41] staging: wilc1000: host_infterface.h: remove unused enum tenuWILC_StaFlag

2015-10-12 Thread Tony Cho
This patch removes unused enum tenuWILC_StaFlag from the host_interface.h. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 20 1 file changed, 20 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_int

[PATCH V2 27/41] staging: wilc1000: remove typedef from tenuConnDisconnEvent

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the enum tenuConnDisconnEvent and renames it to conn_event. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 2 files changed,

[PATCH V2 28/41] staging: wilc1000: remove typedef from tenuScanConnTimer

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the enum tenuScanConnTimer and renames it to scan_conn_timer. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/

[PATCH V2 23/41] staging: wilc1000: remove unused struct cfg_param_t

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes unused the struct cfg_param_t. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_inte

[PATCH V2 20/41] staging: wilc1000: remove typedef from tstrFoundNetworkInfo

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrFoundNetworkInfo and rename it to found_net_info. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging

[PATCH V2 15/41] staging: wilc1000: remove typedef from tstrJoinBssParam

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the struct tstrJoinBssParam and renames it to join_bss_param. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drive

[PATCH V2 30/41] staging: wilc1000: remove wilc_wlan.c included in wilc_wfi_cfgoperations.c

2015-10-12 Thread Tony Cho
This patch removes "wilc_wlan.c" from the wilc_wfi_cfgoperation.c file and adds wilc_wlan.o into Makefile to compile it because there is few benefits. This patch also adds "wilc_wfi_netdevice.h" in the wilc_wlan.c file to avoid the compile errors. Signed-off-by: Tony Cho --- drivers/staging/wilc

[PATCH V2 13/41] staging: wilc1000: remove unused struct tstrWidJoinReqExt

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes struct tstrWidJoinReqExt because it's not used. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/w

[PATCH V2 25/41] staging: wilc1000: remove typedef from tenuScanEvent

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes typedef from the enum tenuScanEvent and rename it to scan_event. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/host_interface.h | 15 +-- drivers/stagi

[PATCH V2 16/41] staging: wilc1000: remove _tstrJoinParam from join_bss_param

2015-10-12 Thread Tony Cho
From: Leo Kim This patch removes struct _tstrJoinParam from the struct join_bss_param because it is not used inside the struct. Signed-off-by: Leo Kim Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/wilc1

[PATCH V2 38/41] staging: wilc1000: rename u8WepKeylen of struct host_if_wep_attr

2015-10-12 Thread Tony Cho
This patch renames u8WepKeylen of struct host_if_wep_attr to key_len to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/hos

[PATCH V2 37/41] staging: wilc1000: rename pu8WepKey of struct host_if_wep_attr

2015-10-12 Thread Tony Cho
This patch renames pu8WepKey of struct host_if_wep_attr to key in order to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/host

[PATCH V2 39/41] staging: wilc1000: rename u8Wepidx of struct host_if_wep_attr

2015-10-12 Thread Tony Cho
This patch renames u8Wepidx of struct host_if_wep_attr to index to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/wilc1000/host_int

[PATCH V2 40/41] staging: wilc1000: rename u8mode of struct host_if_wep_attr

2015-10-12 Thread Tony Cho
This patch renames u8mode of struct host_if_wep_attr to mode to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/

[PATCH V2 33/41] staging: wilc1000: rename u32SetCfgFlag of struct cfg_param_val

2015-10-12 Thread Tony Cho
This patch renames u32SetCfgFlag of struct cfg_param_val to flag to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 36 +++ drivers/staging/wilc1000/host_interface.h | 2 +- drivers/staging/wilc1000/w

[PATCH V2 31/41] staging: wilc1000: replace drvHandler and hWFIDrv with hif_drv

2015-10-12 Thread Tony Cho
This patch replaces the variable names of struct host_if_drv used as the functions' input parameter, drvHandler and hWFIDrv with hif_drv. In addition, the local variable declared in many functions, pstrWFIDrv is removed and hif_drv is directly used. A debug message printing pstrWFIDrv is deleted wh

[PATCH V2 34/41] staging: wilc1000: rename strHostIFwepAttr of union host_if_key_attr

2015-10-12 Thread Tony Cho
This patch renames strHostIFwepAttr of union host_if_key_attr to wep to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 71 ++- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/drivers/staging/w

[PATCH V2 32/41] staging: wilc1000: rename pstrCfgParamVal in struct cfg_param_attr

2015-10-12 Thread Tony Cho
This patch renames a variable of struct cfg_param_val in struct cfg_param_attr, pstrCfgParamVal to cfg_attr_info to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 144 +++--- 1 file changed, 72 insertions(+), 72

[PATCH V2 41/41] staging: wilc1000: rename tenuAuth_type of struct host_if_wep_attr

2015-10-12 Thread Tony Cho
This patch renames tenuAuth_type of struct host_if_wep_attr to auth_type to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c

[PATCH V2 35/41] staging: wilc1000: rename strHostIFwpaAttr of union host_if_key_attr

2015-10-12 Thread Tony Cho
This patch renames strHostIFwpaAttr of union host_if_key_attr to wpa to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 95 ++- 1 file changed, 44 insertions(+), 51 deletions(-) diff --git a/drivers/staging/w

[PATCH V2 36/41] staging: wilc1000: rename strHostIFpmkidAttr of union host_if_key_attr

2015-10-12 Thread Tony Cho
This patch renames strHostIFpmkidAttr of union host_if_key_attr to pmkid to avoid CamelCase naming convention. Signed-off-by: Tony Cho --- drivers/staging/wilc1000/host_interface.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/wilc1000/hos

Re: [RESEND PATCH v2] staging/wlan-ng: Fix potential buffer overflow in firmware handling

2015-10-12 Thread Sudip Mukherjee
On Sat, Oct 10, 2015 at 09:56:16PM +0200, Tillmann Heidsieck wrote: > This patch fixes a potential buffer overflow detected by smatch. > > pda16 has length 512, while processing an element with index < 512 we > are checking for an end marker in the next element. This poses a > potential buffer ove

Re: [PATCH] staging: sm750fb: Fix the power state error in resume

2015-10-12 Thread Sudip Mukherjee
On Mon, Oct 12, 2015 at 09:48:27AM +0800, Binbin Zhou wrote: > The PM_EVENT_RESUME state is needed when SM750 resume, otherwise it > will be failed in the second time of continuous suspend/resume. > > Cc: Sudip Mukherjee > Signed-off-by: Binbin Zhou > Reviewed-by: Huacai Chen > Reviewed-by: Ted

Re: [RESEND PATCH v2] staging/wlan-ng: Fix potential buffer overflow in firmware handling

2015-10-12 Thread Tillmann Heidsieck
Oh sorry for the noise ... I officially suck and will try to better myself. I must have rediscovered a problem I already fixed :-( Again sorry for the noise Tillmann On Mon, Oct 12, 2015 at 04:32:17PM +0530, Sudip Mukherjee wrote: > On Sat, Oct 10, 2015 at 09:56:16PM +0200, Tillmann Heidsieck w

Re: [RESEND PATCH v2] staging/wlan-ng: Fix potential buffer overflow in firmware handling

2015-10-12 Thread Sudip Mukherjee
On Mon, Oct 12, 2015 at 01:35:54PM +0200, Tillmann Heidsieck wrote: > > I must have rediscovered a problem I already fixed :-( Which tree are you using? You should be using staging-testing branch of the staging tree. regards sudip ___ devel mailing lis

[PATCH 2/2] staging: octeon-ethernet: xaui: use common init

2015-10-12 Thread Aaro Koskinen
Use common init. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon/ethernet-xaui.c | 7 --- drivers/staging/octeon/ethernet.c| 2 +- drivers/staging/octeon/octeon-ethernet.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/octeon/ethernet-x

[PATCH 1/2] staging: octeon-ethernet: xaui: don't register poll function in init

2015-10-12 Thread Aaro Koskinen
Link status poll function is already controlled by open/stop functions, so we don't need to do it on init. This eliminates a redundant xaui link status notification when the module is loaded. Signed-off-by: Aaro Koskinen --- drivers/staging/octeon/ethernet-xaui.c | 4 1 file changed, 4 del

Re: [PATCH 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-12 Thread Joe Perches
On Sun, 2015-10-11 at 16:42 +0530, punit vara wrote: > following are the two structure need to be consider for alignment. > > struct iw_pmksa { > __u32 cmd; /* 0 4 */ > struct sockaddrbssid;/* 416 */ > __u8

Re: [PATCH v8 32/55] [media] media: use macros to check for V4L2 subdev entities

2015-10-12 Thread Sakari Ailus
Hi Mauro, On Sun, Oct 11, 2015 at 09:56:25PM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 12 Oct 2015 00:07:52 +0300 > Sakari Ailus escreveu: > > > Hi Mauro, > > > > On Sun, Aug 30, 2015 at 12:06:43AM -0300, Mauro Carvalho Chehab wrote: > > > Instead of relying on media subtype, use the new ma

[PATCH 1/1] media: Correctly determine whether an entity is a sub-device

2015-10-12 Thread Sakari Ailus
If the function of an entity is not one of the pre-defined ones, it is not correctly recognised as a V4L2 sub-device. Signed-off-by: Sakari Ailus --- include/media/media-entity.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/media/media-entity.h b/include/media/media-entity.h index

Re: [PATCH 1/1] media: Correctly determine whether an entity is a sub-device

2015-10-12 Thread Mauro Carvalho Chehab
Em Mon, 12 Oct 2015 18:38:23 +0300 Sakari Ailus escreveu: > If the function of an entity is not one of the pre-defined ones, it is not > correctly recognised as a V4L2 sub-device. > > Signed-off-by: Sakari Ailus > --- > include/media/media-entity.h | 1 + > 1 file changed, 1 insertion(+) > >

Re: [PATCH v8 32/55] [media] media: use macros to check for V4L2 subdev entities

2015-10-12 Thread Mauro Carvalho Chehab
Em Mon, 12 Oct 2015 18:35:05 +0300 Sakari Ailus escreveu: > Hi Mauro, > > On Sun, Oct 11, 2015 at 09:56:25PM -0300, Mauro Carvalho Chehab wrote: > > Em Mon, 12 Oct 2015 00:07:52 +0300 > > Sakari Ailus escreveu: > > > > > Hi Mauro, > > > > > > On Sun, Aug 30, 2015 at 12:06:43AM -0300, Mauro Ca

[PATCH 01/10] staging: comedi: remain busy until read end-of-file

2015-10-12 Thread Ian Abbott
If a COMEDI subdevice is busy handling an asynchronous command in the "read" direction, then after the command has terminated itself, the "read" file operation handler, `comedi_read()` should keep the subdevice busy until all available data has been read and it has returned 0 to indicate an "end-of

[PATCH 00/10] staging: comedi: some comedi_read() changes

2015-10-12 Thread Ian Abbott
Tidy up the "read" file operation handler, `comedi_read()` a bit and improve the error handling and the "end-of-file" handling. There are some other changes I want to make, such as switching to the newer wait API (prepare_to_wait()/finish_wait()) and preventing several tasks trying to read or writ

[PATCH 04/10] staging: comedi: make some variables unsigned in comedi_read()

2015-10-12 Thread Ian Abbott
In `comedi_read()`, the `n` and `m` variables are of type `int`. Change them to `unsigned int` as they are used to measure a positive number of bytes. The `count` variable is also of type `int` and holds the returned number of bytes. Change it to type `ssize_t` to match the function's return typ

[PATCH 06/10] staging: comedi: allow buffer wraparound in comedi_read()

2015-10-12 Thread Ian Abbott
`comedi_read()` copies data from the acquisition data buffer, which is cyclic, to the user buffer using a single call to `copy_to_user()`. It currently avoids having to deal with wraparound of the cyclic buffer by limiting the amount it copies (and the amount returned to the user). Change it to de

[PATCH 05/10] staging: comedi: avoid bad truncation of a size_t in comedi_read()

2015-10-12 Thread Ian Abbott
At one point in `comedi_read()`, the variable `n` gets assigned to the minimum of the parameter `nbytes` and the amount of readable buffer space `m`. The way that is done currently is unsafe in the unlikely case that `nbytes` exceeds `UINT_MAX`, so fix it. Signed-off-by: Ian Abbott --- drivers/

[PATCH 07/10] staging: comedi: remove superfluous retval = 0 in comedi_read()

2015-10-12 Thread Ian Abbott
`comedi_read()` initializes `retval` to 0. The other `retval = 0` assignments are superfluous, so remove them. Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedi_fops.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/

[PATCH 10/10] staging: comedi: check for more errors for zero-length read

2015-10-12 Thread Ian Abbott
If the "read" file operation handler, `comedi_read()` is passed 0 for the amount to read, some error conditions are currently skipped and the function just returns 0. Change it to check those error conditions and return an error value if appropriate. The trickiest case is the check for when the p

[PATCH 09/10] staging: comedi: simplify returned errors for comedi_read()

2015-10-12 Thread Ian Abbott
In order to perform a "read" file operation, an asynchronous COMEDI command in the "read" direction needs to have been set up by the current file object on the COMEDI "read" subdevice associated with the file object. If there is a "read" subdevice, but a command has not been set up by the file obj

[PATCH 08/10] staging: comedi: return error on "read" if no command set up

2015-10-12 Thread Ian Abbott
The "read" file operation handler, `comedi_read()` returns an error for pretty much any condition that prevents a "read" going ahead. One of the conditions that prevents a "read" going ahead is that no asynchronous command has been set up, but that currently results in a return value of 0 (unless

[PATCH 03/10] staging: comedi: do extra checks for becoming non-busy for "read"

2015-10-12 Thread Ian Abbott
`comedi_read()` is the handler for the "read" file operation for COMEDI devices. It mostly runs without using the main mutex of the COMEDI device, but uses the `attach_lock` rwsemaphore to protect against the COMEDI device becoming "detached". A file object can read data resulting from a COMEDI a

[PATCH 02/10] staging: comedi: don't consider "unmunged" data when becoming non-busy

2015-10-12 Thread Ian Abbott
If an asynchronous "read" command is no longer running but the subdevice is still busy, it becomes non-busy once there is no more data available in the buffer. Some or all of the data written to the buffer might not have been "munged" yet, and it cannot be read until it has been munged by the writ

[PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues

2015-10-12 Thread Ian Abbott
Fix some checkpatch issues in "comedidev.h". There are still some CamelCase warnings, but since those are for the use of "mA" and it represents "milliamps", I think I'll leave them alone. 1) staging: comedi: comedidev.h: add comments to spin-lock and mutex 2) staging: comedi: comedidev.h: spaces

[PATCH 2/2] staging: comedi: comedidev.h: spaces preferred around that '*'

2015-10-12 Thread Ian Abbott
Fix the checkpatch.pl issues: CHECK: spaces preferred around that '*' (ctx:VxV) Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedidev.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedide

[PATCH 1/2] staging: comedi: comedidev.h: add comments to spin-lock and mutex

2015-10-12 Thread Ian Abbott
Fix the checkpatch.pl issues: CHECK: spinlock_t definition without comment CHECK: struct mutes definition withoug comment Signed-off-by: Ian Abbott --- drivers/staging/comedi/comedidev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/comedi/comedidev.h

RE: [PATCH 00/10] staging: comedi: some comedi_read() changes

2015-10-12 Thread Hartley Sweeten
On Monday, October 12, 2015 9:21 AM, Ian Abbott wrote: > Tidy up the "read" file operation handler, `comedi_read()` a bit and > improve the error handling and the "end-of-file" handling. > > There are some other changes I want to make, such as switching to the > newer wait API (prepare_to_wait()/fi

RE: [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues

2015-10-12 Thread Hartley Sweeten
On Monday, October 12, 2015 10:03 AM, Ian Abbott wrote: > Fix some checkpatch issues in "comedidev.h". There are still some > CamelCase warnings, but since those are for the use of "mA" and it > represents "milliamps", I think I'll leave them alone. > > 1) staging: comedi: comedidev.h: add comment

Re: [PATCH 0/2] staging: comedi: comedidev.h: fix some checkpatch issues

2015-10-12 Thread Greg Kroah-Hartman
On Mon, Oct 12, 2015 at 05:22:29PM +, Hartley Sweeten wrote: > On Monday, October 12, 2015 10:03 AM, Ian Abbott wrote: > > Fix some checkpatch issues in "comedidev.h". There are still some > > CamelCase warnings, but since those are for the use of "mA" and it > > represents "milliamps", I thin

[PATCH v2 0/5] staging: comedi: adl_pci9111: fix checkpatch.pl issues

2015-10-12 Thread H Hartley Sweeten
Fix the checkpatch.pl issues in this driver. v2: split the ai range macro out of patch 1 as requested by Ian Abbott. H Hartley Sweeten (5): staging: comedi: adl_pci9111: prefer using the BIT macro staging: comedi: adl_pci9111: define a macro for the ai range bits staging: comedi: adl_pci911

[PATCH v2 1/5] staging: comedi: adl_pci9111: prefer using the BIT macro

2015-10-12 Thread H Hartley Sweeten
As suggested by checkpatch.pl, use the BIT macro to define the register bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git

[PATCH v2 3/5] staging: comedi: adl_pci9111: tidy up multi-line comments

2015-10-12 Thread H Hartley Sweeten
Reformat the multi-line comments in the kernel CodingStyle. Remove the unnecessary CHANGELOG information, git provided this better. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 104 --- 1 file

[PATCH v2 2/5] staging: comedi: adl_pci9111: define a macro for the ai range bits

2015-10-12 Thread H Hartley Sweeten
For aesthetics, define a macro to set the analog input range bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/dr

[PATCH v2 4/5] staging: comedi: adl_pci9111: rename CamelCase parameters

2015-10-12 Thread H Hartley Sweeten
Rename the CamelCase parameters of plx9050_interrupt_control(). Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adl_pci9111.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/comedi/dr

[PATCH v2 5/5] staging: comedi: adl_pci9111: fix alignment issue

2015-10-12 Thread H Hartley Sweeten
Use a local variable for the 'devpriv->ai_bounce_buffer' to shorten the lines in pci9111_handle_fifo_half_full() and gix the checkpath.pl issue about: CHECK: Alignment should match open parenthesis Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/come

[PATCH v2 0/6] staging: comedi: adv_pci1710: fix checkpatch.pl issues

2015-10-12 Thread H Hartley Sweeten
Fix the checkpaatch.pl issues in this driver. v2: reword the comments in patch 6 to clarify the 'ai_et_MuxVal'. H Hartley Sweeten (6): staging: comedi: adv_pci1710: tidy up multi-line comments staging: comedi: adv_pci1710: tidy up status register and bits staging: comedi: adv_pci1710: tidy

[PATCH v2 2/6] staging: comedi: adv_pci1710: tidy up status register and bits

2015-10-12 Thread H Hartley Sweeten
Rename the CamelCase and use the BIT macro to define the bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 32 +--- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/stag

[PATCH v2 1/6] staging: comedi: adv_pci1710: tidy up multi-line comments

2015-10-12 Thread H Hartley Sweeten
Reformat the multi-line comments in the kernel CodingStyle. And refactor them to follow the normal format for comedi drivers. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 53 ++-- 1 file change

[PATCH v2 5/6] staging: comedi: adv_pci1710: tidy up PCI1720_* register defines

2015-10-12 Thread H Hartley Sweeten
The PCI-1720 board is supported by this driver but uses a different register map. For aesthetics, rename the defines to match the PCI171X_* format. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 41 ++---

[PATCH v2 4/6] staging: comedi: adv_pci1710: tidy up remaining PCI171x_* registers

2015-10-12 Thread H Hartley Sweeten
Rename these CamelCase defines. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 93 ++-- 1 file changed, 47 insertions(+), 46 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1710.

[PATCH v2 6/6] staging: comedi: adv_pci1710: rename private data member 'ai_et_MuxVal'

2015-10-12 Thread H Hartley Sweeten
Rename thie CamelCase member of the private data. Add a comment in the interrupt handler to clarify why the channel interval is updated again. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 9 + 1 file changed,

[PATCH v2 3/6] staging: comedi: adv_pci1710: tidy up control register and bits

2015-10-12 Thread H Hartley Sweeten
Rename the CamelCase and use the BIT macro to define the bits. Also, rename the associated CamelCase members of the private data. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/adv_pci1710.c | 78 ++-- 1 file ch

[PATCH v2 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-12 Thread Punit Vara
This patch is to the rtl871x_ioctl_linux.c file that fixes up following warning reported by checkpatch.pl : -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() bssid and pnetwork->network.MacAddress both are 6 byte array which aligned with u16 Signed-off-by: Punit Vara ---

Re: [RFC][PATCH 1/2] WIP: Devicetree bindings for Ion

2015-10-12 Thread Mitchel Humpherys
On Tue, Oct 06 2015 at 05:35:41 PM, Rob Herring wrote: > On Tue, Oct 6, 2015 at 3:47 PM, Laura Abbott > wrote: [...] >> +Example: >> + >> + ion { >> + compatbile = "linux,ion"; >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> +

Re: [PATCH v2 2/4] Staging: rtl8712: Use ether_addr_equal() over memcmp()

2015-10-12 Thread punit vara
On Tue, Oct 13, 2015 at 12:16 AM, Punit Vara wrote: > This patch is to the rtl871x_ioctl_linux.c file that fixes up following > warning reported by checkpatch.pl : > > -Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp() > > bssid and pnetwork->network.MacAddress both are 6 byt

[PATCH 8/9] staging: unisys: vmcallinterface.h: Cleanup unused fields

2015-10-12 Thread Benjamin Romer
From: David Kershner With the simplified driver models we have more vmcalls that aren't supported by linux guests. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/vmcallinterface.h | 46 --- 1 file changed, 46 deletions(-) d

[PATCH 7/9] staging: unisys: diagchannel.h: get rid of unused fields

2015-10-12 Thread Benjamin Romer
From: David Kershner Some more churn of the drivers have made more fields unused, get rid of them. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/diagchannel.h | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/unisys/includ

[PATCH 4/9] staging: unisys: visorchannel.c remove unneeded parenthesis

2015-10-12 Thread Benjamin Romer
From: David Kershner Fix the checkpatch.pl -strict check: CHECK: Unnecessary parentheses around sig_hdr.num_overflows + &(sig_hdr.num_overflows), Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/visorchannel.c |

[PATCH 6/9] staging: unisys: periodic_work.h Fix spacing

2015-10-12 Thread Benjamin Romer
From: David Kershner Cleanup the multiple blank lines check in periodic_work.h. Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/periodic_work.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/unisys/include/periodic_work.h b/d

[PATCH 9/9] staging: unisys: vmcallinterface.h: convert pragma to __packed

2015-10-12 Thread Benjamin Romer
From: David Kershner Convert from pragma to __packed Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/visorbus/vmcallinterface.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorbus/vmcallinterface.h b/dr

[PATCH 04/10] staging: comedi: aio_aio12_8: hookup 8254 counter/timer

2015-10-12 Thread H Hartley Sweeten
This board has an industry-standard 8254 chip with the gate, clock, and output pins for each counter available on the connector. Hookup the 8254 counter as a comedi subdevice. Provice an (*insn_config) for the user to query the clock source for each channel. Signed-off-by: H Hartley Sweeten Cc:

[PATCH 00/10] staging: comedi: aio_aio12_8: cleanup driver

2015-10-12 Thread H Hartley Sweeten
Fix the checkpatch.pl issues in this driver and tidy it up a bit. H Hartley Sweeten (10): staging: comedi: aio_aio12_8: prefer using the BIT macro staging: comedi: aio_aio12_8: tidy up multi-line comments staging: comedi: aio_aio12_8: update MODULE_DESCRIPTION staging: comedi: aio_aio12_8:

[PATCH 01/10] staging: comedi: aio_aio12_8: prefer using the BIT macro

2015-10-12 Thread H Hartley Sweeten
As suggested by checkpatch.pl, use the BIT macro to define the register bits. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_aio12_8.c | 40 +++- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git

[PATCH 03/10] staging: comedi: aio_aio12_8: update MODULE_DESCRIPTION

2015-10-12 Thread H Hartley Sweeten
Change the MODULE_DESCRIPTION to something more useful than the generic "Comedi low-level driver". Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_aio12_8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 3/9] staging: unisys: visorchannel.c fix spacing around cast

2015-10-12 Thread Benjamin Romer
From: David Kershner Clean up the following checkpatch.pl --strict checks: CHECK: No space is necessary after a cast + buf = (u8 *) __get_free_page(GFP_KERNEL); CHECK: No space is necessary after a cast + free_page((unsigned long) buf); CHECK: spaces preferred around that '+' (ctx:

[PATCH 0/9] staging: unisys: visorbus cleanup series

2015-10-12 Thread Benjamin Romer
This patch series fixes incorrect pragma statements, cleans up some formatting problems, and removes disused fields from header files. David Kershner (9): staging: unisys: channel.h covert from pragma to __packed staging: unisys: channel.h Fix spacing around operands. staging: unisys: visorc

[PATCH 2/9] staging: unisys: channel.h Fix spacing around operands.

2015-10-12 Thread Benjamin Romer
From: David Kershner Clean up the seven checks reported by checkpatch.pl --strict. CHECK: spaces preferred around that '<<' (ctx:VxV) +#define SIGNATURE_16(A, B) ((A) | (B<<8)) ^ CHECK: spaces preferred around that '+' (ctx:VxV) +#define COVERQ(v, d) (((v)+(d)

[PATCH 06/10] staging: comedi: aio_aio12_8: analog outputs are single-ended

2015-10-12 Thread H Hartley Sweeten
The analog outputs are all single-ended. Remove the SDF_DIFF subdev_flag from the subdevice initialization. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/aio_aio12_8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 08/10] staging: comedi: aio_aio12_8: refactor boardininfo

2015-10-12 Thread H Hartley Sweeten
This driver supports three board types with these differences: 104-AIO12-8 - eight 12-bit analog in, four 12-bit analog out 104-AI12-8 - eight 12-bit analog in 104-AO12-4 - four 12-bit analog out Convert the boardinfo 'ai_nchan' and 'ao_nchan' into bit-field flags 'has_ai' and 'has_ao' so

[PATCH 5/9] staging: unisys: periodic_work.h Fix parenthesis alignment

2015-10-12 Thread Benjamin Romer
From: David Kershner Cleanup the checkpatch.pl check alignment should match open parenthesis, in visor_periodic_work_create(). Signed-off-by: David Kershner Signed-off-by: Benjamin Romer --- drivers/staging/unisys/include/periodic_work.h | 11 ++- 1 file changed, 6 insertions(+), 5 de

  1   2   >