[PATCH v2] staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler

2017-04-09 Thread Aditya Shankar
Change the config packet format used in handle_set_wfi_drv_handler() to align the host driver with the new format used in the wilc firmware. The change updates the format in which the host driver provides the firmware with the drv_handler index and also uses two new fields viz. "mode" and 'name" i

Re: [PATCH] staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler

2017-04-09 Thread kbuild test robot
Hi Aditya, [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.11-rc6 next-20170407] [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/Aditya-Shankar/staging-wilc100

Re: [greybus-dev] [PATCH] staging: greybus: compress return logic

2017-04-09 Thread Viresh Kumar
On 25-03-17, 10:50, Arushi Singhal wrote: > Simplify function returns by merging assignment and return. > > Signed-off-by: Arushi Singhal > --- > drivers/staging/greybus/loopback.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/staging/greybus/loopback.c >

[PATCH] drivers/staging/iio: braces {} are not necessary for single statement blocks

2017-04-09 Thread Pushkar Jambhlekar
Handling checkpatch.pl warning for if block. For single if statement block, braces are not neccessary. Making code consistent with linux kernel coding guidelines. Signed-off-by: Pushkar Jambhlekar --- drivers/staging/iio/accel/adis16203.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

[PATCH] staging: wilc1000: New cfg packet format in handle_set_wfi_drv_handler

2017-04-09 Thread Aditya Shankar
Change the config packet format used in handle_set_wfi_drv_handler() to align the host driver with the new format used in the wilc firmware. The change updates the format in which the host driver provides the firmware with the drv_handler index and also uses two new fields viz. "mode" and 'name" i

Re: [PATCH] staging: wilc1000: Update handler assignment logic

2017-04-09 Thread Aditya Shankar
On Sat, 8 Apr 2017 13:00:15 +0200 Greg KH wrote: > On Fri, Apr 07, 2017 at 05:24:05PM +0530, Aditya Shankar wrote: > > With this update, the host driver is consistent with the > > implementation on the firmware side with respect to obtaining > > the driver handler for all modes. > > With this new

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

2017-04-09 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 v3 22/24] staging: ks7010: remove unused macro

2017-04-09 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 v3 21/24] staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE

2017-04-09 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 v3 24/24] staging: ks7010: move check and break to top of loop

2017-04-09 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 v3 18/24] staging: ks7010: add task to TODO file

2017-04-09 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 v3 23/24] staging: ks7010: remove multi-way decision

2017-04-09 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 adds

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

2017-04-09 Thread Tobin C. Harding
Checkpatch emits multiple CHECK: Logical continuations should be on the previous line. Move logical continuations to the end of the previous line. Signed-off-by: Tobin C. Harding --- drivers/staging/ks7010/ks_hostif.c | 58 ++ 1 file changed, 28 insertions(+)

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

2017-04-09 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 v3 10/24] staging: ks7010: factor out send stop request

2017-04-09 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 v3 03/24] staging: ks7010: change length type to unsigned

2017-04-09 Thread Tobin C. Harding
Length undergoes type conversion when passed (indirectly) as an argument for parameter of type 'unsigned int'. If length is negative this is a bug (the value after conversion is large). Declare 'length' to be an unsigned type instead of a signed type. Reported-by: Dan Carpenter Signed-off-by: To

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

2017-04-09 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 in-tree. One call site places the clean up code within the 'else' branch of an multi-way decision. This can be more clearly exp

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

2017-04-09 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 v3 15/24] staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT

2017-04-09 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 v3 14/24] staging: ks7010: utilize local variable

2017-04-09 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 v3 12/24] staging: ks7010: move null check before dereference

2017-04-09 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 v3 11/24] staging: ks7010: fix multi-way decision

2017-04-09 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 v3 06/24] staging: ks7010: invert conditional, reduce indentation

2017-04-09 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, 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. The

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

2017-04-09 Thread Tobin C. Harding
Function uses overly complex calls to memcpy(). Code may be simplified by the use of a local variable. Code sometimes uses explicit address of initial array element and sometimes does not. Uniformity aids readability. If array pointers are explicit it aids readability further. Simplify calls to me

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

2017-04-09 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 v3 02/24] staging: ks7010: remove void * cast

2017-04-09 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 v3 00/24] staging: ks7010: checkpatch clean up

2017-04-09 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. Patch 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

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

2017-04-09 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_sdi

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

