[PATCH] unisys: visornic: Replace symbolic perms with octal

2017-04-04 Thread Thomas Jespersen
Replace symbolic permissions S_IRUSR and S_IWUSR for their octal counterparts Signed-off-by: Thomas Jespersen --- drivers/staging/unisys/visornic/visornic_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-04-04 Thread Bjorn Helgaas
On Tue, Apr 04, 2017 at 07:54:33PM +, KY Srinivasan wrote: > > -Original Message- > > From: Bjorn Helgaas [mailto:helg...@kernel.org] > > Sent: Tuesday, April 4, 2017 12:04 PM > > To: KY Srinivasan > > Cc: linux-...@vger.kernel.org; linux-ker...@vger.kernel.org; >

Re: [PATCH RFC] remove custom Michael MIC implementation

2017-04-04 Thread Arend Van Spriel
On 3-4-2017 23:39, Tobin C. Harding wrote: > On Mon, Apr 03, 2017 at 12:15:15PM +0200, Arend Van Spriel wrote: >> seems we are missing out again? > > Sorry, I don't understand what this comment means? My bad. I had to reset my email account in thunderbird and now it needs to learn anew what is

Re: [PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-04-04 Thread Bjorn Helgaas
On Fri, Mar 24, 2017 at 11:06:40AM -0700, k...@exchange.microsoft.com wrote: > From: K. Y. Srinivasan > > Some miscellaneous fixes. > > K. Y. Srinivasan (2): > pci-hyperv: Fix a bug in specifying CPU affinity > pci-hyperv: Fix an atomic bug > >

RE: [PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-04-04 Thread KY Srinivasan
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Tuesday, April 4, 2017 12:04 PM > To: KY Srinivasan > Cc: linux-...@vger.kernel.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; >

Re: [PATCH] drivers/staging/lustre: Replacing 'unsigned' with 'unsigned int'

2017-04-04 Thread Greg Kroah-Hartman
On Tue, Apr 04, 2017 at 03:14:03PM +0530, Pushkar Jambhlekar wrote: > Replacing 'unsigned' with 'unsigned int' Why? You need to explain why you do something, not just say what you did (that should be obvious if you read the patch...) thanks, greg k-h

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

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

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

2017-04-04 Thread Steve Longerbeam
On 04/04/2017 04:10 PM, Russell King - ARM Linux wrote: On Thu, Mar 30, 2017 at 07:25:49PM +0200, Philipp Zabel wrote: 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

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

2017-04-04 Thread Russell King - ARM Linux
On Thu, Mar 30, 2017 at 07:25:49PM +0200, Philipp Zabel wrote: > 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

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

2017-04-04 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 v2 20/24] staging: ks7010: fix checkpatch LOGICAL_CONTINUATIONS

2017-04-04 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 v2 19/24] staging: ks7010: rename identifier packet to skb

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

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

2017-04-04 Thread Steve Longerbeam
On 04/04/2017 05:40 PM, Steve Longerbeam wrote: On 04/04/2017 04:10 PM, Russell King - ARM Linux wrote: On Thu, Mar 30, 2017 at 07:25:49PM +0200, Philipp Zabel wrote: The TVP5150 DT bindings specify a single output port (port 0) that corresponds to the video output pad (pad 1,

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

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

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

2017-04-04 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 v2 09/24] staging: ks7010: fix function return code path

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

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

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

2017-04-04 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 v2 03/24] staging: ks7010:

2017-04-04 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 of type unsigned instead of type signed. Reported-by: Dan Carpenter

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

2017-04-04 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 v2 07/24] staging: ks7010: change static function return type

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

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

2017-04-04 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 v2 08/24] staging: ks7010: separate dissimilar checks

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

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

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

2017-04-04 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 v2 17/24] staging: ks7010: rename RecvMIC to recv_mic

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

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

2017-04-04 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 v2 13/24] staging: ks7010: simplify calls to memcpy()

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

