Re: [PATCH] staging: vt6656: Fix spaces, char limit and embedded func name in print.

2017-04-01 Thread Greg KH
On Sat, Apr 01, 2017 at 08:29:00PM -0700, Daniel Cashman wrote: > From: Dan Cashman > > Address errors and warning found in rf.c by checkpatch kernel style script. > Specifically, change spaces to tabs, split function arguments across a new > line to avoid 80 character limit, and remove use of em

[PATCH] staging: vt6656: Fix spaces, char limit and embedded func name in print.

2017-04-01 Thread Daniel Cashman
From: Dan Cashman Address errors and warning found in rf.c by checkpatch kernel style script. Specifically, change spaces to tabs, split function arguments across a new line to avoid 80 character limit, and remove use of embedded function name in a dev_dbg() call. Signed-off-by: Daniel Cashman

Re: [PATCH v2] staging: radio-bcm2048: fixed bare use of unsigned int

2017-04-01 Thread kbuild test robot
Hi Eddie, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.11-rc4 next-20170331] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Eddie-Youseph/staging-radio-bcm2048-fi

Re: [PATCH v2] staging: media: atomisp: Fix style. remove space before ',' and convert to tabs.

2017-04-01 Thread Daniel Cashman
My apologies; I did not review the TODO. Consider this withdrawn. Dan On 03/29/2017 10:30 AM, Alan Cox wrote: > On Wed, 2017-03-29 at 09:57 -0700, Daniel Cashman wrote: >> From: Dan Cashman >> >> Signed-off-by: Dan Cashman > > > As the TODO asks - please no whitespace cleanups yet. They make

Re: [RFC PATCH] binder: Don't require the binder lock when killed in binder_thread_read()

2017-04-01 Thread Doug Anderson
Hi, On Fri, Mar 31, 2017 at 11:48 PM, Greg KH wrote: > On Fri, Mar 31, 2017 at 02:00:13PM -0700, Doug Anderson wrote: >> On Fri, Mar 31, 2017 at 12:29 PM, Greg KH wrote: >> BTW: I presume that nobody has decided that it would be a wise idea to >> pick the OOM reaper code back to any stable trees

[PATCH] staging: bcm2835-audio: remove TODO about VCOS_FALSE

2017-04-01 Thread Kevin Wern
Remove TODO comment about VCOS_FALSE, an rpi-specific constant that is not defined here upstream. Signed-off-by: Kevin Wern --- drivers/staging/bcm2835-audio/bcm2835-vchiq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/bcm2835-audio/bcm2835-vchiq.c b/d

Re: [PATCH] staging: bcm2835-audio: remove unnecessary log messages

2017-04-01 Thread kbuild test robot
-Pant/staging-bcm2835-audio-remove-unnecessary-log-messages/20170401-233208 config: arm-allmodconfig (attached as .config) compiler: arm-linux-gnueabi-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin

[PATCH 19/24] staging: ks7010: rename identifier packet to skb

2017-04-01 Thread Tobin C. Harding
Kernel networking code predominately uses the identifier 'skb' for a struct sk_buff pointer. Of 8088 instances of 'struct sk_buff *' within net/ 6670 are named 'skb'. Following the principle of least surprise, new networking code should use the identifier 'skb' for variables of type 'struct sk_buff

[PATCH 21/24] staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE

2017-04-01 Thread Tobin C. Harding
Checkpatch emits WARNING: Avoid multiple line dereference. Fix up layout of function call, move dereference to single line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/ks7

[PATCH 23/24] staging: ks7010: remove multi-way decision

2017-04-01 Thread Tobin C. Harding
Function uses multi-way decision for control flow. Final statement of function is spin_unlock(). Code can be simplified by adding a goto label labelling the call to spin_unlock() and jumping to label instead of using multi-way decision. This allows the code to be indented one level less which also

[PATCH 24/24] staging: ks7010: move check and break to top of loop

2017-04-01 Thread Tobin C. Harding
Function uses an if statement within a for loop to guard a block of code. If 'if' statement conditional evaluates to false, loop breaks. The same logic can be expressed by inverting the conditional and breaking when new conditional evaluates to true. This allows the subsequent code to be indented o

[PATCH 22/24] staging: ks7010: remove unused macro

2017-04-01 Thread Tobin C. Harding
Macro CHECK_ALINE is defined and never used. Remove unused macro. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 47adc77..a505c4e 100644 --

[PATCH 20/24] staging: ks7010: fix checkpatch LOGICAL_CONTINUATIONS

