Re: [PATCH] Remove sparse warnings in mdc_request.c

2017-03-30 Thread Greg KH
On Thu, Mar 30, 2017 at 10:09:19PM -0700, skanda.kash...@gmail.com wrote: > From: Skanda Guruanand > > --- > drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Hi, This is the friendly patch-bot

Re: [PATCH RFC] staging: ks7010: remove custom Michael MIC implementation

2017-03-30 Thread Joe Perches
On Fri, 2017-03-31 at 15:47 +1100, Tobin C. Harding wrote: > ks7010 currently uses a custom implementation of the Michael MIC > algorithm. The kernel has an implementation of this algorithm > already, we should use it. ok, trivia: Do please run your patch through checkpatch and fix a few style

[PATCH] Remove sparse warnings in mdc_request.c

2017-03-30 Thread skanda . kashyap
From: Skanda Guruanand --- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h

[no subject]

2017-03-30 Thread skanda . kashyap
I have modified struct lu_dirpage as suggested to remove the below warnings. CHECK drivers/staging/lustre/lustre/mdc/mdc_request.c drivers/staging/lustre/lustre/mdc/mdc_request.c:958:42: warning: cast to restricted __le64 drivers/staging/lustre/lustre/mdc/mdc_request.c:959:42: warning: cast to

[PATCH RFC] remove custom Michael MIC implementation

2017-03-30 Thread Tobin C. Harding
This RFC can be applied on op on Linus' tree 89970a0 Configuration options needed to build are CONFIG_STAGING=y CONFIG_KS7010=m The ks7010 driver currently uses a custom implementation of the Michael MIC algorithm. The kernel has an implementation of this algorithm already. This patch is an

[PATCH RFC] staging: ks7010: remove custom Michael MIC implementation

2017-03-30 Thread Tobin C. Harding
ks7010 currently uses a custom implementation of the Michael MIC algorithm. The kernel has an implementation of this algorithm already, we should use it. Remove the custom implementation. Implement helper functions that call the in-tree implementation through the crypto API. Update the makefile.

[PATCH] staging: iio: meter: Replace mlock with driver private buf_lock

2017-03-30 Thread Arushi Singhal
The driver needs to insure atomicity during frequency changes of bus and device. The iiodev->mlock as used was not doing that. Replace it with the drivers existing buffer lock and execute spi_write directly. Signed-off-by: Arushi Singhal ---

[PATCH 2/2 V2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread Daeseok Youn
Define new local variable to reduce the number of reference. The new local variable is added to save the addess of dfs and used in atomisp_freq_scaling() function. Signed-off-by: Daeseok Youn --- V2: this patch was rebased since the patch 1/2 was improved.

[PATCH 1/2 V2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread Daeseok Youn
The condition line in if-statement is needed to be shorthen to improve readability. Add a new definition to check the CHT with atomisp_device structure. Signed-off-by: Daeseok Youn --- V2: replace the assigment line with macro to check CHT type.

[PATCH 21/25] staging: ks7010: fix checkpatch LOGICAL_CONTINUATIONS

2017-03-30 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

[PATCH 23/25] staging: ks7010: remove unused macro

2017-03-30 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

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

2017-03-30 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

[PATCH 22/25] staging: ks7010: fix checkpatch MULTILINE_DEREFERENCE

2017-03-30 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

[PATCH 20/25] staging: ks7010: rename identifier packet to skb

2017-03-30 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

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

2017-03-30 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 18/25] staging: ks7010: rename RecvMIC to recv_mic

2017-03-30 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

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

2017-03-30 Thread Tobin C. Harding
If statement conditional is comprised of a logical continuation that contains the same truth value check multiple times. This conditional can be more succinctly expressed by splitting the conditional into two separate statements, this makes the code easier to read. Move truth values out of

[PATCH 19/25] staging: ks7010: add task to TODO file

2017-03-30 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 ---

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

2017-03-30 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 16/25] staging: ks7010: fix checkpatch UNNECESSARY_ELSE

2017-03-30 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/25] staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT

2017-03-30 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

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

2017-03-30 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

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

2017-03-30 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.

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

2017-03-30 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

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

2017-03-30 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

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

2017-03-30 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

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

2017-03-30 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.

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

2017-03-30 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 05/25] staging: ks7010: rename identifier retval to ret

2017-03-30 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

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

2017-03-30 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

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

2017-03-30 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 ---

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

2017-03-30 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

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

2017-03-30 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 ---

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

2017-03-30 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.

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

2017-03-30 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

[PATCH] staging: unisys: visorbus: fix kernel BUG discovered by day0 testing

