]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agostaging: dgnc: remove parenthesis
Sudip Mukherjee [Sun, 4 Oct 2015 14:20:15 +0000 (19:50 +0530)]
staging: dgnc: remove parenthesis

checkpatch was warning us about extra unneeded parenthesis.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: alignment style
Sudip Mukherjee [Sun, 4 Oct 2015 14:20:14 +0000 (19:50 +0530)]
staging: dgnc: alignment style

checkpatch was warning us that the alignment should match the open
parenthesis.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove space after cast
Sudip Mukherjee [Sun, 4 Oct 2015 14:20:13 +0000 (19:50 +0530)]
staging: dgnc: remove space after cast

Space is not necessary after typecast.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove blankline after brace
Sudip Mukherjee [Sun, 4 Oct 2015 14:20:12 +0000 (19:50 +0530)]
staging: dgnc: remove blankline after brace

Blank lines are not needed after opening braces. checkpatch was giving
us warnings about this.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove blankline before brace
Sudip Mukherjee [Sun, 4 Oct 2015 14:20:11 +0000 (19:50 +0530)]
staging: dgnc: remove blankline before brace

Blank lines are not needed before closing braces. checkpatch was giving
warning about this.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: dgnc: remove multiple blank lines
Sudip Mukherjee [Sun, 4 Oct 2015 14:20:10 +0000 (19:50 +0530)]
staging: dgnc: remove multiple blank lines

checkpatch warns us about multiple blank lines which are not needed.
Remove them.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: move open brace in line with control flow statement
Alison Schofield [Mon, 12 Oct 2015 20:22:44 +0000 (13:22 -0700)]
staging: wilc1000: move open brace in line with control flow statement