Re: [PATCH RFC] remove custom Michael MIC implementation

2017-04-04 Thread Tobin C. Harding
On Tue, Apr 04, 2017 at 11:31:14PM +0200, Arend Van Spriel wrote: > >> On 3-4-2017 11:50, Toke Høiland-Jørgensen wrote: > >>> "Tobin C. Harding" writes: > >>> > Except one: do you know off the top of your head of a canonical > implementation of a softmac wi-fi driver. >

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

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

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

2017-04-04 Thread Steve Longerbeam
On 03/30/2017 10:25 AM, Philipp Zabel wrote: 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

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

2017-04-04 Thread Tobin C. Harding
On Tue, Apr 04, 2017 at 01:21:33PM +0300, Dan Carpenter wrote: > On Sun, Apr 02, 2017 at 10:18:09AM +1000, Tobin C. Harding wrote: > > 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

RE: [PATCH 0/2] pci-hyperv: Some miscellaneous fixes

2017-04-04 Thread KY Srinivasan
> -Original Message- > From: Bjorn Helgaas [mailto:helg...@kernel.org] > Sent: Tuesday, April 4, 2017 1:39 PM > To: KY Srinivasan > Cc: linux-...@vger.kernel.org; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; o...@aepfle.de; a...@canonical.com; >

[PATCH] drivers/staging: lustre: Avoiding multiple line dereference

2017-04-04 Thread Pushkar Jambhlekar
Making references in single line Signed-off-by: Pushkar Jambhlekar --- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 3 +-- drivers/staging/lustre/lustre/llite/llite_lib.c | 6 ++ drivers/staging/lustre/lustre/mgc/mgc_request.c | 3 +--

[PATCH] drivers/staging/lustre: Replacing 'unsigned' with 'unsigned int'

2017-04-04 Thread Pushkar Jambhlekar
Replacing 'unsigned' with 'unsigned int' Signed-off-by: Pushkar Jambhlekar --- drivers/staging/lustre/lustre/llite/namei.c | 2 +- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 6

Re: [PATCH v2] scsi: storvsc: Add support for FC rport.

2017-04-04 Thread Christoph Hellwig
On Mon, Apr 03, 2017 at 09:14:02AM -0400, Cathy Avery wrote: > On 04/03/2017 08:17 AM, Christoph Hellwig wrote: > > > if (host->transportt == fc_transport_template) { > > > + struct fc_rport_identifiers ids = { > > > + .roles = FC_PORT_ROLE_FCP_TARGET, > > > +

[PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations

2017-04-04 Thread Pushkar Jambhlekar
Adding a blank line after declaration Signed-off-by: Pushkar Jambhlekar --- drivers/staging/lustre/lustre/llite/dcache.c | 1 + drivers/staging/lustre/lustre/llite/namei.c | 1 + drivers/staging/lustre/lustre/llite/symlink.c| 1 +

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

2017-04-04 Thread Michal Hocko
On Mon 03-04-17 11:09:32, Doug Anderson wrote: [...] > Maybe +Michal Hocko would have some opinions of which OOM Reaper > patches would be good for picking into linux stable? I am lacking context here but please note that the OOM reaper patches alone are not sufficient to make the OOM handling

Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations

2017-04-04 Thread Dan Carpenter
On Tue, Apr 04, 2017 at 02:45:26PM +0530, Pushkar Jambhlekar wrote: > diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c > b/drivers/staging/lustre/lustre/obdclass/cl_page.c > index cd9a40c..71fcc4c 100644 > --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c > +++

[PATCH 0/2] staging: comedi: amplc_pci230: replace CLK_CONFIG

2017-04-04 Thread Ian Abbott
Just a couple of minor clean-up patches to remove an unnecessary use of 'inline', and for consistency between gate source and clock source configuration code. 1) staging: comedi: amplc_pci230: remove 'inline' from pci230_gat_config() 2) staging: comedi: amplc_pci230: convert CLK_CONFIG() macro to

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

2017-04-04 Thread Dan Carpenter
On Sun, Apr 02, 2017 at 10:18:09AM +1000, Tobin C. Harding wrote: > 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

[PATCH 1/2] staging: comedi: amplc_pci230: remove 'inline' from pci230_gat_config()

2017-04-04 Thread Ian Abbott
Let the compiler figure out whether `pci230_gat_config()` should be inlined by itself. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/amplc_pci230.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 2/2] staging: comedi: amplc_pci230: convert CLK_CONFIG() macro to function