2017-04-01 Thread Tobin C. Harding
Checkpatch emits multiple CHECK: Logical continuations should be on the previous line. In one instance, logical continuation involves three key length checks, these can be assigned to a suitably named variable to make the code more readable. Move logical continuations to the end of the previous li

[PATCH 14/24] staging: ks7010: utilize local variable

2017-04-01 Thread Tobin C. Harding
Function contains a local pointer variable defined to a memory location within a structure. This memory location is later used by dereferencing the struct instead of using the local pointer. The code is cleaner if all references of the same memory location use the local variable. Utilize existing

[PATCH 13/24] staging: ks7010: simplify calls to memcpy()

2017-04-01 Thread Tobin C. Harding
Function uses overly complex calls to memcpy(). Code may be simplified by the use of a local variable. Address of first element of an array is explicitly taken, this is unnecessary since the address of the first element is the same as the address (value) assigned to the array identifier. The code i

[PATCH 16/24] staging: ks7010: fix checkpatch UNNECESSARY_ELSE

2017-04-01 Thread Tobin C. Harding
Checkpatch emits WARNING: else is not generally useful after a break or return. Two warnings of this type are emitted for this code block, in both cases 'else' statements are unnecessary. Remove unnecessary 'else' statements, reduce indentation in subsequent code. Signed-off-by: Tobin C. Harding

[PATCH 15/24] staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT

2017-04-01 Thread Tobin C. Harding
Checkpatch emits CHECK: Alignment should match open parenthesis. Align argument to open parenthesis. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/stagi

[PATCH 17/24] staging: ks7010: rename RecvMIC to recv_mic

2017-04-01 Thread Tobin C. Harding
Identifier uses camel case, standard kernel style does not use camel case. Rename buffer 'RecvMIC' to 'recv_mic'. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c

[PATCH 18/24] staging: ks7010: add task to TODO file

2017-04-01 Thread Tobin C. Harding
Driver uses custom Michael MIC implementation. There is already an implementation within the kernel. There is at least one other driver already using the kernel implementation (drivers/net/wireless/intersil/orinoco). Add task to TODO file. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7

[PATCH 11/24] staging: ks7010: fix multi-way decision

2017-04-01 Thread Tobin C. Harding
Multi-way decision contains two anomalies. Firstly, a local variable is defined to be the inverse truth variable of a struct member. This local variable is used as the conditional to the multi-way decision. This is unnecessary, the same logic can be expressed using the struct member directly. Sec

[PATCH 12/24] staging: ks7010: move null check before dereference

2017-04-01 Thread Tobin C. Harding
Function parameter is cast to a local pointer which is then dereferenced before it is checked to be non-NULL. Move pointer null check to be before the pointer is dereferenced. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH 09/24] staging: ks7010: fix function return code path

2017-04-01 Thread Tobin C. Harding
Function has duplicate code clean up sequences; identical function call followed by return. This would be better expressed with the use of a goto statement, as is typical with the kernel code base. One call site places the clean up code within the 'else' branch of an multi-way decision. This can be

[PATCH 06/24] staging: ks7010: invert conditional, reduce indentation

2017-04-01 Thread Tobin C. Harding
A number of functions have blocks of code guarded by an if statement. if (foo) { /* block of code */ } This can, on occasion, be more succinctly be expressed as if (!foo) return /* block of code */ This change will mean a number of whitespace issues need to be addressed/fixed.

[PATCH 10/24] staging: ks7010: factor out send stop request

2017-04-01 Thread Tobin C. Harding
Function contains compound statement delineated by lone braces. This statement represents a discreet set of functionality and thus can be factored out into a separate function. Using a separate function instead of a compound statement increases readability, reduces code indentation, reduces functio

[PATCH 07/24] staging: ks7010: change static function return type

2017-04-01 Thread Tobin C. Harding
Function has return type 'int'. Function has internal linkage. Function returns 0 on all execution paths. Function is called only once in the driver and the return value is not checked. Removal of this return value does not change the program logic. The 'int' return type is not adding any informati

[PATCH 08/24] staging: ks7010: separate dissimilar checks

2017-04-01 Thread Tobin C. Harding
Function contains a list of four checks, for no apparent reason two of them are OR'ed together. Having two OR'ed together and the other two not implies some connection between the two that are combined. It is easier to read this code if the four unrelated checks are done as separate statements. Mo

[PATCH 02/24] staging: ks7010: remove void * cast

2017-04-01 Thread Tobin C. Harding
Functions accept a parameter of type 'void *', this is then cast to a struct ks_wlan_private pointer. All call sites have a struct ks_wlan_private pointer and cast it to 'void *'. We can remove the unnecessary casting by changing the parameter type to match the usage. Functions changed all have int

