Function uses identifier 'rc' for the error return code to a function
call. Other places in the driver use 'ret' because it is more common
within the kernel. Local variable 'ret' does not need to be defined to
zero when it is declared. Function call site using 'ret' needs
refactoring, checkpatch em
Function tx_device_task() is a candidate for refactoring. Checkpatch
emits a number of warnings/checks for this function.
Patch 01 inverts if statement conditional and reduces the level of
nesting.
Patch 02 renames rc -> ret, fixes function call and checkpatch WARNING.
Patch 03 fixes function ar
Checkpatch emits CHECK: Alignment should match open parenthesis.
Align function arguments correctly.
Signed-off-by: Tobin C. Harding
---
drivers/staging/ks7010/ks7010_sdio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks7010_sdio.c
b/drivers/stagi
Code is unnecessarily nested. Function body is guarded by an if
statement, we can invert the if statement conditional and return,
subsequent code can have the indentation reduced.
Invert conditional, change '&&' to '||' , '>' to '<=' and '!=' to
'=='. Return if new conditional evaluates to true. R
Hi!
> > I do agree with you that MC places a lot of burden on the user to
> > attain a lot of knowledge of the system's architecture.
>
> Setting up the pipeline is not the hard part. One could write a
> script to do that.
Can you try to write that script? I believe it would solve big part of
t
Checkpatch emits WARNING: else is not generally useful after a break
or return. Two warnings of this type are emitted, both are correct,
'else' statements are unnecessary.
Remove unnecessary 'else' statements, reduce indentation in subsequent
code.
Signed-off-by: Tobin C. Harding
---
drivers/st
Multi-way decision contains two branches that can never be
executed. Statement starts with a convoluted variable assignment
('enabled') then branches on the value of this variable. Variable can
only take values 0 or 1, this variable is unnecessary.
Remove unnecessary variable. Remove two branches
Checkpatch emits multiple WARNING: Avoid multiple line
dereference. Patch to fix these warnings also illuminates another
function call with smelly code layout, we should fix this too so as to
ease review.
Move dereference to single line, do this 4 times, each fixing a
checkpatch warning. Remove un
File ks_wlan_net.c emits various warnings/checks when parsed with
checkpatch. An inaccessible execution patch also exists within the
file, this was found while preparing for code cleanup.
Patch 01 removes the inaccessible execution path code.
Patch 02 moves a non-null pointer check to be before t
Pointer is dereferenced before the null check. Pointer variable is set
(using a cast) to point to a function argument, the pointer is then
dereferenced before it is checked for non-null.
Move null check to before the dereference.
Signed-off-by: Tobin C. Harding
---
drivers/staging/ks7010/ks_wla
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
-remove/20170326-180444
base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: x86_64-randconfig-x016-201713 (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
The following changes since commit 4495c08e84729385774601b5146d51d9e5849f81:
Linux 4.11-rc2 (2017-03-12 14:47:08 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/
tags/staging-4.11-rc4
for you to fetch changes up to 43c49938bf7
Hi Pavel,
On Tuesday 14 Mar 2017 19:26:35 Pavel Machek wrote:
> Hi!
>
> >> Mid-layer is difficult... there are _hundreds_ of possible
> >> pipeline setups. If it should live in kernel or in userspace is a
> >> question... but I don't think having it in kernel helps in any way.
> >
> > Mid-layer
Hi Hans,
On Tuesday 14 Mar 2017 08:55:36 Hans Verkuil wrote:
> On 03/14/2017 04:45 AM, Mauro Carvalho Chehab wrote:
> > Hi Sakari,
> >
> > I started preparing a long argument about it, but gave up in favor of a
> > simpler one.
> >
> > Em Mon, 13 Mar 2017 14:46:22 +0200 Sakari Ailus escreveu:
>
Currently, the only hd controller supported by Greybus is the es2
controller which only support is mainly a bridge between USB and UniPro.
In order to use Greybus on devices that do not support UniPro,
add a the Greybus netlink hd controller.
By using Generic Netlink, userspace can act as a bridge
Currently, there is no way to remove the SVC.
It was fine because the SVC was tied the es2 controller,
and so removing the es2 controller device was removing the SVC.
But the case of netlink, the SVC is emulated in userspace and
it may be stopped or restarted. But because on the next run,
it won't
The cport_quiesce() method is mandatory in the case of
the es2 Greybus hd controller to shutdown the cports on
the es2 controller.
In order to add support of another controller which may not
need to shutdown its cports, make the cport_quiesce() optional,
and check if the controller implement it bef
Currently, only the es2 hd controller is supported, which restrict the
usage of greybus to few products.
This series intents to add a support of new hd controllers.
The driver doesn't support any hardware. Actually, the controller is just
a bridge between Greybus kernel and userspace. The real dr
Hi Arushi,
Thank you for the patch.
On Friday 24 Mar 2017 21:31:45 Arushi Singhal wrote:
> This patch replaces bit shifting on 1 with the BIT(x) macro.
> This was done with coccinelle:
> @@
> constant c;
> @@
>
> -1 << c
> +BIT(c)
>
> Signed-off-by: Arushi Singhal
Acked-by: Laurent Pinchart
Em Sun, 26 Mar 2017 20:57:02 +0300
Laurent Pinchart escreveu:
> Hi Arushi,
>
> Thank you for the patch.
>
> On Friday 24 Mar 2017 21:31:45 Arushi Singhal wrote:
> > This patch replaces bit shifting on 1 with the BIT(x) macro.
> > This was done with coccinelle:
> > @@
> > constant c;
> > @@
> >
If statement conditional chains multiple logical AND's and OR's
together making the code overly complex to read. The same condition
appears in each and every OR'ed statement. This logic can be more
easily represented by simply checking the value of this condition
initially and returning if it evalu
Of the 8088 instances of 'struct sk_buff *' within net/ 6670 are
named 'skb'. This is a strong indication that the identifier 'sbk' is
better suited when naming sk_buff pointer variables than 'packet'.
Rename identifier 'packet' to 'skb'.
Signed-off-by: Tobin C. Harding
---
drivers/staging/ks7
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.
Add variable, separate similar logical continuations int
Function uses magic number 8. Number refers to the micael mic
length. It would be better to define and use a global constant. Other
driver code in the kernel uses the name MICHAEL_MIC_LEN for the same
task.
Define global constant MICHAEL_MIC_LEN to be 8. Replace magic number 8
with newly defined c
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
b/dr
Checkpatch emits various warnings/checks when parsing ks_hostif.c. A
number of these relate to the implementation of Michael MIC. This
patch set cleans up code around the function calls using Michael MIC,
including the whole of the function hostif_data_request().
Driver uses a custom implementatio
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 | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ks7010/
Function uses magic number 12. Number is used for a block of two
802.11 MAC ethernet addresses. There is already a global constant
ETH_ALEN defined to the number of octets in an 802.11 MAC ethernet
address. The header file containing this definition is already
included.
include/uapi/linux/if_ether
Smatch emits warn: variable dereferenced before check 'skb'.
This is not strictly a bug because the null check is not for
error checking but rather for a decision branch later in the code. However
it is still cleaner to have the code that does the null check to be
placed before the dereference.
Mo
Driver uses custom Michael MIC implementation. There is already an
implementation within the kernel (net/mac80211). There is one other
driver already using the kernel implementation
(drivers/net/wireless/intersil/orinoco). The switch to the kernel
implementation is, however, non-trivial. orinoco pr
Some function comments are unnecessary. There is some commented out
code, it should be removed. Some comments say what the code is doing
(instead of why), these comments are unnecessary.
Clean up comments.
Signed-off-by: Tobin C. Harding
---
drivers/staging/ks7010/ks_hostif.c | 14 ++---
Function uses magic number 6. Number refers to the number of octets in
an 802.11 MAC ethernet address and as such, already has a global
constant defined ETH_ALEN (header is already included).
include/uapi/linux/if_ether.h
define ETH_ALEN6 /* Octets in one ethernet addr */
Replace
Function contains two sites where arithmetic expressions are used as
function argument. Readability would be increased if these were
factored out to a variable assignment then the variable used as
function argument.
Add variable and assign to it the result of arithmetic
expression. Replace complex
On 03/26/2017 12:58 PM, Alexandre Bailon wrote:
Currently, only the es2 hd controller is supported, which restrict the
usage of greybus to few products.
This series intents to add a support of new hd controllers.
The driver doesn't support any hardware. Actually, the controller is just
a bridge
> -Original Message-
> From: Colin King [mailto:colin.k...@canonical.com]
> Sent: Saturday, March 25, 2017 10:17 AM
> To: KY Srinivasan ; Haiyang Zhang
> ; Stephen Hemminger ;
> de...@linuxdriverproject.org; net...@vger.kernel.org
> Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.k
> -Original Message-
> From: Colin King [mailto:colin.k...@canonical.com]
> Sent: Saturday, March 25, 2017 10:27 AM
> To: KY Srinivasan ; Haiyang Zhang
> ; Stephen Hemminger ;
> de...@linuxdriverproject.org; net...@vger.kernel.org
> Cc: kernel-janit...@vger.kernel.org; linux-ker...@vger.k
Driver predominately uses the identifier 'ret' for the error return
code. Function uses 'retval' for this task. It is cleaner if we use a
single name for a single task.
Rename 'retval' to 'ret'.
Signed-off-by: Tobin C. Harding
---
drivers/staging/ks7010/ks7010_sdio.c | 25 +++---
Code is able to have white space refactoring after previous patch
reduced the level of indentation. Doing so fixes two checkpatch
multiple line dereference.
Concatenate multiple line function calls when doing so will not take
character count over 80 characters. Remove multiple line dereference
eve
Checkpatch emits several warnings when parsing the function
ks_sdio_interrupt(). Function lends itself to being refactored.
Patch 01 renames identifier 'retval' to 'ret' in line with the rest of
the driver.
Patch 02 inverts if statement conditional and reduces the level of
indentation in subseque
Bulk of function is guarded by an if statement. If we invert the
conditional and return, the subsequent code can be indented one level
less.
Invert if statement conditional. '>=' to '<'. Jump to goto label if
new conditional evaluates to true. Do not change program logic.
Signed-off-by: Tobin C.
Hi Arushi,
[auto build test ERROR on next-20170323]
[cannot apply to linuxtv-media/master v4.9-rc8 v4.9-rc7 v4.9-rc6 v4.11-rc4]
[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/Arushi-Singhal/stag
On Thu, 23 Mar 2017 14:31:53 +0100
Greg Kroah-Hartman wrote:
> On Wed, Mar 22, 2017 at 01:33:39PM +1100, Eddie Youseph wrote:
> > Fixed checkpatch WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> >
> > Signed-off-by: Eddie Youseph
> > ---
> > Changes in v2:
> > - Added changelog
>
This reverts previous changes to checkpatch warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
---
Changes in v2:
- Added changelog
Changes in v3:
- Revert changes to using bare unsigned
drivers/staging/media/bcm2048/radio-bcm2048.c | 44 +--
44 matches
Mail list logo