2017-04-04 Thread Ian Abbott
Convert the `CLK_CONFIG(chan, src)` macro to a static function `pci230_clk_config(chan, src)`. This is consistent with an earlier change to convert `GAT_CONFIG(chan, src)` to a static function. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/amplc_pci230.c | 9

Re: [PATCH] drivers/staging/lustre: Coding-guideline: Missing a blank line after declarations

2017-04-04 Thread Pushkar Jambhlekar
((void)sizeof !!(exp)) => I believe it is for compiler to unflag "unused variable" warning. On Tue, Apr 4, 2017 at 3:08 PM, Dan Carpenter wrote: > On Tue, Apr 04, 2017 at 02:45:26PM +0530, Pushkar Jambhlekar wrote: >> diff --git

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

2017-04-04 Thread Tobin C. Harding
On Tue, Apr 04, 2017 at 01:21:33PM +0300, Dan Carpenter wrote: > On Sun, Apr 02, 2017 at 10:18:09AM +1000, Tobin C. Harding wrote: > > 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

[PATCH 1/2] staging: comedi: amplc_pci224: remove 'inline' from pci224_gat_config()

2017-04-04 Thread Ian Abbott
Let the compiler figure out whether `pci224_gat_confip()` should be inlined by itself. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/amplc_pci224.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 2/2] staging: comedi: amplc_pci224: convert CLK_CONFIG() macro to function

2017-04-04 Thread Ian Abbott
Convert the `CLK_CLKFIG(chan, src)` macro to a static function `pci224_clk_config(chan, src)`. This is consistent with an earlier change to convert `GAT_CONFIG(chan, src)` to a static function. Signed-off-by: Ian Abbott --- drivers/staging/comedi/drivers/amplc_pci224.c | 13

[PATCH 0/2] staging: comedi: amplc_pci224: replace CLK_CONFIG

2017-04-04 Thread Ian Abbott
Just a couple of minor clean-up patches to remove an unnecessary use of 'inline', and for consistency between gate source and clock source configuration code. 1) staging: comedi: amplc_pci224: remove 'inline' from pci224_gat_config() 2) staging: comedi: amplc_pci224: convert CLK_CONFIG() macro to

Re: [PATCH v6 17/39] platform: add video-multiplexer subdevice driver

2017-04-04 Thread Sakari Ailus
Hi Steve, Philipp and Pavel, On Mon, Mar 27, 2017 at 05:40:34PM -0700, Steve Longerbeam wrote: > From: Philipp Zabel > > This driver can handle SoC internal and external video bus multiplexers, > controlled either by register bit fields or by a GPIO. The subdevice >

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

2017-04-04 Thread Doug Anderson
Hi, On Tue, Apr 4, 2017 at 12:40 AM, Michal Hocko wrote: > On Mon 03-04-17 11:09:32, Doug Anderson wrote: > [...] >> Maybe +Michal Hocko would have some opinions of which OOM Reaper >> patches would be good for picking into linux stable? > > I am lacking context here but

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

2017-04-04 Thread Michal Hocko
On Tue 04-04-17 08:10:03, Doug Anderson wrote: > Hi, > > On Tue, Apr 4, 2017 at 12:40 AM, Michal Hocko wrote: [...] > > So the primary question is what are you trying to achieve? > > Ideally it would be nice to bring back patches to make the OOM > handling lockup free.