Move open braces to be in line with "if" control flow statements.
Addresses checkpatch.pl:
ERROR: that open brace { should be on the previous line

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: linux_wlan: Remove NULL check before kfree
Shraddha Barke [Mon, 12 Oct 2015 15:19:20 +0000 (20:49 +0530)]
Staging: wilc1000: linux_wlan: Remove NULL check before kfree

kfree on NULL pointer is a no-op.

The semantic patch used -

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: wilc_wfi_cfgoperations: Remove NULL check before kfree
Shraddha Barke [Mon, 12 Oct 2015 15:19:19 +0000 (20:49 +0530)]
Staging: wilc1000: wilc_wfi_cfgoperations: Remove NULL check before kfree

kfree on NULL pointer is a no-op.

The semantic patch used-

// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>smpl>

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: wilc_msgqueue: Use kmemdup instead of kmalloc and memcpy
Shraddha Barke [Sun, 11 Oct 2015 16:31:37 +0000 (22:01 +0530)]
Staging: wilc1000: wilc_msgqueue: Use kmemdup instead of kmalloc and memcpy

Replace kmalloc and memcpy with kmemdup.
Problem found using coccicheck

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove braces around single statement blocks
Alison Schofield [Fri, 9 Oct 2015 04:18:03 +0000 (21:18 -0700)]
staging: wilc1000: remove braces around single statement blocks

Remove excess braces as suggested by checkpatch.pl:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_wlan_spi: include header
Stanislav Kholmanskikh [Thu, 8 Oct 2015 18:23:14 +0000 (21:23 +0300)]
staging: wilc1000: linux_wlan_spi: include header

A check using 'sparse' shows warnings in linux_wlan_spi.c:

drivers/staging/wilc1000/linux_wlan_spi.c:43:19: warning: symbol 'wilc_spi_dev' was not declared. Should it be static?
drivers/staging/wilc1000/linux_wlan_spi.c:71:19: warning: symbol 'wilc_bus' was not declared. Should it be static?
drivers/staging/wilc1000/linux_wlan_spi.c:95:5: warning: symbol 'linux_spi_init' was not declared. Should it be static?
drivers/staging/wilc1000/linux_wlan_spi.c:195:5: warning: symbol 'linux_spi_write' was not declared. Should it be static?
drivers/staging/wilc1000/linux_wlan_spi.c:320:5: warning: symbol 'linux_spi_read' was not declared. Should it be static?
drivers/staging/wilc1000/linux_wlan_spi.c:365:5: warning: symbol 'linux_spi_write_read' was not declared. Should it be static?
drivers/staging/wilc1000/linux_wlan_spi.c:402:5: warning: symbol 'linux_spi_set_max_speed' was not declared. Should it be static?

Let's avoid it by including "linux_wlan_spi.h" header.

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: linux_wlan_spi: correct types
Stanislav Kholmanskikh [Thu, 8 Oct 2015 18:23:13 +0000 (21:23 +0300)]
staging: wilc1000: linux_wlan_spi: correct types

linux_spi_write(), linux_spi_read(), linux_spi_write_read():

    nwi->io_func.u.spi.spi_tx = linux_spi_write;
    nwi->io_func.u.spi.spi_rx = linux_spi_read;
    nwi->io_func.u.spi.spi_trx = linux_spi_write_read;

are expected to accept arguments of 'u8 *', u32 types:

    struct {
        int (*spi_max_speed)(void);
        int (*spi_tx)(u8 *, u32);
        int (*spi_rx)(u8 *, u32);
        int (*spi_trx)(u8 *, u8 *, u32);
    } spi;

However, linux_spi_read() and linux_spi_write_read() do not do this,
they use 'unsigned char *' and 'unsigned long' instead.

Changed the types of their arguments to satisfy the expectations.

Signed-off-by: Stanislav Kholmanskikh <kholmanskikh.s.s@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename tenuAuth_type of struct host_if_wep_attr
Tony Cho [Mon, 12 Oct 2015 07:56:15 +0000 (16:56 +0900)]
staging: wilc1000: rename tenuAuth_type of struct host_if_wep_attr

This patch renames tenuAuth_type of struct host_if_wep_attr to auth_type
to avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8mode of struct host_if_wep_attr
Tony Cho [Mon, 12 Oct 2015 07:56:14 +0000 (16:56 +0900)]
staging: wilc1000: rename u8mode of struct host_if_wep_attr

This patch renames u8mode of struct host_if_wep_attr to mode to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8Wepidx of struct host_if_wep_attr
Tony Cho [Mon, 12 Oct 2015 07:56:13 +0000 (16:56 +0900)]
staging: wilc1000: rename u8Wepidx of struct host_if_wep_attr

This patch renames u8Wepidx of struct host_if_wep_attr to index to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u8WepKeylen of struct host_if_wep_attr
Tony Cho [Mon, 12 Oct 2015 07:56:12 +0000 (16:56 +0900)]
staging: wilc1000: rename u8WepKeylen of struct host_if_wep_attr

This patch renames u8WepKeylen of struct host_if_wep_attr to key_len to
avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8WepKey of struct host_if_wep_attr
Tony Cho [Mon, 12 Oct 2015 07:56:11 +0000 (16:56 +0900)]
staging: wilc1000: rename pu8WepKey of struct host_if_wep_attr

This patch renames pu8WepKey of struct host_if_wep_attr to key in order
to avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename strHostIFpmkidAttr of union host_if_key_attr
Tony Cho [Mon, 12 Oct 2015 07:56:10 +0000 (16:56 +0900)]
staging: wilc1000: rename strHostIFpmkidAttr of union host_if_key_attr

This patch renames strHostIFpmkidAttr of union host_if_key_attr to
pmkid to avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename strHostIFwpaAttr of union host_if_key_attr
Tony Cho [Mon, 12 Oct 2015 07:56:09 +0000 (16:56 +0900)]
staging: wilc1000: rename strHostIFwpaAttr of union host_if_key_attr

This patch renames strHostIFwpaAttr of union host_if_key_attr to wpa to
avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename strHostIFwepAttr of union host_if_key_attr
Tony Cho [Mon, 12 Oct 2015 07:56:08 +0000 (16:56 +0900)]
staging: wilc1000: rename strHostIFwepAttr of union host_if_key_attr

This patch renames strHostIFwepAttr of union host_if_key_attr to wep to
avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32SetCfgFlag of struct cfg_param_val
Tony Cho [Mon, 12 Oct 2015 07:56:07 +0000 (16:56 +0900)]
staging: wilc1000: rename u32SetCfgFlag of struct cfg_param_val

This patch renames u32SetCfgFlag of struct cfg_param_val to flag to
avoid CamelCase naming convention.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrCfgParamVal in struct cfg_param_attr
Tony Cho [Mon, 12 Oct 2015 07:56:06 +0000 (16:56 +0900)]
staging: wilc1000: rename pstrCfgParamVal in struct cfg_param_attr

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 <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: replace drvHandler and hWFIDrv with hif_drv
Tony Cho [Mon, 12 Oct 2015 07:56:05 +0000 (16:56 +0900)]
staging: wilc1000: replace drvHandler and hWFIDrv with hif_drv

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 while removing the local variable because it is not useful as well.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove wilc_wlan.c included in wilc_wfi_cfgoperations.c
Tony Cho [Mon, 12 Oct 2015 07:56:04 +0000 (16:56 +0900)]
staging: wilc1000: remove wilc_wlan.c included in wilc_wfi_cfgoperations.c

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 <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: host_infterface.h: remove unused enum tenuWILC_StaFlag
Tony Cho [Mon, 12 Oct 2015 07:56:03 +0000 (16:56 +0900)]
staging: wilc1000: host_infterface.h: remove unused enum tenuWILC_StaFlag

This patch removes unused enum tenuWILC_StaFlag from the
host_interface.h.

Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tenuScanConnTimer
Leo Kim [Mon, 12 Oct 2015 07:56:02 +0000 (16:56 +0900)]
staging: wilc1000: remove typedef from tenuScanConnTimer

This patch removes typedef from the enum tenuScanConnTimer and
renames it to scan_conn_timer.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tenuConnDisconnEvent
Leo Kim [Mon, 12 Oct 2015 07:56:01 +0000 (16:56 +0900)]
staging: wilc1000: remove typedef from tenuConnDisconnEvent

This patch removes typedef from the enum tenuConnDisconnEvent and
renames it to conn_event.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename typedef from tenuCfgParam
Leo Kim [Mon, 12 Oct 2015 07:56:00 +0000 (16:56 +0900)]
staging: wilc1000: rename typedef from tenuCfgParam

This patch rename typedef from the enum tenuCfgParamand
rename it to cfg_param.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tenuScanEvent
Leo Kim [Mon, 12 Oct 2015 07:55:59 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tenuScanEvent

This patch removes typedef from the enum tenuScanEvent and
rename it to scan_event.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrStatistics
Leo Kim [Mon, 12 Oct 2015 07:55:58 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrStatistics

This patch removes typedef from the struct tstrStatistics and
rename it to rf_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused struct cfg_param_t
Leo Kim [Mon, 12 Oct 2015 07:55:57 +0000 (16:55 +0900)]
staging: wilc1000: remove unused struct cfg_param_t

This patch removes unused the struct cfg_param_t.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused struct WILC_WFIDrvHandle
Leo Kim [Mon, 12 Oct 2015 07:55:56 +0000 (16:55 +0900)]
staging: wilc1000: remove unused struct WILC_WFIDrvHandle

This patch removes unused the struct WILC_WFIDrvHandle with related
commnets.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrHiddenNetworkInfo
Leo Kim [Mon, 12 Oct 2015 07:55:55 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrHiddenNetworkInfo

This patch removes typedef from the struct tstrHiddenNetworkInfo with
related comments and renames it to hidden_net_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrFoundNetworkInfo
Leo Kim [Mon, 12 Oct 2015 07:55:54 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrFoundNetworkInfo

This patch removes typedef from the struct tstrFoundNetworkInfo and
rename it to found_net_info.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tenuHostIFstate
Leo Kim [Mon, 12 Oct 2015 07:55:53 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tenuHostIFstate

This patch removes typedef from the enum tenuHostIFstate and
rename it to host_if_state.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrWILC_UsrConnReq
Leo Kim [Mon, 12 Oct 2015 07:55:52 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrWILC_UsrConnReq

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 <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrWILC_UsrScanReq
Leo Kim [Mon, 12 Oct 2015 07:55:51 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrWILC_UsrScanReq

This patch removes typedef from the struct tstrWILC_UsrScanReq with
related comments and renames it to user_scan_req.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove _tstrJoinParam from join_bss_param
Leo Kim [Mon, 12 Oct 2015 07:55:50 +0000 (16:55 +0900)]
staging: wilc1000: remove _tstrJoinParam from join_bss_param

This patch removes struct _tstrJoinParam from the struct join_bss_param
because it is not used inside the struct.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrJoinBssParam
Leo Kim [Mon, 12 Oct 2015 07:55:49 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrJoinBssParam

This patch removes typedef from the struct tstrJoinBssParam
and renames it to join_bss_param.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused struct tstrBssTable
Leo Kim [Mon, 12 Oct 2015 07:55:48 +0000 (16:55 +0900)]
staging: wilc1000: remove unused struct tstrBssTable

This patch removes struct tstrBssTable with related comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused struct tstrWidJoinReqExt
Leo Kim [Mon, 12 Oct 2015 07:55:47 +0000 (16:55 +0900)]
staging: wilc1000: remove unused struct tstrWidJoinReqExt

This patch removes struct tstrWidJoinReqExt because it's not used.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename the member variable, ps8WidVal of wid
Leo Kim [Mon, 12 Oct 2015 07:55:46 +0000 (16:55 +0900)]
staging: wilc1000: rename the member variable, ps8WidVal of wid

This patch renames ps8WidVal of struct wid to val.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename the member variable, s32ValueSize of wid
Leo Kim [Mon, 12 Oct 2015 07:55:45 +0000 (16:55 +0900)]
staging: wilc1000: rename the member variable, s32ValueSize of wid

This patch renames s32ValueSize of struct wid to size.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename the member variable, u16WIDid of wid
Leo Kim [Mon, 12 Oct 2015 07:55:44 +0000 (16:55 +0900)]
staging: wilc1000: rename the member variable, u16WIDid of wid

This patch renames u16WIDid of struct wid to id.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename the member variable, enuWIDtype of wid
Leo Kim [Mon, 12 Oct 2015 07:55:43 +0000 (16:55 +0900)]
staging: wilc1000: rename the member variable, enuWIDtype of wid

This patch renames enuWIDtype of struct wid to type.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tenuWIDtype
Leo Kim [Mon, 12 Oct 2015 07:55:42 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tenuWIDtype

This patch remove typedef from the enum tenuWIDtype
and rename it to WID_TYPE.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrWID
Leo Kim [Mon, 12 Oct 2015 07:55:41 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrWID

This patch removes typedef from the struct tstrWID and
rename it to wid.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change parameter names in send_config_pkt
Tony Cho [Mon, 12 Oct 2015 07:55:40 +0000 (16:55 +0900)]
staging: wilc1000: change parameter names in send_config_pkt

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 <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove bool bRespRequired from send_config_pkt
Tony Cho [Mon, 12 Oct 2015 07:55:39 +0000 (16:55 +0900)]
staging: wilc1000: remove bool bRespRequired from send_config_pkt

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 <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: wilc_wfi_cfgoperations.c : removes unused local variables
Leo Kim [Mon, 12 Oct 2015 07:55:38 +0000 (16:55 +0900)]
staging: wilc1000: wilc_wfi_cfgoperations.c : removes unused local variables

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 <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: host_interface.c : removes unused local variables
Leo Kim [Mon, 12 Oct 2015 07:55:37 +0000 (16:55 +0900)]
staging: wilc1000: host_interface.c : removes unused local variables

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 <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename the member variable, drvHandler of host_if_msg
Leo Kim [Mon, 12 Oct 2015 07:55:36 +0000 (16:55 +0900)]
staging: wilc1000: rename the member variable, drvHandler of host_if_msg

This patch renames drvHandler of struct host_if_msg to drv.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove typedef from tstrWILC_WFIDrv
Leo Kim [Mon, 12 Oct 2015 07:55:35 +0000 (16:55 +0900)]
staging: wilc1000: remove typedef from tstrWILC_WFIDrv

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 <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: gdmwm: move variables to right side of comparison test
Alison Schofield [Mon, 12 Oct 2015 20:53:22 +0000 (13:53 -0700)]
staging: gdmwm: move variables to right side of comparison test

Move variables to right side of comparison test to improve readability.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6655: mac: Remove extra braces
Shivani Bhardwaj [Mon, 12 Oct 2015 17:44:15 +0000 (23:14 +0530)]
Staging: vt6655: mac: Remove extra braces

Remove braces from an if block as it comprises of a single statement.
Fix checkpatch warning: braces {} are not necessary for single statement
blocks

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6655: rxtx: Remove extra parentheses
Shivani Bhardwaj [Sun, 11 Oct 2015 19:19:34 +0000 (00:49 +0530)]
Staging: vt6655: rxtx: Remove extra parentheses

Remove unnecessary parentheses around if test expressions.
Fixes checkpatch warning : unnecessary parentheses

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6655: rxtx: Remove extra space character
Shivani Bhardwaj [Sun, 11 Oct 2015 19:19:08 +0000 (00:49 +0530)]
Staging: vt6655: rxtx: Remove extra space character

Remove unnecessary space character after the variable RATE_16M
preserving the alignment of all other variables and comments.
Fixes the warning by checkpatch:  space prohibited before
that ',' (ctx:WxW)

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: vt6655: Renamed uRATE to rate
Paul McQuade [Sun, 11 Oct 2015 15:22:10 +0000 (16:22 +0100)]
Staging: vt6655: Renamed uRATE to rate

Renamed uRATE to rate to avoid camelcase

Signed-off-by: Paul McQuade <paulmcquad@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192e: Use kcalloc instead of kzalloc to allocate array
Shraddha Barke [Fri, 9 Oct 2015 15:33:29 +0000 (21:03 +0530)]
Staging: rtl8192e: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon-ethernet: xaui: use common init
Aaro Koskinen [Mon, 12 Oct 2015 13:12:34 +0000 (16:12 +0300)]
staging: octeon-ethernet: xaui: use common init

Use common init.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon-ethernet: xaui: don't register poll function in init
Aaro Koskinen [Mon, 12 Oct 2015 13:12:33 +0000 (16:12 +0300)]
staging: octeon-ethernet: xaui: don't register poll function in init

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 <aaro.koskinen@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: Fix kernel-doc function description
Cristina Moraru [Fri, 9 Oct 2015 19:17:58 +0000 (22:17 +0300)]
staging: octeon: Fix kernel-doc function description

Fix kernel-doc 'Excess function parameter' by moving
the description to the correct location. Also corrected
parameter description

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: Remove /** from regular comments
Cristina Moraru [Fri, 9 Oct 2015 19:17:57 +0000 (22:17 +0300)]
staging: octeon: Remove /** from regular comments

Fix kernel-doc warnings 'cannot understand function prototype'
by removing /** from regular comments

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: octeon: Remove extra line from kernel-doc
Cristina Moraru [Fri, 9 Oct 2015 19:17:56 +0000 (22:17 +0300)]
staging: octeon: Remove extra line from kernel-doc

Fix 'bad line' kernel-doc warning

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: vmcallinterface.h: Cleanup unused fields
David Kershner [Mon, 12 Oct 2015 19:19:46 +0000 (15:19 -0400)]
staging: unisys: vmcallinterface.h: Cleanup unused fields

With the simplified driver models we have more vmcalls that aren't
supported by linux guests.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: diagchannel.h: get rid of unused fields
David Kershner [Mon, 12 Oct 2015 19:19:45 +0000 (15:19 -0400)]
staging: unisys: diagchannel.h: get rid of unused fields

Some more churn of the drivers have made more fields unused, get
rid of them.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: periodic_work.h Fix spacing
David Kershner [Mon, 12 Oct 2015 19:19:44 +0000 (15:19 -0400)]
staging: unisys: periodic_work.h Fix spacing

Cleanup the multiple blank lines check in periodic_work.h.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: periodic_work.h Fix parenthesis alignment
David Kershner [Mon, 12 Oct 2015 19:19:43 +0000 (15:19 -0400)]
staging: unisys: periodic_work.h Fix parenthesis alignment

Cleanup the checkpatch.pl check alignment should match open parenthesis, in
visor_periodic_work_create().

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorchannel.c remove unneeded parenthesis
David Kershner [Mon, 12 Oct 2015 19:19:42 +0000 (15:19 -0400)]
staging: unisys: visorchannel.c remove unneeded parenthesis

Fix the checkpatch.pl -strict check:

CHECK: Unnecessary parentheses around sig_hdr.num_overflows
+                                  &(sig_hdr.num_overflows),

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorchannel.c fix spacing around cast
David Kershner [Mon, 12 Oct 2015 19:19:41 +0000 (15:19 -0400)]
staging: unisys: visorchannel.c fix spacing around cast

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:VxE)
+                           SIG_QUEUE_OFFSET(&channel->chan_hdr, queue)+
\
                                                                       ^

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: channel.h Fix spacing around operands.
David Kershner [Mon, 12 Oct 2015 19:19:40 +0000 (15:19 -0400)]
staging: unisys: channel.h Fix spacing around operands.

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)-1) / (d))
                            ^
CHECK: spaces preferred around that '-' (ctx:VxV)
+#define COVERQ(v, d)  (((v)+(d)-1) / (d))
                                ^
CHECK: spaces preferred around that '*' (ctx:VxV)
+#define COVER(v, d)   ((d)*COVERQ(v, d))
                           ^
CHECK: spaces preferred around that '-' (ctx:VxE)
+               chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD)-  \
                                                                     ^
CHECK: spaces preferred around that '/' (ctx:VxV)
+                       sizeof(chan->QDATAFLD)/sizeof(QDATATYPE);       \
                                              ^
CHECK: spaces preferred around that '-' (ctx:VxV)
+               chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots-1;  \

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: channel.h covert from pragma to __packed
David Kershner [Mon, 12 Oct 2015 19:19:39 +0000 (15:19 -0400)]
staging: unisys: channel.h covert from pragma to __packed

Need to convert from #pragma to __packed for channel structures.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic: prevent faults if driver re-loaded during stress
Tim Sell [Mon, 12 Oct 2015 19:28:57 +0000 (15:28 -0400)]
staging: unisys: visornic: prevent faults if driver re-loaded during stress

Prevent faults that would occur during this sequence of activity during
network stress:

    rmmod visornic
    modprobe visornic
    /etc/init.d/network restart

The problem fixed was that the back-end IO partition was holding onto
stale receive buffers after the "rmmod visornic", and erroneously
completing them after a subsequent "modprobe visornic".  This is fixed
in this patch as follows:

* Tell the back-end IO partition that we want it to employ its
  "incarnation mechanism" to ensure it does not complete stale receive
  buffers after the guest virtual device environment changes (e.g., by
  re-loading the driver), by setting the
  ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING feature bit, and
  supplying a unique incarnation number in rcvpost.unique_num for each
  receive buffer posted.

* When visornic loads, make sure we drain and ignore any possible-stale
  data in the channel before beginning network operation.

Prior to this patch, faults like this would occur almost every time if
you attempted to rmmod + modprobe the visornic driver and restart the
network service during heavy network activity:

    BUG: spinlock bad magic on CPU#0, ksoftirqd/0/3
     lock: 0xffff88002d8a56d8, .magic: ffff8800, .owner: <none>/-1,
                               .owner_cpu: 2304
    CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G         C
           4.3.0-rc3-ARCH+ #74

Signed-off-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: unisys: Use kcalloc instead of kzalloc to allocate array
Shraddha Barke [Fri, 9 Oct 2015 15:33:28 +0000 (21:03 +0530)]
Staging: unisys: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: spaces preferred around that + inserted
Ivan Safonov [Sat, 10 Oct 2015 12:23:50 +0000 (19:23 +0700)]
staging: rtl8188eu: spaces preferred around that + inserted

This patch inserts spaces preferred around that '+' found by checkpatch.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: ARRAY_SIZE instead of sizeof/sizeof used
Ivan Safonov [Sat, 10 Oct 2015 12:21:54 +0000 (19:21 +0700)]
staging: rtl8188eu: ARRAY_SIZE instead of sizeof/sizeof used

This patch inserts ARRAY_SIZE instead of sizeof(type array[])/sizeof(type),
made arraylen variable constant
and removes unnecessary default value in variable definition.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: core: Use ARRAY_SIZE macro
Shraddha Barke [Thu, 8 Oct 2015 19:25:19 +0000 (00:55 +0530)]
Staging: rtl8188eu: core: Use ARRAY_SIZE macro

ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its type.

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8188eu: unused macro read_next_pair removed
Ivan Safonov [Thu, 8 Oct 2015 06:40:11 +0000 (13:40 +0700)]
staging: rtl8188eu: unused macro read_next_pair removed

Unused macro read_next_pair removed from rtl8188eu driver.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8188eu: Correct coding style errors
Iban Rodriguez [Mon, 5 Oct 2015 19:18:09 +0000 (21:18 +0200)]
Staging: rtl8188eu: Correct coding style errors

Correct errors reported by checkpatch.pl because space prohibited
before ','.
Also split one line into two as it was longer than
80 characters

Signed-off-by: Iban Rodriguez <iban.rodriguez@ono.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: fix negative level value
Luis de Bethencourt [Sun, 11 Oct 2015 13:16:57 +0000 (14:16 +0100)]
staging: rtl8712: fix negative level value

range->avg_qual.level is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 78, which is the equivalent
to (20 + -98) dBm when IW_QUAL_DBM is set.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: usleep_range is preferred over udelay
Amitoj Kaur Chawla [Sat, 10 Oct 2015 12:24:09 +0000 (17:54 +0530)]
staging: rtl8712: usleep_range is preferred over udelay

Fix checkpatch.pl issue: "CHECK: usleep_range is preferred over
udelay;
see Documentation/timers/timers-howto.txt".
Replace `udelay()` with a call to `usleep_range()` with a reasonable
upper limit determined by the other sleeping functions present.

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8712: Replace GFP_ATOMIC with GFP_KERNEL
Amitoj Kaur Chawla [Sat, 10 Oct 2015 09:01:11 +0000 (14:31 +0530)]
staging: rtl8712: Replace GFP_ATOMIC with GFP_KERNEL

Replace GFP_ATOMIC with GFP_KERNEL since GFP_ATOMIC is used in
atomic context and only needed when functions are not allowed to sleep
whereas the function is later calling msleep().

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8712: Use ARRAY_SIZE macro
Shraddha Barke [Thu, 8 Oct 2015 19:25:18 +0000 (00:55 +0530)]
Staging: rtl8712: Use ARRAY_SIZE macro

ARRAY_SIZE is more concise to use when the size of an array is divided
by the size of its type

Changes made using Coccinelle-

@@
type T;
T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: r8192U_wx: fix negative noise and level values
Luis de Bethencourt [Sun, 11 Oct 2015 13:42:01 +0000 (14:42 +0100)]
staging: rtl8192u: r8192U_wx: fix negative noise and level values

range->max_qual.noise and level are of type uint8, so they shouldn't be
assigned a negative number. Assigning them 0x100 - 98, and 0x100 - 78 which
are the equivalent to -98 dBm and -78 dBm, respectively, when IW_QUAL_DBM
is set.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rtl8192u: r8192U_core: fix negative noise value
Luis de Bethencourt [Sun, 11 Oct 2015 13:31:07 +0000 (14:31 +0100)]
staging: rtl8192u: r8192U_core: fix negative noise value

ieee80211_rx_stats.noise is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 98, which is the equivalent
to -98 dBm when IW_QUAL_DBM is set.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: ieee80211: ieee80211_rx: Remove commented printk messages
Shraddha Barke [Sun, 11 Oct 2015 05:11:23 +0000 (10:41 +0530)]
Staging: rtl8192u: ieee80211: ieee80211_rx: Remove commented printk messages

Remove commented out printk messages since they are not needed. Also remove
the unnecessary braces and blank lines

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: ieee80211: ieee80211_wx: Remove commented printk messages
Shraddha Barke [Sun, 11 Oct 2015 05:11:22 +0000 (10:41 +0530)]
Staging: rtl8192u: ieee80211: ieee80211_wx: Remove commented printk messages

Remove commented out printk messages since they are not needed

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: ieee80211: ieee80211_softmac: Remove commented printk messages
Shraddha Barke [Sun, 11 Oct 2015 05:11:21 +0000 (10:41 +0530)]
Staging: rtl8192u: ieee80211: ieee80211_softmac: Remove commented printk messages

Remove commented printk since it is not needed

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rtl8192u: Do not DMA on the stack
Ksenija Stanojevic [Thu, 8 Oct 2015 15:21:49 +0000 (17:21 +0200)]
Staging: rtl8192u: Do not DMA on the stack

Fix error "doing DMA on the stack" by using kzalloc for buffer
allocation.
Issue found by smatch.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: rdma: hfi1: remove unnecessary out of memory messages
Alison Schofield [Mon, 12 Oct 2015 21:28:36 +0000 (14:28 -0700)]
staging: rdma: hfi1: remove unnecessary out of memory messages

Out of memory messages are unnecssary in the drivers as they are
reported by memory management.

Addresses checkpatch.pl: WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rdma: ipath: Use kcalloc instead of kzalloc to allocate array
Shraddha Barke [Fri, 9 Oct 2015 15:33:27 +0000 (21:03 +0530)]
Staging: rdma: ipath: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rdma: hfi1: Use kcalloc instead of kzalloc to allocate array
Shraddha Barke [Fri, 9 Oct 2015 15:33:26 +0000 (21:03 +0530)]
Staging: rdma: hfi1: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which
could result from the multiplication of number of elements and size and
it is also a bit nicer to read.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: rdma: Use memdup_user
Ksenija Stanojevic [Fri, 9 Oct 2015 13:56:59 +0000 (15:56 +0200)]
Staging: rdma: Use memdup_user

Use memdup_user when user data is immediately copied into the
allocated region.

Issue found using coccinelle.

Signed-off-by: Ksenija Stanojevic<ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: hdm-i2c: Drop owner assignment from i2c driver
Shraddha Barke [Mon, 12 Oct 2015 13:14:34 +0000 (18:44 +0530)]
Staging: most: hdm-i2c: Drop owner assignment from i2c driver

i2c_driver does not need to set an owner because core will set it

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: most: Fix typo in staging/most
Masanari Iida [Sat, 10 Oct 2015 04:42:49 +0000 (13:42 +0900)]
Staging: most: Fix typo in staging/most

This patch fix spelling typo found in most

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Fix the power state error in resume
Binbin Zhou [Mon, 12 Oct 2015 01:48:27 +0000 (09:48 +0800)]
staging: sm750fb: Fix the power state error in resume

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 <sudipm.mukherjee@gmail.com>
Signed-off-by: Binbin Zhou <zhoubb@lemote.com>
Reviewed-by: Huacai Chen <chenhc@lemote.com>
Reviewed-by: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Add space around '&'
Amitoj Kaur Chawla [Fri, 9 Oct 2015 20:51:30 +0000 (02:21 +0530)]
staging: sm750fb: Add space around '&'

Add space around operator '&'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Add space around '<<'
Amitoj Kaur Chawla [Fri, 9 Oct 2015 20:50:36 +0000 (02:20 +0530)]
staging: sm750fb: Add space around '<<'

Add space around operator '<<'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '<<' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: sm750fb: Remove multiple blank lines
Amitoj Kaur Chawla [Fri, 9 Oct 2015 20:49:00 +0000 (02:19 +0530)]
staging: sm750fb: Remove multiple blank lines

Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>