2017-03-30 Thread David Kershner
Fixes: 5b6f9b95f7ae ("staging: unisys: visorbus: get rid of create_bus_type.") Kernel day0 testing robot reported a kernel BUG at drivers/base/driver.c! with the following call stack: [ 14.963563] [ cut here ] [ 14.967298] kernel BUG at drivers/base/driver.c:153! [

[PATCH] staging: rtl8188eu: Remove extra spaces

2017-03-30 Thread Alfonso Lima Astor
Coding style problem detected by checkpatch.pl ERROR: space prohibited before that ',' Signed-off-by: Alfonso Lima Astor --- drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c| 2 +- 2 files changed, 2

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-30 Thread SIMRAN SINGHAL
On Fri, Mar 31, 2017 at 1:18 AM, Jonathan Cameron wrote: > > > On 30 March 2017 19:44:26 BST, SIMRAN SINGHAL > wrote: >>On Fri, Mar 31, 2017 at 12:02 AM, Jonathan Cameron >>wrote: >>> On 28/03/17 19:37, Alison Schofield

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-30 Thread Jonathan Cameron
On 30 March 2017 19:44:26 BST, SIMRAN SINGHAL wrote: >On Fri, Mar 31, 2017 at 12:02 AM, Jonathan Cameron >wrote: >> On 28/03/17 19:37, Alison Schofield wrote: >>> On Tue, Mar 28, 2017 at 10:55:17PM +0530, SIMRAN SINGHAL wrote: On Fri, Mar 24,

[PATCH] iio: gyro: adis16060: Change the function's name

2017-03-30 Thread simran singhal
Change the name of function from adis16060_spi_write_than_read() to adis16060_spi_write_then_read(). change "than" to "then" as its time depended. --- drivers/staging/iio/gyro/adis16060_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-30 Thread SIMRAN SINGHAL
On Fri, Mar 31, 2017 at 12:02 AM, Jonathan Cameron wrote: > On 28/03/17 19:37, Alison Schofield wrote: >> On Tue, Mar 28, 2017 at 10:55:17PM +0530, SIMRAN SINGHAL wrote: >>> On Fri, Mar 24, 2017 at 12:51 AM, Alison Schofield >>> wrote: On Fri, Mar

Re: [Outreachy kernel] [PATCH v4] staging: iio: ade7753: Replace mlock with driver private lock

2017-03-30 Thread Jonathan Cameron
On 28/03/17 19:37, Alison Schofield wrote: > On Tue, Mar 28, 2017 at 10:55:17PM +0530, SIMRAN SINGHAL wrote: >> On Fri, Mar 24, 2017 at 12:51 AM, Alison Schofield >> wrote: >>> On Fri, Mar 24, 2017 at 12:05:20AM +0530, simran singhal wrote: The IIO subsystem is

[RFC] [media] imx: assume MEDIA_ENT_F_ATV_DECODER entities output video on pad 1

2017-03-30 Thread Philipp Zabel
The TVP5150 DT bindings specify a single output port (port 0) that corresponds to the video output pad (pad 1, DEMOD_PAD_VID_OUT). Signed-off-by: Philipp Zabel --- I'm trying to get this to work with a TVP5150 analog TV decoder, and the first problem is that this device

Re: [PATCH v6 00/39] i.MX Media Driver

2017-03-30 Thread Russell King - ARM Linux
On Thu, Mar 30, 2017 at 09:12:29AM -0700, Steve Longerbeam wrote: > > > On 03/30/2017 04:02 AM, Russell King - ARM Linux wrote: > >This fails at step 1. The removal of the frame interval support now > >means my setup script fails when trying to set the frame interval on > >the camera: > > >

Re: [PATCH v6 00/39] i.MX Media Driver

2017-03-30 Thread Steve Longerbeam
On 03/30/2017 04:02 AM, Russell King - ARM Linux wrote: This fails at step 1. The removal of the frame interval support now means my setup script fails when trying to set the frame interval on the camera: Enumerating pads and links Setting up format SRGGB8_1X8 816x616 on pad imx219 0-0010/0

Re: [PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread DaeSeok Youn
2017-03-30 19:52 GMT+09:00 Alan Cox : > On Thu, 2017-03-30 at 15:24 +0900, Daeseok Youn wrote: >> The condition line in if-statement is needed to be shorthen to >> improve readability. >> >> Signed-off-by: Daeseok Youn >> --- > > How about a define

[PATCH] staging: rtl8712: code style fix

2017-03-30 Thread Tejaswini
From: Tejaswini Poluri Fixed the warnings from checkpatch.pl on file rtl8712/mlme_linux.c Avoided multiple line dereferences in the code Signed-off-by: Tejaswini Poluri --- drivers/staging/rtl8712/mlme_linux.c | 10 +- 1 file

Re: [REGRESSION][Stable][v3.12.y][v4.4.y][v4.9.y][v4.10.y][v4.11-rc1] scsi: storvsc: properly set residual data length on errors

2017-03-30 Thread Cathy Avery
Hi, So which commit is moving forward and which one is not? f1c635b439a5c01776fe3a25b1e2dc546ea82e6f or 40630f462824ee24bc00d692865c86c3828094e0? We have backported 40630f462824ee24bc00d692865c86c3828094e0 and I am unclear if this is a regression and must be removed or it is a regression

Re: [PATCH v6 00/39] i.MX Media Driver

2017-03-30 Thread Russell King - ARM Linux
This fails at step 1. The removal of the frame interval support now means my setup script fails when trying to set the frame interval on the camera: Enumerating pads and links Setting up format SRGGB8_1X8 816x616 on pad imx219 0-0010/0 Format set: SRGGB8_1X8 816x616 Setting up frame interval

Re: [PATCH v2] staging: comedi: labpc: fix isadma dependency

2017-03-30 Thread Ian Abbott
On 29/03/17 22:10, Arnd Bergmann wrote: When COMEDI_NI_LABPC is built-in and COMEDI_NI_LABPC_ISA is a loadable module, thhe ISA DMA code is not reachable by the common module, causing a link error: drivers/staging/built-in.o: In function `labpc_interrupt': ni_labpc_common.c:(.text+0x1d178):

Re: [PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread Alan Cox
On Thu, 2017-03-30 at 15:24 +0900, Daeseok Youn wrote: > The condition line in if-statement is needed to be shorthen to > improve readability. > > Signed-off-by: Daeseok Youn > --- How about a define for ATOMISP_IS_CHT(isp) instead - as we will need these tests in other

[PATCH v2 21/22] docs-rst: fix usb cross-references

2017-03-30 Thread Mauro Carvalho Chehab
As some USB documentation files got moved, adjust their cross-references to their new place. Signed-off-by: Mauro Carvalho Chehab --- Documentation/ABI/stable/sysfs-bus-usb| 2 +- Documentation/driver-api/usb/URB.rst | 2 ++

Re: [PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread DaeSeok Youn
2017-03-30 16:19 GMT+09:00 walter harms : > > > Am 30.03.2017 08:25, schrieb Daeseok Youn: >> Define new local variable to reduce the number of reference. >> The new local variable is added to save the addess of dfs >> and used in atomisp_freq_scaling() function. >> >>

[PATCH] staging: iio: ad9832: use 4-digit octal permissions

2017-03-30 Thread Guru Das Srinagesh
This fixes the coding style issue of using S_IWUSR in place of 4-digit octal numbers. Issue detected by checkpatch. Signed-off-by: Guru Das Srinagesh --- drivers/staging/iio/frequency/ad9832.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-)

[PATCH] staging/atomisp: fix spelling mistake: "falied" -> "failed"

2017-03-30 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in dev_err error message Signed-off-by: Colin Ian King --- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] staging: bcm2835-camera: fix spelling mistake: "elementry" -> "elementary"

2017-03-30 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in various comments and pr_debug messages Signed-off-by: Colin Ian King --- drivers/staging/vc04_services/bcm2835-camera/mmal-msg.h | 2 +-

Re: [REGRESSION][Stable][v3.12.y][v4.4.y][v4.9.y][v4.10.y][v4.11-rc1] scsi: storvsc: properly set residual data length on errors

2017-03-30 Thread Greg KH
On Tue, Mar 28, 2017 at 04:14:09PM +, Stephen Hemminger wrote: > I decided not to send it to stable since problem was only observed on > 4.11 but it is probably endemic to all GEN2 VM's So, what does this mean? What should stable@ do? Nothing? Ok, now dropped this from my patch queue :)

Re: [PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread walter harms
Am 30.03.2017 08:25, schrieb Daeseok Youn: > Define new local variable to reduce the number of reference. > The new local variable is added to save the addess of dfs > and used in atomisp_freq_scaling() function. > > Signed-off-by: Daeseok Youn > --- >

[PATCH] staging: fbtft: fix type assignment warning

2017-03-30 Thread Alex Wilson
Sparse spits out a warning that a __be16 was being assigned to a u16. Change the type of txbuf16 to __be16 b/c it's a restricted type and prevents mixing endianness. Signed-off-by: Alex Wilson --- drivers/staging/fbtft/fbtft-bus.c | 2 +- 1 file changed, 1

[PATCH] iio:meter:ade7759: Removing use of deprecated macros

2017-03-30 Thread Chen Guanqiao
Removing use of deprecated macros(S_IRUGO, SIWUGO, S_IXUGO), and replaced with 4 gidit octal. Signed-off-by: Chen Guanqiao --- drivers/staging/iio/meter/ade7759.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git

[PATCH 2/2] staging: atomisp: use local variable to reduce the number of reference

2017-03-30 Thread Daeseok Youn
Define new local variable to reduce the number of reference. The new local variable is added to save the addess of dfs and used in atomisp_freq_scaling() function. Signed-off-by: Daeseok Youn --- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 37

[PATCH 1/2] staging: atomisp: simplify the if condition in atomisp_freq_scaling()

2017-03-30 Thread Daeseok Youn
The condition line in if-statement is needed to be shorthen to improve readability. Signed-off-by: Daeseok Youn --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git