Commit graph

633483 commits

Author SHA1 Message Date
Wayne Porter 911e84a09a 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>
2016-10-16 10:27:01 +02:00
Wayne Porter 117b6038b2 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>
2016-10-16 10:27:00 +02:00
Wayne Porter e379c79bae 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>
2016-10-16 10:26:59 +02:00
Wayne Porter f5becff728 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>
2016-10-16 10:26:58 +02:00
Wayne Porter 5d2de0d9b7 staging: rts5208: Parenthesis alignment
Matching open parenthesis

Signed-off-by: Wayne Porter <wporter82@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:57 +02:00
Wayne Porter 2c6b3b9347 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>
2016-10-16 10:26:56 +02:00
Wayne Porter 15794518d7 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>
2016-10-16 10:26:55 +02:00
Wayne Porter 33f28123af 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>
2016-10-16 10:26:54 +02:00
Wayne Porter 3f19de3681 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>
2016-10-16 10:26:53 +02:00
Wayne Porter 44000fe6f1 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>
2016-10-16 10:26:52 +02:00
Wayne Porter f4bfffb959 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>
2016-10-16 10:26:51 +02:00
Wayne Porter 904af7d5b5 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>
2016-10-16 10:26:50 +02:00
Wayne Porter 33a1b1cd2e 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>
2016-10-16 10:26:49 +02:00
Wayne Porter 3b8cd5aa17 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>
2016-10-16 10:26:48 +02:00
Wayne Porter 7fb7a2fc40 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>
2016-10-16 10:26:47 +02:00
Wayne Porter ea2030d5ae 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>
2016-10-16 10:26:46 +02:00
Wayne Porter c3cca2d1b4 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>
2016-10-16 10:26:45 +02:00
Wayne Porter 5426c164ff 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>
2016-10-16 10:26:44 +02:00
Wayne Porter fe421a75ec 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>
2016-10-16 10:26:43 +02:00
Wayne Porter 3c3776441f 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>
2016-10-16 10:26:42 +02:00
Wayne Porter 57a3fcfa6b 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>
2016-10-16 10:26:41 +02:00
Wayne Porter 7fbe04f1ce 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>
2016-10-16 10:26:40 +02:00
Wayne Porter 20390dc72e 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>
2016-10-16 10:26:39 +02:00
Wayne Porter 33f2b12165 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>
2016-10-16 10:26:37 +02:00
Wayne Porter e78bff3266 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>
2016-10-16 10:26:36 +02:00
Wayne Porter 8c3c144bff 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>
2016-10-16 10:26:35 +02:00
Wayne Porter 4669f6e275 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>
2016-10-16 10:26:34 +02:00
Sabitha George 96268418f9 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>
2016-10-16 10:26:33 +02:00
Sabitha George 99a751c74b 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>
2016-10-16 10:26:32 +02:00
Chase Metzger 2072763cf0 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>
2016-10-16 10:26:31 +02:00
Mihaela Muraru 32623b0d28 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>
2016-10-16 10:26:30 +02:00
Varsha Rao f9d033c8ec 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>
2016-10-16 10:26:29 +02:00
Varsha Rao 21971f3e0e 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>
2016-10-16 10:26:28 +02:00
Mihaela Muraru 51ea64c98d 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>
2016-10-16 10:26:27 +02:00
Mihaela Muraru a88727e7cc 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>
2016-10-16 10:26:26 +02:00
sayli karnik efffed8e06 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>
2016-10-16 10:26:25 +02:00
Sergio Paracuellos 67fafe375a 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>
2016-10-16 10:26:24 +02:00
Sergio Paracuellos ec30aebb0d 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>
2016-10-16 10:26:23 +02:00
Sergio Paracuellos 229dbdc577 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>
2016-10-16 10:26:22 +02:00
Sergio Paracuellos a567d0d47f 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>
2016-10-16 10:26:21 +02:00
Sergio Paracuellos 89e13b4590 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>
2016-10-16 10:26:20 +02:00
Elizabeth Ferdman be704e5832 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>
2016-10-16 10:26:19 +02:00
Elise Lennion efe9bc08bf 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>
2016-10-16 10:26:18 +02:00
Spencer E. Olson 1ffe8bdc09 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>
2016-10-16 10:26:17 +02:00
Spencer E. Olson cc7a6d6c46 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>
2016-10-16 10:26:16 +02:00
Spencer E. Olson 5c53440daa 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>
2016-10-16 10:26:15 +02:00
Gustavo A. R. Silva 5cf793714e 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>
2016-10-16 10:26:14 +02:00
Joe Perches 9f8e0562e3 staging: fbtft: Convert int arrays to s16
These arrays use -1, -2, and -3 as initiators for various types of
writes to initialize hardware.

No values are used that conflict with using these arrays as s16
instead of int and reducing overall data is good.

$ size drivers/staging/fbtft/built-in.o*
   text	   data	    bss	    dec	    hex	filename
 116120	  32872	   4152	 153144	  25638	drivers/staging/fbtft/built-in.o.new
 116104	  36344	   6200	 158648	  26bb8	drivers/staging/fbtft/built-in.o.old

Miscellaneous:

o Realign some of the arrays to make reading a bit easier

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:13 +02:00
Greg Kroah-Hartman d45f1a563b staging: vc04_services: fix up rpi firmware functions
The raspberrypi-firmware.h file should provide empty functions if we
aren't building in that option.  This makes it easier to test-build
code, and not have odd warnings about unused variables if you just try
to #define away the functions.

Cc: Daniel Stone <daniels@collabora.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Pranith Kumar <bobby.prani@gmail.com>
Cc: popcornmix <popcornmix@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:12 +02:00
Greg Kroah-Hartman df044ebfc5 staging: vc04_services: don't print pointers directly
kernel pointers should be printed with %pK and are not unsigned int big
on all architectures.  So fix this up to get rid of a bunch of warning
messages.

Note, there are other assumptions in this code that a pointer fits into
an int that need to be fixed up later.

Cc: Daniel Stone <daniels@collabora.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Pranith Kumar <bobby.prani@gmail.com>
Cc: popcornmix <popcornmix@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16 10:26:11 +02:00