2017-04-09 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 v3 04/24] staging: ks7010: rename identifier rc to ret

2017-04-09 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 v3 05/24] staging: ks7010: rename identifier retval to ret

2017-04-09 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

Re: [PATCH] Staging: comedidev.h comedi_lrange should be const struct

2017-04-09 Thread kbuild test robot
/Staging-comedidev-h-comedi_lrange-should-be-const-struct/20170409-224503 config: x86_64-allmodconfig compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: make ARCH=x86_64 allmodconfig make ARCH=x86_64 All warnings (new ones prefixed by >>): vim +629 drivers/staging/

Re: [PATCH v2 03/24] staging: ks7010:

2017-04-09 Thread Tobin C. Harding
On Sat, Apr 08, 2017 at 12:47:01PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 05, 2017 at 10:42:06AM +1000, Tobin C. Harding wrote: > > Length undergoes type conversion when passed (indirectly) as an > > argument for parameter of type 'unsigned int'. If length is negative > > this is a bug (the

Re: [PATCH] Staging: comedidev.h comedi_lrange should be const struct

2017-04-09 Thread Greg KH
On Sun, Apr 09, 2017 at 04:28:12PM +0200, Arthur Brainville (Ybalrid) wrote: > According to checkpatch.pl, comedi_lrange should be declared as `const > struct` instead of `struct` in driver/staging/comedidev.h > > Signed-off-by: Arthur Brainville (Ybalrid) > --- > drivers/staging/comedi/comedide

Re: [staging:staging-next 751/807] drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.o:(.data+0x138): multiple definition of `rtl8723B_leave_lps_flow'

2017-04-09 Thread Greg Kroah-Hartman
On Sun, Apr 09, 2017 at 11:40:15AM +0200, Hans de Goede wrote: > Hi, > > On 09-04-17 11:37, Greg Kroah-Hartman wrote: > > On Sun, Apr 09, 2017 at 05:02:01PM +0800, kbuild test robot wrote: > > > tree: > > > https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > > > staging-next >

Re: [patch 0/7] staging: speakup: introduce tty-based comms

2017-04-09 Thread Okash Khawaja
Hi, Any updates on this? We can start working in tty_port_register_serdev_device() if that's okay? Thanks, Okash On Wed, Mar 22, 2017 at 01:05:24AM +0100, Samuel Thibault wrote: > Hello, > > So Rob, how do you see this going? Shall we introduce a serdev_device > *tty_port_register_serdev_devic

Re: [PATCH] Staging: comedidev.h comedi_lrange should be const struct

2017-04-09 Thread kbuild test robot
/Staging-comedidev-h-comedi_lrange-should-be-const-struct/20170409-224503 config: x86_64-allyesdebian (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by

Re: [PATCH 06/22] staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > Smatch lists the following: > >   CHECK   drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c > drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:470 > rtw_cfg80211_ibss_indicate_connect() error: we previously assumed > 'scanned' could be null

Re: [PATCH 13/22] staging: rtl8723bs: Fix indenting mistake in core/rtw_ap.c

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > Fixing this requires changing the indentatikon of a long for loop. Typo here. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-

Re: [PATCH 16/22] staging: rtl8723bs: Fix some indenting problems and a potential data overrun

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > +   if (cam_id >= 0 && cam_id < 32) Isn't there a constant we could use instead of hard-coding this? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/

Re: [PATCH 00/22] staging: rtl87232bs: Fix errors and warnings detected by Smatch

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > A number of routines have indenting, off by one, and possible usage > while null warnings or errors listed by Smatch. This set of patches > fix all but one of these, and it is in code that will be removed in a > subsequent patch. > > Signed-

Re: [PATCH 20/22] staging rtl8723bs: Fix indenting errors and an off-by-one mistake in core/rtw_mlme_ext.c

2017-04-09 Thread Bastien Nocera
On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: > } else { > -   for (pstat->aid = 1; pstat->aid <= NUM_STA; pstat->aid++) > +   for (pstat->aid = 1; pstat->aid < NUM_STA; pstat->aid++) > if (pstapriv->sta_aid[pstat->aid - 1] == NULL) >

Re: [PATCH 06/22] staging: rtl8723bs: Fix various errors in os_dep/ioctl_cfg80211.c

2017-04-09 Thread Larry Finger
On 04/09/2017 10:28 AM, Bastien Nocera wrote: On Sat, 2017-04-08 at 11:07 -0500, Larry Finger wrote: Smatch lists the following: CHECK drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:470 rtw_cfg80211_ibss_indicate_connect() error: we previ

[PATCH] Staging: comedidev.h comedi_lrange should be const struct

2017-04-09 Thread Arthur Brainville (Ybalrid)
According to checkpatch.pl, comedi_lrange should be declared as `const struct` instead of `struct` in driver/staging/comedidev.h Signed-off-by: Arthur Brainville (Ybalrid) --- drivers/staging/comedi/comedidev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/c

[PATCH v3 2/2] staging: vc04_services: bcm2835-audio: bcm2835-pcm.c Fixed codepatch coding style issue, line over 80

2017-04-09 Thread Andrea della Porta
Fixed checkpatch warning about line over 80 chars Signed-off-by: Andrea della Porta --- Changes in v3: - rebased on staging-testing drivers/staging/vc04_services/bcm2835-audio/bcm2835-pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm28

[PATCH v3 1/2] staging: vc04_services: bcm2835-audio: bcm2835-pcm.c Fixed checkpatch warning about unaligned function params

2017-04-09 Thread Andrea della Porta
Fixed unaligned function parameters issues, as per checkpatch warning Signed-off-by: Andrea della Porta --- Changes in v3: - rebased on staging-testing .../vc04_services/bcm2835-audio/bcm2835-pcm.c | 43 ++ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a

[PATCH v3 0/2] staging: vc04_services: bcm2835-audio: bcm2835-pcm.c - Fixed several checkpatch issues

2017-04-09 Thread Andrea della Porta
Andrea della Porta (2): staging: vc04_services: bcm2835-audio: bcm2835-pcm.c Fixed checkpatch warning about unaligned function params staging: vc04_services: bcm2835-audio: bcm2835-pcm.c Fixed codepatch coding style issue, line over 80 .../vc04_services/bcm2835-audio/bcm2835-pcm.c

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

2017-04-09 Thread Alfonso Lima
On Sat, Apr 01, 2017 at 09:24:58AM +0200, Sebastian Haas wrote: > 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..fd92f

Re: [staging:staging-next 751/807] drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.o:(.data+0x138): multiple definition of `rtl8723B_leave_lps_flow'

2017-04-09 Thread Hans de Goede
Hi, On 09-04-17 11:37, Greg Kroah-Hartman wrote: On Sun, Apr 09, 2017 at 05:02:01PM +0800, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: 6cb3d05f3030deed157c9bbada5c58e7ee0f5172 commit: 554c0a3abf216c991c5ebddcdb2c08689

Re: [staging:staging-next 751/807] drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.o:(.data+0x138): multiple definition of `rtl8723B_leave_lps_flow'

2017-04-09 Thread Greg Kroah-Hartman
On Sun, Apr 09, 2017 at 05:02:01PM +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git > staging-next > head: 6cb3d05f3030deed157c9bbada5c58e7ee0f5172 > commit: 554c0a3abf216c991c5ebddcdb2c08689ecd290b [751/807] staging: Add > rtl8723bs s

[staging:staging-next 751/807] drivers/staging/rtl8723bs/hal/Hal8723BPwrSeq.o:(.data+0x138): multiple definition of `rtl8723B_leave_lps_flow'

2017-04-09 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: 6cb3d05f3030deed157c9bbada5c58e7ee0f5172 commit: 554c0a3abf216c991c5ebddcdb2c08689ecd290b [751/807] staging: Add rtl8723bs sdio wifi driver config: powerpc-allyesconfig (attached as .config) compiler:

[GIT PULL] Staging/IIO driver fixes for 4.11-rc6

2017-04-09 Thread Greg KH
The following changes since commit c02ed2e75ef4c74e41e421acb4ef1494671585e8: Linux 4.11-rc4 (2017-03-26 14:15:16 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.11-rc6 for you to fetch changes up to 97fbfef6bd5

Re: [PATCH v2 1/3] staging: vc04_services: bcm2835-audio: bcm2835-pcm.c Fixed checkpatch warning about unaligned function params

2017-04-09 Thread Greg Kroah-Hartman
On Sat, Apr 08, 2017 at 05:21:38PM +0100, Andrea della Porta wrote: > Fixed unaligned function parameters issues, as per checkpatch warning > > Signed-off-by: Andrea della Porta > --- > Changes in v2: > - subject line more explicit > - checkpatch output removed as requested, summarized in one lin