OSDN Git Service
Elise Lennion [Mon, 17 Oct 2016 02:15:47 +0000 (00:15 -0200)]
staging: rtl8192e: Compress return logic into one line.
Simplify return logic to avoid unnecessary variable assignments.
Coccinelle was used with this semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Mon, 17 Oct 2016 02:17:20 +0000 (00:17 -0200)]
staging: xgifb: Compress return logic into one line.
Simplify return logic to avoid unnecessary variable assignments.
Coccinelle was used with this semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Mon, 17 Oct 2016 02:18:58 +0000 (00:18 -0200)]
staging: vt6656: Compress return logic into one line.
Compress the return logic into one line avoids unnecessary variable
declarations. In this case it also makes it easier to understand the
function.
Coccinelle was used to find this return statement. However, additional
compressions were done to make the function clearer.
Semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Sat, 15 Oct 2016 22:41:14 +0000 (01:41 +0300)]
Staging: unisys: visorbus: Make a read-only structure
This patch add const qualifier at the declaration of the structure.
The structure become a read-only data, this increase the security.
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sabitha George [Sun, 16 Oct 2016 16:14:26 +0000 (21:44 +0530)]
staging: ks7010: Remove braces around single statement blocks
Fixes checkpatch warning: braces{} are not necessary for
single statment blocks
Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sabitha George [Sun, 16 Oct 2016 16:12:44 +0000 (21:42 +0530)]
staging: ks7010: Add blank line after declarations
Fixes checkpatch.pl warning :Missing a blank line
after declarations
Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Sat, 15 Oct 2016 22:26:26 +0000 (19:26 -0300)]
staging: wilc1000: Remove unnecessary extern variables.
Extern variables and functions used in only one file were removed
from .h files, and made static in the .c files they're used.
Extern variable wilc_initialized was declared and never used, so it was
removed.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Sat, 15 Oct 2016 21:55:22 +0000 (00:55 +0300)]
Staging: vt6656: Make a read-only structure
This patch add const qualifier at the declaration of the structure.
The structure become a read-only data, this increase the security.
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Laurent Navet [Sat, 15 Oct 2016 09:50:11 +0000 (11:50 +0200)]
staging: unisys: visorbus: add missing include
this removes lots of sparse warnings :
warning: symbol 'visorchannel_destroy' was not declared. Should it be static?
warning: symbol 'visorchannel_get_physaddr' was not declared. Should it be static?
warning: symbol 'visorchannel_get_nbytes' was not declared. Should it be static?
warning: symbol 'visorchannel_uuid_id' was not declared. Should it be static?
warning: symbol 'visorchannel_id' was not declared. Should it be static?
warning: symbol 'visorchannel_zoneid' was not declared. Should it be static?
warning: symbol 'visorchannel_get_clientpartition' was not declared. Should it be static?
warning: symbol 'visorchannel_set_clientpartition' was not declared. Should it be static?
warning: symbol 'visorchannel_read' was not declared. Should it be static?
warning: symbol 'visorchannel_write' was not declared. Should it be static?
warning: symbol 'visorchannel_get_header' was not declared. Should it be static?
warning: symbol 'visorchannel_create' was not declared. Should it be static?
warning: symbol 'visorchannel_create_with_lock' was not declared. Should it be static?
Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mikhail Golubev [Fri, 14 Oct 2016 08:58:08 +0000 (11:58 +0300)]
staging:vt6656:baseband.h: fix function definition argument without identifier name issue
Function definitions arguments should also have an identifier name as
reported by checkpatch.pl.
Signed-off-by: Mikhail Golubev <golubev.mikhail@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Sat, 15 Oct 2016 00:35:13 +0000 (21:35 -0300)]
staging: dgnc: Add const qualifier to struct declaration.
Const qualifier added to struct declaration to avoid data overwrite
during runtime and improve security.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Sat, 15 Oct 2016 00:32:03 +0000 (21:32 -0300)]
staging: sm750fb: Add const qualifier to struct declaration.
Const qualifier added to struct declaration to avoid data overwrite
during runtime and improve security.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sat, 15 Oct 2016 06:13:48 +0000 (11:43 +0530)]
Staging: android: ion: constify dma_buf_ops structure
The dma_buf_ops structure is stored in the ops field of a
dma_buf_export_info structure and also used as a condition inside the
if() statement. The if condition does not modify its value and the
ops field is of type const struct *dma_buf_ops, so dma_buf_ops
structures having this property can be declared as const.
File size before:
text data bss dec hex filename
14471 819 224 15514 3c9a
drivers/staging/android/ion/ion.o
File size after:
text data bss dec hex filename
14599 707 224 15530 3caa
drivers/staging/android/ion/ion.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bhumika Goyal [Sat, 15 Oct 2016 06:58:01 +0000 (12:28 +0530)]
Staging: greybus: uart: constify tty_port_operations structure
Declare tty_port_operations structure as const as it is only stored in
the ops field of a tty_port structure which is a field of a gb_tty
structure. The ops field is of type const struct tty_port_operations *,
so tty_port_operations structures having this property can be
declared as const.
Done using Coccinelle:
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct tty_port_operations i@p = {...};
@ok1@
identifier r1.i;
position p;
struct gb_tty q;
@@
q.port.ops=&i@p
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct tty_port_operations i={...};
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct tty_port_operations i;
File size before:
text data bss dec hex filename
7646 512 56 8214 2016 drivers/staging/greybus/uart.o
File size after:
text data bss dec hex filename
7710 448 56 8214 2016 drivers/staging/greybus/uart.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: Johan Hovold <johan@kernel.org>
Reviewed-by: David Lin <dtwlin@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Sun, 16 Oct 2016 08:49:48 +0000 (14:19 +0530)]
staging: greybus: es2: Use kmemdup instead of kmalloc and memcpy
This patch replaces kmalloc and memcpy with kmemdup for duplication of
memory.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Pankaj Bharadiya [Sun, 16 Oct 2016 09:59:14 +0000 (15:29 +0530)]
staging: greybus: audio: Rename cport with intf_id
gb_audio_manager_module_descriptor's cport field is actually used to
manage and pass interface id to user space.
Thus rename gb_audio_manager_module_descriptor's 'cport' field and
few other things to avoid confusion.
Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Thu, 13 Oct 2016 08:52:02 +0000 (11:52 +0300)]
Staging: lustre: indent an if statement
This if statement wasn't intended.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sabitha George [Thu, 13 Oct 2016 17:06:23 +0000 (22:36 +0530)]
staging: ks7010: Fixes warning :do not add new typedefs
Fixes checkpatch.pl warning: do not add new typedefs in
ks_wlan_net.c
Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sabitha George [Thu, 13 Oct 2016 17:02:20 +0000 (22:32 +0530)]
staging: ks7010: Replace __attribute__(aligned(x)) with __aligned(x)
Fixes checkpatch.pl warning: __aligned(size) is preferred over
__attribute__((aligned(size)) in ks7010_sdio.h
Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Thu, 13 Oct 2016 22:27:17 +0000 (19:27 -0300)]
staging: sm750fb: Remove unnecessary comments.
Remove function comments that only restate the function name.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Thu, 13 Oct 2016 22:25:52 +0000 (19:25 -0300)]
staging: sm750fb: Replace functions CamelCase naming with underscores.
Replace CamelCase function names with underscores to comply with
the standard kernel coding style.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Thu, 13 Oct 2016 22:40:04 +0000 (19:40 -0300)]
staging: greybus: audio_codec: Remove useless return statement.
Remove return statement that is immediately followed by the function
closing bracket.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Thu, 13 Oct 2016 21:00:51 +0000 (00:00 +0300)]
Staging: wilc1000: Compress return logic into one line
Simplify function returns by merging assignment and return into
one command line.
Delete unnecesarry return variable.
Found with Coccinelle
@@
expression e, ret;
@@
-ret =
+return
e;
-return ret
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Thu, 13 Oct 2016 16:45:59 +0000 (19:45 +0300)]
Staging: netlogic: Compress return logic into one line
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Thu, 13 Oct 2016 15:27:31 +0000 (18:27 +0300)]
Staging: rtl8188eu: hal: Compress return logic into one line
Simplify function returns by merging assignment and return into
one command line.
Found with Coccinelle
@@
expression e, ret;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Thu, 13 Oct 2016 22:59:54 +0000 (04:29 +0530)]
Staging: vt6655: Removes unused macros.
This patch removes the macros BBvClearFOE and BBvSetFOE. As they are not
used anywhere else.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Thu, 13 Oct 2016 18:59:22 +0000 (00:29 +0530)]
staging: vt6655: Adding space around '<<'
This patch fixes the checkpatch issue by adding space around '<<'.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Thu, 13 Oct 2016 18:47:22 +0000 (00:17 +0530)]
staging: vt6655: Adding space around '+'
This patch fixes the checkpatch issue by adding space around the
operator '+'.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mikhail Golubev [Wed, 12 Oct 2016 14:57:49 +0000 (17:57 +0300)]
staging:vt6656:card.c: fix block comments should align the * on each line
Block comments should align the * on each line as reported by checkpatch.pl
Signed-off-by: Mikhail Golubev <golubev.mikhail@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Alemayhu [Thu, 13 Oct 2016 03:57:20 +0000 (05:57 +0200)]
staging: i4l: pcbit: replace some include asm/*.h with linux/*.h
Fixes the following checkpatch output:
./pcbit/capi.c:39: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
./pcbit/capi.c:40: WARNING: Use #include <linux/string.h> instead of <asm/string.h>
./pcbit/callbacks.c:25: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
./pcbit/layer2.c:39: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
./pcbit/drv.c:34: WARNING: Use #include <linux/string.h> instead of <asm/string.h>
./pcbit/drv.c:35: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
./pcbit/edss1.c:26: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
Signed-off-by: Alexander Alemayhu <alexander@alemayhu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Metzger [Wed, 12 Oct 2016 19:50:14 +0000 (12:50 -0700)]
staging: greybus: timesync.c: Fixed WARNING for brace issue
Removed a checkpatch warning for braces on single argument if and else
statement.
Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Wed, 12 Oct 2016 17:16:34 +0000 (14:16 -0300)]
staging: greybus: arche-platform: Format block comments.
Fix checkpatch warning:
WARNING: Block comments use a trailing */ on a separate line
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Wed, 12 Oct 2016 17:14:14 +0000 (14:14 -0300)]
staging: greybus: camera: Use kcalloc for array's memory allocation.
Fix checkpatch warning:
WARNING: Prefer kcalloc over kzalloc with multiply
kcalloc is designed to allocate memory for arrays, its use is
preferable than kzalloc in these cases.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Wed, 12 Oct 2016 17:13:01 +0000 (14:13 -0300)]
staging: greybus: camera: Replace blank spaces with tabstops.
Fix checkpatch warning:
WARNING: Statements should start on a tabstop
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Wed, 12 Oct 2016 17:11:31 +0000 (14:11 -0300)]
staging: greybus: camera: Add blank lines after variable declarations.
Fix checkpatch warning:
WARNING: Missing a blank line after declarations
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:57:01 +0000 (21:57 +0000)]
staging: rts5208: rtsx.c: Alignment fix
Line goes too long when aligned with parenthesis, so moved to a new line
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:57:00 +0000 (21:57 +0000)]
staging: rts5208: rtsx_chip.c: Long lines
Fix lines that go over 80 characters to stop warnings from checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:59 +0000 (21:56 +0000)]
staging: rts5208: rtxs_chip.h: Long lines
Move comments above long definitions so they don't go over 80 characters
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:58 +0000 (21:56 +0000)]
staging: rts5208: rtsx_scsi.h: Long lines
Aligning with parenthesis causes lines to go too long, so the
parenthesis are on a new line
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:57 +0000 (21:56 +0000)]
staging: rts5208: CamelCase fix
Change label to not use camel case per checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:56 +0000 (21:56 +0000)]
staging: rts5208: ms.c: Braces fix
Add braces to all arms of if statement
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:55 +0000 (21:56 +0000)]
staging: rts5208: ms.c: Multiple assignments
Fix check found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:54 +0000 (21:56 +0000)]
staging: rts5208: ms.c: Long Lines
Fix long lines detected by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:53 +0000 (21:56 +0000)]
staging: rts5208: ms.c: Parenthesis alignment
Fix checkpatch messages: Alignment should match open parenthesis
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:52 +0000 (21:56 +0000)]
staging: rts5208: ms.h: Parenthesis alignment
Fix alignment to match open parenthesis
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:51 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: Alloc sizeof struct
Satisfy checkpatch message: Prefer kzalloc(sizeof(*dev->chip)...) over
kzalloc(sizeof(struct rtsx_chip)...)
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:50 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: Spacing
Remove blank line after opening {
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:49 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: CamelCase
Make camel case labels all lowercase
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:48 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: Spacing
Add spaces around operator for readability
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:47 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: Multiple assignments
Fix multiple assignments found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:46 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: Alignment
Fix to match open parenthesis in order to satisfy checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:45 +0000 (21:56 +0000)]
staging: rts5208: rtsx.c: Unnecessary parentheses
Remove parentheses found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:44 +0000 (21:56 +0000)]
staging: rts5208: Comparison to NULL
Fix to resolve checkpatch message
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:43 +0000 (21:56 +0000)]
staging: rts5208: Spacing
Adding space around operator for better readability and to stop
checkpatch check messages
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:42 +0000 (21:56 +0000)]
staging: rts5208: Unnecessary parentheses
Remove parentheses found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:41 +0000 (21:56 +0000)]
staging: rts5208: Parenthesis alignment
Fix alignment to stop checkpath check messages
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:40 +0000 (21:56 +0000)]
staging: rts5208: Unecessary parantheses
Remove parentheses to stop checkpatch check message
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:39 +0000 (21:56 +0000)]
staging: rts5208: Parenthesis alignment
Matching open parenthesis
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:38 +0000 (21:56 +0000)]
staging: rts5208: Prefer using BIT macro
Replace all instances of (1 << x) with BIT(x) to satisfy checkpatch
check messages
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:37 +0000 (21:56 +0000)]
staging: rts5208: Long lines fixes
Break up long lines in rtsx_chip.h
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:36 +0000 (21:56 +0000)]
staging: rts5208: Alignment fixes
Fix alignment issues that checkpatch found
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:35 +0000 (21:56 +0000)]
staging: rts5208: Add space around operator
Spaces are preferred around operators for readability
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:34 +0000 (21:56 +0000)]
staging: rts5208: Add braces to if()
Braces should be around every part of the if block and not just the else
if
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:33 +0000 (21:56 +0000)]
staging: rts5208: Remove multiple assignment
Assign values to variables on their own lines instead of using multiple
assignment
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:32 +0000 (21:56 +0000)]
staging: rts5208: CamelCase fixes
Change camel case variables found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:31 +0000 (21:56 +0000)]
staging: rts5208: Remove parentheses
Unnecessary parentheses found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:30 +0000 (21:56 +0000)]
staging: rts5208: Alignment fixes
Align to match open parenthesis, found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:29 +0000 (21:56 +0000)]
staging: rts5208: Fix typo in function name
Searched the entire kernel for any references to this function and it
appears safe to fix the typo
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:28 +0000 (21:56 +0000)]
staging: rts5208: Alignment fix
Fix issue found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:27 +0000 (21:56 +0000)]
staging: rts5208: Unnecessary parentheses cleanup
Remove parentheses found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:26 +0000 (21:56 +0000)]
staging: rts5208: Alignment fixes
Cleaning up checkpatch issues
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:25 +0000 (21:56 +0000)]
staging: rts5208: sd.c: Spacing cleanup
Add/remove spaces to make things more readable
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:24 +0000 (21:56 +0000)]
staging: rts5208: sd.c: Fix logical continuations
Checkpatch detected && at the beginning of new lines
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:23 +0000 (21:56 +0000)]
staging: rts5208: sd.c: CamelCase fixes
Convert camel case lables to all lowercase
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:22 +0000 (21:56 +0000)]
staging: rts5208: sd.c: Long line fixes
Break up lines over 80 characters
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:21 +0000 (21:56 +0000)]
staging: rts5208: sd.c: Alignment fixes
Lining up with open parenthesis found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:20 +0000 (21:56 +0000)]
staging: rts5208: sd.c: Remove unnecessary parentheses
Cleanup of &(chip->sd_card) to remove parentheses where they are not
needed
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:19 +0000 (21:56 +0000)]
staging: rts5208: sd.h: Alignment fixes
Lining up code with open parenthses found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:18 +0000 (21:56 +0000)]
staging: rts5208: spi.c: Alignment fixes
Lining up code with open parantheses found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Wayne Porter [Tue, 11 Oct 2016 21:56:17 +0000 (21:56 +0000)]
staging: rts5208: spi.c: Remove unnecessary parenthesis
Style warnings found by checkpatch
Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sabitha George [Mon, 10 Oct 2016 17:54:10 +0000 (23:24 +0530)]
staging: ks7010: Fixes error "foo * bar should be foo *bar"
Fixes checkpatch warning on ks_wlan_net.c:
foo * bar should be foo *bar
Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sabitha George [Mon, 10 Oct 2016 17:53:15 +0000 (23:23 +0530)]
staging: ks7010: Replace asm/uaccess.h and asm/atomic.h
Replaces inclusion of asm/uaccess.h with linux/uaccess.h
and asm/atomic.h with linux/atomic.h in ks_wlan_net.c
Signed-off-by: Sabitha George <sabitha.george@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Metzger [Tue, 11 Oct 2016 23:22:45 +0000 (16:22 -0700)]
drivers: staging: greybus: audio_manager_sysfs.c: Fixed CHECK for brace issue
Added braces to else and else if statements where checkpatch complained.
Signed-off-by: Chase Metzger <chasemetzger15@gmail.com>
Reviewed-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Tue, 11 Oct 2016 16:54:42 +0000 (19:54 +0300)]
Staging: wilc1000: Replace memcpy by ether_addr_copy
This patch fixes the following checkpatch.pl warning: Prefer
ether_addr_copy() over memcpy() if the Ethernet addresses are
__aligned(2)
According to ether_addr_copy() description and functionality, all
Ethernet addresses should align to the u16 datatype.
Here is the output of pahole for the relevant datastructures:
struct del_sta {
u8 mac_addr[6]; /* 0 6 */
/* size: 6, cachelines: 1, members: 1 */
/* last cacheline: 6 bytes */
};
struct sta_inactive_t {
u8 mac[6]; /* 0 6 */
/* size: 6, cachelines: 1, members: 1 */
/* last cacheline: 6 bytes */
};
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Wed, 12 Oct 2016 04:36:46 +0000 (10:06 +0530)]
staging: vt6655: Adding space around '*'
This patch fixes the checkpatch issue by adding space around '*'.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Varsha Rao [Tue, 11 Oct 2016 13:35:46 +0000 (19:05 +0530)]
staging: vt6655: Removes the FSF mailing address.
This patch fixes the checkpatch issue by removing the Free Software
Foundation's mailing address from the sample GPL notice. Because the FSF
has changed address in the past, and may change again. Linux already
includes a copy of the GPL.
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Tue, 11 Oct 2016 08:15:03 +0000 (11:15 +0300)]
Staging: media: lirc: Use unsigned int instead unsigned
This patch fixes a WARNING: Prefer 'unsigned int' to bare use of
'unsigned', found by checkpatch.pl. By fixing this the types of the
parameters become more explicit.
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mihaela Muraru [Wed, 12 Oct 2016 07:18:48 +0000 (10:18 +0300)]
Staging: media: omap4iss: Unnecessary KERN_ERR
This patch remove unnecessary KERN_ERR in WARN() within iss_csi2.c
Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sayli karnik [Mon, 10 Oct 2016 16:23:10 +0000 (21:53 +0530)]
staging: wlan-ng: cfg80211: Remove unnecessary parentheses around variables
The patch fixes the checkpatch.pl check:
CHECK: Unnecessary parentheses around variable
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Oct 2016 14:02:22 +0000 (16:02 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in prism2sta.c
sizeof(*var) instead of sizeof(struct XXX) is preferred.
Fix them in prism2sta.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Oct 2016 14:02:21 +0000 (16:02 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in p80211netdev.c
sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix them in p80211netdev.c
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Oct 2016 14:02:20 +0000 (16:02 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in p80211conv.c
sizeof(*var) instead of sizeof(struct XXX) is preferred.
Fix it in p80211conv.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Oct 2016 14:02:19 +0000 (16:02 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in hfa384x_usb.c
sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix it in hfa384x_usb.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sergio Paracuellos [Mon, 10 Oct 2016 14:02:18 +0000 (16:02 +0200)]
staging: wlan-ng: Replace data type declaration with variable of same type in cfg80211.c
sizeof(var) instead of sizeof(struct XXX) is preferred.
Fix it in cfg80211.c file.
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elizabeth Ferdman [Wed, 12 Oct 2016 02:29:20 +0000 (19:29 -0700)]
staging: sm750fb: compress return logic
Using Coccinelle script, compress return logic to return a value
directly rather than doing an assignment and returning the variable.
Remove unnecessary variable declaration by hand.
Coccinelle script:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elise Lennion [Tue, 11 Oct 2016 22:43:07 +0000 (19:43 -0300)]
staging: sm750fb: Merge ddk750_help.* into ddk750_chip.*.
The file ddk750_help.c contained only one function declaration,
so it was merged into ddk750_chip.c to simplify the driver.
Also, ddk750_help.h was merged into ddk750_chip.h to keep consistency.
With these changes a few global variables are removed and the function
ddk750_set_mmio is rewritten, so its purpose in the code is clearer.
Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Mon, 10 Oct 2016 14:14:19 +0000 (08:14 -0600)]
staging: comedi: ni_mio_common: split out ao arming from ni_ao_inttrig
AO device arming was previously done as a part of ni_ao_inttrig which is
called as a result of the user calling comedi_internal_trigger. For
start_src == TRIG_EXT, this does not make very much sense since external
triggers should not conceptually need to be software triggered also. This
patch splits out the arming functionality to allow arming to specifically
and separately be done via the CONFIG_INSN_ARM ioctl command.
In order to provide backwards compatibility, this patch also provides
automatic arming if ni_ao_inttrig is simply called.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Sat, 8 Oct 2016 21:38:43 +0000 (15:38 -0600)]
staging: comedi: make constants slightly more consistent
This makes INSN_CONFIG_DIO_{INPUT,OUTPUT,OPENDRAIN} simply be copies of the
already-existing constants COMEDI_INPUT, COMEDI_OUTPUT, and
COMEDI_OPENDRAIN.
This change also ensures that if a user happens to use, for example,
COMEDI_INPUT in place of where INSN_CONFIG_DIO_INPUT, the result will
always be the same and also acceptable and correct usage.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Spencer E. Olson [Sat, 8 Oct 2016 21:37:29 +0000 (15:37 -0600)]
staging: comedi: porting NI_GPCT constants from comedi.org module
Information pertaining to the NI_GPCT_ARM* registers were added to the
comedi.org version of the comedi kernel. This adds this information to
the staging-tree version of the comedi kernel. Relevant comments are also
copied over.
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gustavo A. R. Silva [Tue, 11 Oct 2016 08:40:01 +0000 (01:40 -0700)]
Staging: fbtft: Fix too many leading tabs warning
This is a patch to the fb_agm1264k-fl.c file that fixes up the following
issue:
WARNING: Too many leading tabs - consider code refactoring
Add new function iterate_diffusion_matrix() to refactor a piece of code
inside write_vmem().
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>