[PATCHv2 00/16] staging: rtl8192u: code clean up

2015-09-11 Thread Raphaël Beamonte
Hi, Following comments from Dan Carpenter on my previous patch to limit the lines lengths for rtl8192u/r8192U_core.c [1], please find attached a set of patches splitting those operations. I also took care of keeping the code the more readable possible, some of those patchs even aim to clean the o

[PATCHv2 01/16] staging: rtl8192u: r8192U_core: fix comments lines over 80 characters

2015-09-11 Thread Raphaël Beamonte
Move, replace and reorganize comments to stay under 80 characters per line, as to follow the kernel code style. Some unuseful comments have been removed. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 232 ++--- 1 file changed, 153 insert

[PATCHv2 02/16] staging: rtl8192u: r8192U_core: add line breaks to keep lines under 80 characters

2015-09-11 Thread Raphaël Beamonte
Add line breaks in multiple lines to keep them under 80 characters, as to follow the kernel code style. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 626 ++--- 1 file changed, 421 insertions(+), 205 deletions(-) diff --git a/drivers/st

[PATCHv2 05/16] staging: rtl8192u: r8192U_core: rtl8192_adapter_start: reorganize function

2015-09-11 Thread Raphaël Beamonte
Reverse conditions and use goto in the function rtl8192_adapter_start to have most of it under 80 characters per line. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 91 ++ 1 file changed, 47 insertions(+), 44 deletions(-) diff --git

[PATCHv2 04/16] staging: rtl8192u: r8192U_core: reverse conditions to get lines under 80 characters

2015-09-11 Thread Raphaël Beamonte
Reverse some conditions to clean the code and allow to have lines under 80 characters, as to follow the kernel code style. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 48 ++ 1 file changed, 25 insertions(+), 23 deletions(-) diff -

[PATCHv2 03/16] staging: rtl8192u: r8192U_core: add temporary variables to keep lines under 80 characters

2015-09-11 Thread Raphaël Beamonte
Add some temporary variables to reduce line length under the maximum of 80 characters, as per the kernel code style. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 139 ++--- 1 file changed, 94 insertions(+), 45 deletions(-) diff --git a

[PATCHv2 06/16] staging: rtl8192u: r8192U_core: rtl8192_read_eeprom_info: reorganize function

2015-09-11 Thread Raphaël Beamonte
Refactor code to avoid multiple check of same boolean value, and to make the code clearer. This patches also implements the necessary changes for the code lines in this function to be under 80 chars. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 259 +++