[PATCH 03/24] staging: ks7010: add BUG_ON() to catch programmer error

2017-04-01 Thread Tobin C. Harding
Constant is used to allocate memory for a buffer, then buffer is filled upto 'size' which is passed as a parameter. If 'size' is bigger than the constant then the buffer will overflow. Function has internal linkage so this can only happen due to programmer error. BUG_ON() is designed for catching t

[PATCH 05/24] staging: ks7010: rename identifier retval to ret

2017-04-01 Thread Tobin C. Harding
Function uses identifier 'retval' to hold the error return value. The rest of the driver uses 'ret' for this purpose. Being uniform in the choice of identifiers generally adds to the cleanliness of the code, also it is arguably easier to follow the code if one name is used for one task. Rename ide

[PATCH 01/24] staging: ks7010: remove unnecessary function parameter

2017-04-01 Thread Tobin C. Harding
Function ks7010_upload_firmware() takes as parameters, two struct pointers, one of which is a member of the other. This is unnecessary since one can be accessed via the other. Remove function parameter and fix all call sites. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks7010_sd

[PATCH 04/24] staging: ks7010: rename identifier rc to ret

2017-04-01 Thread Tobin C. Harding
Driver uses identifier 'rc' to hold the value for error return code. The rest of the driver predominately uses 'ret' for this purpose. It is easier to follow the code if one name is used for one task. Rename identifier 'rc' to 'ret'. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks

[PATCH 00/24] staging: ks7010: checkpatch clean up

2017-04-01 Thread Tobin C. Harding
The purpose of this patch series is to remove all the remaining *trivial* checkpatch errors, warnings, and checks from the ks7010 driver. Series does not remove warnings generated by DPRINTK statements, does not fully tidy up the comments, and does not touch line over 80 warnings of any sort. The

Re: [PATCH 17/25] staging: ks7010: simplify complex logical statment

2017-04-01 Thread Tobin C. Harding
a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Tobin-C-Harding/staging-ks7010-checkpatch-clean-up/20170401-235953 > config: mips-allyesconfig (attached as .config) > compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705

Re: [PATCH 00/25] staging: ks7010: checkpatch clean up

2017-04-01 Thread Tobin C. Harding
On Fri, Mar 31, 2017 at 12:18:08PM +1100, Tobin C. Harding wrote: > The purpose of this patch series is to remove all the remaining > *trivial* checkpatch errors, warnings, and checks from the ks7010 > driver. > > Series does not remove warnings generated by DPRINTK statements, > does not fully ti

Re: [PATCH 05/13] staging: most: use __ATTR_RW in create_channel_attribute

2017-04-01 Thread kbuild test robot
Hi Andrey, [auto build test ERROR on staging/staging-testing] [also build test ERROR on v4.11-rc4 next-20170331] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Christian-Gromm/staging-most-fix-c

Re: [PATCH 17/25] staging: ks7010: simplify complex logical statment

2017-04-01 Thread kbuild test robot
-Harding/staging-ks7010-checkpatch-clean-up/20170401-235953 config: mips-allyesconfig (attached as .config) compiler: mips-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x

Re: [PATCH] staging: iio: light: constify attribute_group structures

2017-04-01 Thread Jonathan Cameron
On 01/04/17 03:28, simran singhal wrote: > As the event_attrs field of iio_info structures is constant, so these > attribute_group structures can also be declared constant. > > File size before: >text data bss dec hex filename > 15064 1528 0 1659240d

Re: [PATCH RFC] remove custom Michael MIC implementation

2017-04-01 Thread Tobin C. Harding
On Fri, Mar 31, 2017 at 12:42:22PM +0200, Wolfram Sang wrote: > Hi, > > > The card I have is a Spectec FCC ID: S2Y-WLAN-11B-G which I believe is > > a SDW-823 and should use the ks7010 driver. > > Sorry, likely not. It is an early SDW-821 and has a MediaTek chipset for > which no driver is known:

Re: [PATCH] staging: rtl8188eu: Macro should be enclosed

2017-04-01 Thread Sebastian Haas
Hi Alfonso, On Wed, Mar 29, 2017 at 07:50:11PM +0100, alfonsolimaas...@gmail.com wrote: > diff --git a/drivers/staging/rtl8188eu/include/odm_debug.h > b/drivers/staging/rtl8188eu/include/odm_debug.h > index 687ff3e..fd92f7e 100644 > --- a/drivers/staging/rtl8188eu/include/odm_debug.h > +++ b/driv