[PATCHv2 10/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: remove unneeded variable

2015-09-11 Thread Raphaël Beamonte
Local variable last_beacon_adc_pwdb was used to store a value that wasn't used after. This patch removes that variable. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r81

[PATCHv2 09/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_statistics to sb_stats

2015-09-11 Thread Raphaël Beamonte
Rename variable to a shorter name to allow easier code refactoring in following patch. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/

[PATCHv2 15/16] staging: rtl8192u: r8192U_core: replace else { if() {} } by else if () {}

2015-09-11 Thread Raphaël Beamonte
An else block only contained an if statement. Replace that else block by an else if block instead. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b

[PATCHv2 12/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: reorganize function

2015-09-11 Thread Raphaël Beamonte
Reorganize function to make it cleaner, and respect the 80 characters kernel code style rule. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 140 +++-- 1 file changed, 81 insertions(+), 59 deletions(-) diff --git a/drivers/staging/rtl819

[PATCHv2 07/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable pprevious_stats to prev_stats

2015-09-11 Thread Raphaël Beamonte
Rename variable to a shorter name to allow easier code refactoring in following patch. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 84 +- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8192u/r819

[PATCHv2 13/16] staging: rtl8192u: r8192U_core: rtl8192_tx: replace some inline conditions

2015-09-11 Thread Raphaël Beamonte
Replace some inline conditions by a full if-else statement to make the source clearer and follow the 80 characters kernel code style rule. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --gi

[PATCHv2 08/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable slide_beacon_adc_pwdb_index to sb_index

2015-09-11 Thread Raphaël Beamonte
Rename variable to a shorter name to allow easier code refactoring in following patch. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/sta

[PATCHv2 11/16] staging: rtl8192u: r8192U_core: rtl8192_process_phyinfo: rename variable rfpath to rfp

2015-09-11 Thread Raphaël Beamonte
Rename variable to a shorter name to allow easier code refactoring in following patches. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192

[PATCHv2 14/16] staging: rtl8192u: r8192U_core: rtl8192_ioctl: reorganize function

2015-09-11 Thread Raphaël Beamonte
Reorganize function rtl8192_ioctl to replace a switch with only one case besides the default by an if statement. This also allows to follow the 80 characters kernel code style rule. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/r8192U_core.c | 141 -

[PATCHv2 16/16] staging: rtl8192u: remove all code framed by symbol TO_DO_LIST

2015-09-11 Thread Raphaël Beamonte
The symbol TO_DO_LIST was used in the code to frame sections of code unused or unusable. This patch remove all code framed by that symbol in this driver. Signed-off-by: Raphaël Beamonte --- drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 +- drivers/staging/rtl8192u/ieee80211/ieee80211_

[PATCH 1/7] staging: wilc1000: remove PANDA_BOARD

2015-09-11 Thread Tony Cho
This patch removes one of the platform dependencies, PANDA_BOARD from the driver codes. The device tree will provide the platform dependencies in the future commits. Signed-off-by: Tony Cho Signed-off-by: Glen Lee --- drivers/staging/wilc1000/linux_wlan.c | 4 drivers/staging/wilc1

[PATCH 3/7] staging: wilc1000: remove unnecessary define FIVE_GHZ_BAND

2015-09-11 Thread Tony Cho
From: Glen Lee wilc1000 driver does not support five Ghz band. Remove FIVE_GHZ_BAND and it's related code. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/wilc1000/coreconf

[PATCH 2/2] staging: wilc1000: remove RX_BH_TYPE

2015-09-11 Thread Tony Cho
This patch removes the preprocessor definition, RX_BH_TYPE and uses the request_threaded_irq instead of kernel thread to execute the interrupt handler. As a result, linux_wlan_enable_irq() and linux_wlan_disable_irq() are also removed from the linux_wlan.c file. Signed-off-by: Tony Cho --- driv

[PATCH 4/7] staging: wilc1000: remove unused defines

2015-09-11 Thread Tony Cho
From: Glen Lee This patch removes follwing unused defines. MAX_CFG_PKTLEN MSG_HEADER_LEN QUERY_MSG_TYPE WRITE_MSG_TYPE RESP_MSG_TYPE WRITE_RESP_SUCCESS INVALID MAC_ADDR_LEN Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 8 1 file cha

[PATCH 2/7] staging: wilc1000: remove useless define PHY_802_11n

2015-09-11 Thread Tony Cho
From: Glen Lee The define PHY_802_11n is useless because wilc1000 support 802.11n as always. Remove PHY_802_11n and it related code. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/

[PATCH 5/7] staging: wilc1000: remove unnecessary extern function declaration

2015-09-11 Thread Tony Cho
From: Glen Lee Function NetworkInfoReceived, GnrlAsyncInfoReceived and host_int_ScanCompleteReceived are declared in the header file already. Just removes the declaration and comments. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 8

[PATCH 6/7] staging: wilc1000: delete unused global variables.

2015-09-11 Thread Tony Cho
From: Glen Lee gstrConfigPktInfo, SemHandleSendPkt and SemHandlePktResp are never used in the drivers. So just delete the variables and it's related code. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 11 --- 1 file changed, 11 delet

[PATCH 7/7] staging: wilc1000: remove unused variables

2015-09-11 Thread Tony Cho
From: Glen Lee Variable g_num_total_switches is never used so just remove it. gastrWIDs is also not used because g_num_total_switches is deleted. Remove gastrWIDs also. Signed-off-by: Glen Lee Signed-off-by: Tony Cho --- drivers/staging/wilc1000/coreconfigurator.c | 127 --

Re: [PATCH 3/3] staging: fbtft: use pr_fmt

2015-09-11 Thread Sudip Mukherjee
On Thu, Sep 10, 2015 at 06:45:15PM +0200, Noralf Trønnes wrote: > > 10.09.2015 06:54, skrev Sudip Mukherjee: > >On Wed, Sep 09, 2015 at 11:20:08PM +0200, Noralf Trønnes wrote: > >>Den 09.09.2015 20:35, skrev Greg Kroah-Hartman: > >>>On Sat, Sep 05, 2015 at 07:13:45PM +0530, Sudip Mukherjee wrote:

[PATCH] staging: speakup: Used kstrtoul instead of simple_strtoul

2015-09-11 Thread Aparna Karuthodi
Used kstrtoul instead of simple_strtoul inorder to fix a warning detected by checkpatch. The warning is given below: drivers/staging/speakup/kobjects.c:156: WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Aparna Karuthodi --- drivers/staging/speakup/kobjects.c |2 +-

[PATCH 2/3] staging: fbtft: start using pr_fmt

2015-09-11 Thread Sudip Mukherjee
Instead of defining DRVNAME and using it in all calls to pr_* family of macros lets start using pr_fmt. Signed-off-by: Sudip Mukherjee --- Greg, In fbtft_device_spi_device_register() you told to use dev_*, but that pr_err is done when spi_busnum_to_master() fails, and in that case we are not get

[PATCH 1/3] staging: fbtft: use dev_*

2015-09-11 Thread Sudip Mukherjee
Use dev_* family of macros where we have a reference of a device. Signed-off-by: Sudip Mukherjee --- Greg, In fbtft_device_spi_delete() you told to make that as dev_debug, but since that dev_info is already under verbose so I kept it as it is. drivers/staging/fbtft/fbtft_device.c | 15 +++

[PATCH 3/3] staging: fbtft: change log level

2015-09-11 Thread Sudip Mukherjee
Reduce the log level of some of the pr_* calls and remove 2 pr_debug calls which just prints "init" and "exit". Signed-off-by: Sudip Mukherjee --- drivers/staging/fbtft/fbtft_device.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/fbtft/fbtft_device.c

[PATCH] staging: speakup: Changed simple_strtoul to kstrtoul

2015-09-11 Thread Aparna Karuthodi
Used kstrtoul instead of simple_strtoul to remove a warning detected by checkpatch.The warning is given below: drivers/staging/speakup/varhandlers.c:327: WARNING: simple_strtoul is obsolete, use kstrtoul instead Signed-off-by: Aparna Karuthodi --- drivers/staging/speakup/varhandlers.c |2 +-

[PATCH] staging: lustre: lnet: klnds: socklnd: Added a space

2015-09-11 Thread Anjali Menon
Added a space to fix the following coding style error detected by checkpatch: ERROR: spaces required around that ':' (ctx:VxE) Signed-off-by: Anjali Menon --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/stagi

[PATCH] staging/dgap: Use strpbrk() instead of dgap_sindex()

2015-09-11 Thread Alexander Kuleshov
The provides strpbrk() function that does the same that the dgap_sindex(). Let's use already defined function instead of writing custom. Signed-off-by: Alexander Kuleshov --- drivers/staging/dgap/dgap.c | 24 +--- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a

[PATCH] staging: android: fix typo

2015-09-11 Thread Junesung Lee
'syncrhronization' is wrong spell. 'synchronization' is correct. Signed-off-by: Junesung Lee --- drivers/staging/android/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig index 24d657b..0a9a7b3 100644 ---

Re: [PATCH v3 3/4] staging/rtl8188eu : Remove duplicated BIT() definitions

2015-09-11 Thread Greg KH
On Wed, Sep 09, 2015 at 03:57:09PM -0700, Anish Bhatt wrote: > The BIT() macro is already defined in bitops.h, remove duplicate > definitions. Users of BIT() macro are expecting unsigned int/u32, so > add typecasts where this creates a build warning. > > Signed-off-by: Anish Bhatt > --- > driver

Re: [PATCH 1/2] staging: dgap: fix possible NULL dereference

2015-09-11 Thread Greg Kroah-Hartman
On Thu, Sep 10, 2015 at 05:24:58PM +0530, Sudip Mukherjee wrote: > The return pointer from dgap_getword() is used in strcmp() where it is > dereferenced. But dgap_getword() can return NULL. > Lets put a check there and return 0 as error. > > Signed-off-by: Sudip Mukherjee > --- > drivers/staging

Re: [PATCH] staging: slicoss: remove unused variables

2015-09-11 Thread Greg Kroah-Hartman
On Thu, Sep 10, 2015 at 06:52:22PM +0530, Sudip Mukherjee wrote: > On Wed, Sep 09, 2015 at 11:31:37AM -0700, Greg Kroah-Hartman wrote: > > On Fri, Sep 04, 2015 at 06:53:18PM +0530, Sudip Mukherjee wrote: > > > These variables were only assigned some values but they were never used. > > > > > > Sig

Re: [PATCH v2 1/2] staging: wilc1000: remove unused enum

2015-09-11 Thread Greg KH
On Fri, Sep 11, 2015 at 12:04:19PM +0900, Tony Cho wrote: > From: Glen Lee > > This patch removes a unused enum tenuFrameClass. > > Signed-off-by: Glen Lee > Signed-off-by: Tony Cho > --- > drivers/staging/wilc1000/coreconfigurator.c | 8 > 1 file changed, 8 deletions(-) I already a

Re: [PATCH] staging: speakup: Changed simple_strtoul to kstrtoul

2015-09-11 Thread Greg KH
On Fri, Sep 11, 2015 at 08:47:20PM +0530, Aparna Karuthodi wrote: > Used kstrtoul instead of simple_strtoul to remove a warning detected by > checkpatch.The warning is given below: > drivers/staging/speakup/varhandlers.c:327: WARNING: simple_strtoul is > obsolete, use kstrtoul instead > > Signed-o

Re: [PATCH] staging: speakup: Used kstrtoul instead of simple_strtoul

2015-09-11 Thread Greg KH
On Fri, Sep 11, 2015 at 06:06:34PM +0530, Aparna Karuthodi wrote: > Used kstrtoul instead of simple_strtoul inorder to fix a warning > detected by checkpatch. > The warning is given below: > drivers/staging/speakup/kobjects.c:156: WARNING: simple_strtoul is > obsolete, use kstrtoul instead > > Sig

Re: [PATCH V2 01/31] staging: wilc1000: rename WILC_WFI_CfgSetChannel

2015-09-11 Thread Greg KH
On Fri, Sep 11, 2015 at 04:14:00AM +0900, Chaehyun Lim wrote: > This patch replaces WILC_WFI_CfgSetChannel with > wilc_set_channel to avoid CamelCase. > > Signed-off-by: Chaehyun Lim > --- > V2: to make function name simple > > drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 10 +- >

Re: [PATCH] staging: lustre: lnet: klnds: socklnd: Added a space

2015-09-11 Thread Greg KH
On Fri, Sep 11, 2015 at 08:48:57PM +0530, Anjali Menon wrote: > Added a space to fix the following coding style error detected by > checkpatch: > > ERROR: spaces required around that ':' (ctx:VxE) > > Signed-off-by: Anjali Menon > --- > drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 2