platform/kernel/linux-starfive.git
7 years agostaging: vchiq_utils: Don't include headers twice
Stefan Wahren [Mon, 6 Mar 2017 19:24:57 +0000 (19:24 +0000)]
staging: vchiq_utils: Don't include headers twice

There is no need to include types.h and vmalloc.h twice.

This issue has been found by make includecheck.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vc04_services: Clean up tests if NULL returned on failure
simran singhal [Sat, 4 Mar 2017 16:46:55 +0000 (22:16 +0530)]
staging: vc04_services: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: sm750fb: Removed unnecessary parentheses.
Varsha Rao [Sat, 4 Mar 2017 12:56:02 +0000 (18:26 +0530)]
staging: sm750fb: Removed unnecessary parentheses.

Removed parentheses on the right hand side of assignment, as they are
not required. The following coccinelle script was used to fix this
issue:

@@
local idexpression id;
expression e;
@@

id =
-(
e
-)

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rts5208: Remove unnecessary cast on void pointer
simran singhal [Sat, 4 Mar 2017 15:30:52 +0000 (21:00 +0530)]
staging: rts5208: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: gdm724x: Replace ternary operator with min macro
Gargi Sharma [Tue, 7 Mar 2017 18:20:27 +0000 (23:50 +0530)]
staging: gdm724x: Replace ternary operator with min macro

Use macro min() to get the minimum of two values for
brevity and readability. The macro MUX_TX_MAX_SIZE
has a value of 2048 which is well within the integer
limits. This check was done manually.

Found using Coccinelle:
@@ type T; T x; T y; @@
(
- x < y ? x : y
+ min(x,y)
|
- x > y ? x : y
+ max(x,y)
)

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Fix sparse warnings in r8192U_dm.c
Matthieu Simon [Sun, 5 Mar 2017 07:38:47 +0000 (23:38 -0800)]
staging: rtl8192u: Fix sparse warnings in r8192U_dm.c

Fix these warnings:
drivers/staging//rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted __le16
drivers/staging//rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted __le16
drivers/staging//rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted __le16

Signed-off-by: Matthieu Simon <gmatthsim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: fix typos in macros
Sebastian Haas [Sat, 4 Mar 2017 22:06:33 +0000 (23:06 +0100)]
staging: rtl8188eu: fix typos in macros

Rename macro definition and usage to represent correct spelling of DEFAULT:
ODM_REG_RX_DEFUALT_A_11N => ODM_REG_RX_DEFAULT_A_11N
ODM_REG_RX_DEFUALT_B_11N => ODM_REG_RX_DEFAULT_B_11N

Signed-off-by: Sebastian Haas <sehaas@deebas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: fix typos in comments
Sebastian Haas [Sat, 4 Mar 2017 22:06:17 +0000 (23:06 +0100)]
staging: rtl8188eu: fix typos in comments

Fix typos reported by checkpatch.pl

Signed-off-by: Sebastian Haas <sehaas@deebas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Clean up tests if NULL returned on failure
simran singhal [Sat, 4 Mar 2017 16:46:53 +0000 (22:16 +0530)]
staging: rtl8192u: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8192u: clean up some white space issues
Elia Geretto [Tue, 7 Mar 2017 17:33:45 +0000 (18:33 +0100)]
Staging: rtl8192u: clean up some white space issues

This patch fixes two coding style errors, reported by the checkpatch
script.

Signed-off-by: Elia Geretto <elia.f.geretto@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: Indent the code
Georgiana Rodica Chelu [Tue, 7 Mar 2017 22:19:11 +0000 (00:19 +0200)]
staging: rtl8192e: Indent the code

Indent the code in order to follow the rules and to
increase the readability of the code.

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: Remove useless type conversion
Gargi Sharma [Wed, 8 Mar 2017 18:45:49 +0000 (00:15 +0530)]
staging: rtl8192e: Remove useless type conversion

Some type conversions like casting a pointer/non-pointer to a pointer of same type,
casting to the original type using addressof(&) operator, etc. are not needed.
Therefore, remove them. Done using coccinelle:

@@
type t;
t *p;
t a;
@@
(
- (t)(a)
+ a
|
- (t *)(p)
+ p
|
- (t *)(&a)
+ &a
)

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: cxd2099: Remove redundant code
Tamara Diaconita [Thu, 2 Mar 2017 18:43:10 +0000 (20:43 +0200)]
staging: cxd2099: Remove redundant code

Removed redundant code marked with #if 0 to fix the following
checkpath.pl issue: CHECK: if this code is redundant consider
removing it.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: cxd2099: Change kzalloc parameter
Tamara Diaconita [Thu, 2 Mar 2017 18:42:52 +0000 (20:42 +0200)]
staging: cxd2099: Change kzalloc parameter

Changed the structure tag 'struct cxd' with the variable '*ci' to fix the
following checkpath.pl issue: CHECK: Prefer kzalloc(sizeof(*ci)...) over
kzalloc(sizeof(struct cxd)).

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: cxd2099: Remove multiple blank lines
Tamara Diaconita [Thu, 2 Mar 2017 18:41:58 +0000 (20:41 +0200)]
staging: cxd2099: Remove multiple blank lines

Removed multiple blank lines to fix the checkpath.pl issue:
CHECK: Please don't use multiple blank lines.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: cxd2099: Add spaces around arithmetical operators
Tamara Diaconita [Thu, 2 Mar 2017 18:41:26 +0000 (20:41 +0200)]
staging: cxd2099: Add spaces around arithmetical operators

Added spaces around multiple arithmetical operators
to fix the checkpatch.pl issue: CHECK: spaces preferred around that 'operator'.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6655: Remove unnecessary parentheses
Sreya Mittal [Sun, 5 Mar 2017 12:12:28 +0000 (17:42 +0530)]
staging: vt6655: Remove unnecessary parentheses

Fix the checkpatch warnings of kind:

Unnecessary parentheses around priv->apTD1Rings[0]

Remove the parentheses around variables
being referenced.

Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: Match alignment with open parenthesis.
Varsha Rao [Thu, 9 Mar 2017 15:53:46 +0000 (21:23 +0530)]
staging: media: atomisp: Match alignment with open parenthesis.

This patch matches alignment with open parenthesis, removes extra space
before '||' operators and fixes the checkpatch issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: media: atomisp: Remove useless cast.
Varsha Rao [Thu, 9 Mar 2017 15:50:04 +0000 (21:20 +0530)]
staging: media: atomisp: Remove useless cast.

Explicit type casting of variable, with same type as that of variable,
is not required. The following coccinelle script is used to remove it.

@@
type T;
T *ptr;
T p;
@@
(
- (T *)(&p)
+ &p
|
- (T *)ptr
+ ptr
|
- (T *)(ptr)
+ ptr
|
- (T)(p)
+ p
)

This patch also removes unnecessary parentheses.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: Remove max_u64 function
Gargi Sharma [Tue, 7 Mar 2017 18:32:05 +0000 (00:02 +0530)]
staging: lustre: Remove max_u64 function

Removed the max_u64 function to find the maximum value of
two unsigned 64 bit numbers to use the linux macro max
instead.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: lustre: Remove unnecessary cast on void pointer
simran singhal [Sat, 4 Mar 2017 15:30:51 +0000 (21:00 +0530)]
staging: lustre: lustre: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: Remove unnecessary cast on void pointer
simran singhal [Sat, 4 Mar 2017 15:30:50 +0000 (21:00 +0530)]
staging: lustre: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: nvec: Remove unnecessary cast on void pointer
simran singhal [Sat, 4 Mar 2017 15:30:49 +0000 (21:00 +0530)]
staging: nvec: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:

@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8712: Remove unnecessary cast on void pointer
simran singhal [Sat, 4 Mar 2017 15:30:53 +0000 (21:00 +0530)]
staging: rtl8712: Remove unnecessary cast on void pointer

The following Coccinelle script was used to detect this:
@r@
expression x;
void* e;
type T;
identifier f;
@@
(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T*)x)->f
|
- (T*)
  e
)

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8712: rtl871x_mp_ioctl.h - style fix
Derek Robson [Thu, 2 Mar 2017 05:27:01 +0000 (18:27 +1300)]
Staging: rtl8712: rtl871x_mp_ioctl.h - style fix

Fixed style of block comments
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations
Alexander Kapshuk [Sat, 4 Mar 2017 09:00:14 +0000 (11:00 +0200)]
staging/fbtft: Hush checkpatch.pl warning about unnecessary line continuations

Use a single string literal as the fmt argument passed to dev_err()
instead of multiple string literals split with an embedded backslash
character.

Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: fb_sh1106: use new helper helper fbtft_write_buf_dc
Heiner Kallweit [Thu, 2 Mar 2017 21:20:42 +0000 (22:20 +0100)]
staging: fbtft: fb_sh1106: use new helper helper fbtft_write_buf_dc

Make use of new helper fbtft_write_buf_dc.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: use helper fbtft_write_buf_dc in fbtft-bus.c
Heiner Kallweit [Thu, 2 Mar 2017 21:19:00 +0000 (22:19 +0100)]
staging: fbtft: use helper fbtft_write_buf_dc in fbtft-bus.c

Make use of new helper fbtft_write_buf_dc.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: add helper fbtft_write_buf_dc
Heiner Kallweit [Thu, 2 Mar 2017 21:12:46 +0000 (22:12 +0100)]
staging: fbtft: add helper fbtft_write_buf_dc

Factor out setting DC GPIO and writing buffer content to helper
fbtft_write_buf_dc.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: fb_sh1106: use own implementation of write_register
Heiner Kallweit [Thu, 2 Mar 2017 20:03:44 +0000 (21:03 +0100)]
staging: fbtft: fb_sh1106: use own implementation of write_register

The default implementation of write_register keeps DC low for the first
byte only. SH1106 requires DC to be low for all bytes of a multi-byte
command. To deal with this limitation we currently use a separate call
to write_reg for each single command byte what is not really efficient.

Therefore override the default implementation of write_register with an
own one which keeps DC low for all bytes.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fbtft: improve a syslog message in fbtft_register_framebuffer
Heiner Kallweit [Thu, 2 Mar 2017 19:48:53 +0000 (20:48 +0100)]
staging: fbtft: improve a syslog message in fbtft_register_framebuffer

There are drivers like fb_sh1106 which allocate a txbuf less than 1 KiB.
In this case the message would include "0 KiB buffer memory" what
doesn't make sense and in general I doubt that there is any benefit in
informing the user about allocation of a very small buffer.

Therefore omit this message part if the buffer has less than 1 KiB.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agospeakup: add unicode variant of /dev/softsynth
Samuel Thibault [Sat, 4 Mar 2017 14:01:57 +0000 (15:01 +0100)]
speakup: add unicode variant of /dev/softsynth

This adds /dev/softsynthu, along /dev/softsynth, which emits output in
UTF-8 encoding, thus allowing to support 16bit characters.  Most of the
code is shared, only the read function has to behave differently in
latin1 and in unicode mode.  Since Linux only supports 16bit characters,
we can just hardcode the UTF-8 encoding.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agospeakup: convert screen reading to 16bit characters
Samuel Thibault [Sat, 4 Mar 2017 14:01:56 +0000 (15:01 +0100)]
speakup: convert screen reading to 16bit characters

This adds 16bit character support to most of the screen reading by
extending characters to u16 throughout the code.

Non-latin1 characters are assumed to be alphabetic type for now.

non-latin1 vt_notifier_call-provided characters are not ignored any
more, and the 16bit character returned by get_char is not truncated any
more. For simplicity, speak_char still only supports latin1 characters.
Its direct mode however does support 16bit characters, so in practice
this will not be a limitation, non-latin1 languages will be handled by
the synthesizer. spelling words does not support direct mode yet, for
simplicity for now it will ignore 16bit characters.

For simplicity again, speakup messages are left in latin1 for now.

Some coding style is fixed along the way.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agospeakup: extend synth buffer to 16bit unicode characters
Samuel Thibault [Sat, 4 Mar 2017 14:01:55 +0000 (15:01 +0100)]
speakup: extend synth buffer to 16bit unicode characters

This extends the synth buffer slots to 16bit, so as to hold 16bit
unicode characters.

synth_buffer_getc and synth_buffer_peek now return 16bit characters.
Speech synthesizers which do not support characters beyond latin1 can
use the synth_buffer_skip_nonlatin1() helper to skip the non-latin1
characters before getting or peeking. All synthesizers are made to use
it for now.

This makes synth_buffer_add take a 16bit character. For simplicity for
now, synth_printf is left to using latin1 formats and strings.
synth_putwc, synth_putwc_s, synth_putws and synth_putws_s helpers are
however added to put 16bit characters and strings.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Chris Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: Remove unneeded header file
Gargi Sharma [Wed, 8 Mar 2017 17:07:03 +0000 (22:37 +0530)]
staging: greybus: Remove unneeded header file

module.h contains a call to moduleparam.h making the call to it
redundant and useless.

@ includesmodule @
@@

 #include <linux/module.h>

@ depends on includesmodule @
@@

- #include <linux/moduleparam.h>

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Remove useless cast.
Varsha Rao [Wed, 8 Mar 2017 04:12:46 +0000 (09:42 +0530)]
staging: wilc1000: Remove useless cast.

Variable ip_addr is already declared as pointer to u8. Again explicit type
casting of ip_addr to u8, is not required. Hence this patch removes it
by using the following coccinelle script.

@@
type T;
T *ptr,p;
@@
(
- (T *)(&p)
+ &p
|
- (T *)ptr
+ ptr
|
- (T *)(ptr)
+ ptr
|
- (T)(p)
+ p
)

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: removes redundant 'continue' in while loop conditional blocks
Tahia Khan [Wed, 8 Mar 2017 23:21:38 +0000 (18:21 -0500)]
staging: wilc1000: removes redundant 'continue' in while loop conditional blocks

Removing 6 continue statements from a while loop. The
continue statements are redundant here since control
already returns to the beginning of the loop upon exit
of any of the conditional blocks. Found using Coccinelle.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Fixes camel-casing in wilc_gnrl_info_received
Tahia Khan [Wed, 8 Mar 2017 00:26:44 +0000 (19:26 -0500)]
staging: wilc1000: Fixes camel-casing in wilc_gnrl_info_received

Fixes checkpatch warning by renaming pu8Buffer to buffer
and u32Length to length in wilc_gnrl_info_received.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Fixes camel-casing in wilc_network_info_received
Tahia Khan [Wed, 8 Mar 2017 00:26:41 +0000 (19:26 -0500)]
staging: wilc1000: Fixes camel-casing in wilc_network_info_received

Fixes checkpatch warning by renaming pu8Buffer to buffer
and u32Length to length in wilc_network_info_received.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Fixes camel-casing in wilc_scan_complete_received
Tahia Khan [Wed, 8 Mar 2017 00:26:37 +0000 (19:26 -0500)]
staging: wilc1000: Fixes camel-casing in wilc_scan_complete_received

Fixes checkpatch warning by renaming pu8Buffer to buffer
and u32Length to length in wilc_scan_complete_received.

Signed-off-by: Tahia Khan <tahia.khan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging:wilc1000:wilc_spi: Added blank line after function and modified comment style
Georgios Emmanouil [Thu, 2 Mar 2017 17:07:04 +0000 (19:07 +0200)]
Staging:wilc1000:wilc_spi: Added blank line after function and modified comment style

Added blank line after function and modified comment style.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging:wilc1000:wilc_spi: Fixed spelling error
Georgios Emmanouil [Thu, 2 Mar 2017 17:06:19 +0000 (19:06 +0200)]
Staging:wilc1000:wilc_spi: Fixed spelling error

Fixed spelling error. 'unkmown' to 'unknown'.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging:wilc1000:wilc_spi: Fixed comment style to the preferred kernel comment style
Georgios Emmanouil [Thu, 2 Mar 2017 17:04:28 +0000 (19:04 +0200)]
Staging:wilc1000:wilc_spi: Fixed comment style to the preferred kernel comment style

Fixed comment style to the preferred kernel comment style.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging:wilc1000:wilc_sdio: Modified comment style to preferred kernel comment style
Georgios Emmanouil [Thu, 2 Mar 2017 16:41:16 +0000 (18:41 +0200)]
Staging:wilc1000:wilc_sdio: Modified comment style to preferred kernel comment style

Modified comment style to preferred kernel comment style.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if'...
Georgios Emmanouil [Thu, 2 Mar 2017 15:38:05 +0000 (17:38 +0200)]
Staging:wilc1000:host_interface: Integrated two 'if' statements to a single 'if' statement

Removed unnecessary 'if' statement and integrated the condition to the
previous 'if' statement.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging:wilc1000:host_interface: Removed unnecessary blank line
Georgios Emmanouil [Thu, 2 Mar 2017 15:35:05 +0000 (17:35 +0200)]
Staging:wilc1000:host_interface: Removed unnecessary blank line

Removed unnecessary blank line.

Signed-off-by: Georgios Emmanouil <geo.emmnl@gmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vc04_services: bcm2835-audio: Align with parenthesis
Sreya Mittal [Tue, 7 Mar 2017 20:12:16 +0000 (01:42 +0530)]
staging: vc04_services: bcm2835-audio: Align with parenthesis

Fix the checkpatch issue:
Alignment should match open parenthesis

Signed-off-by: Sreya Mittal <sreyamittal5@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: kobjects: Delete comparison
Tamara Diaconita [Tue, 7 Mar 2017 16:38:59 +0000 (18:38 +0200)]
staging: speakup: kobjects: Delete comparison

Comparison to NULL is not necessary because 'if' statement tests if
'synth' is NULL anyway.

Delete comparison in 'if' structure to fix the checkpath.pl issue :
CHECK: Comparison to NULL could be written 'synth'.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: kobjects: Rearrange headers
Tamara Diaconita [Tue, 7 Mar 2017 16:38:40 +0000 (18:38 +0200)]
staging: speakup: kobjects: Rearrange headers

Put a part from the headers of some functions in a new line to have less than
80 characters.

Fixed the checkpath.pl issue:
CHECK: line over 80 characters.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: kobjects: Align the code
Tamara Diaconita [Tue, 7 Mar 2017 16:38:20 +0000 (18:38 +0200)]
staging: speakup: kobjects: Align the code

Fixed the checkpath.pl issue:
CHECK: Aligment should match open paranthesis.

Added and deleted spaces and tabs to align the code.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: kobjects: Delete blank line
Tamara Diaconita [Tue, 7 Mar 2017 16:38:01 +0000 (18:38 +0200)]
staging: speakup: kobjects: Delete blank line

Delet the blank line after an open brace '{' to fix the checkpath.pl issue:
CHECK: Blank lines aren't necessary after an open brace '{'.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: kobjects: Delete space
Tamara Diaconita [Tue, 7 Mar 2017 16:37:41 +0000 (18:37 +0200)]
staging: speakup: kobjects: Delete space

Added a space after multiple casts to fix the checkpath.pl issue:
CHECK: No space is necessary after a cast.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: Clean up tests if NULL returned on failure
simran singhal [Sat, 4 Mar 2017 16:46:54 +0000 (22:16 +0530)]
staging: speakup: Clean up tests if NULL returned on failure

Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:
@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:speakup:i18n.c: Align open paranthesis
Tamara Diaconita [Fri, 3 Mar 2017 22:07:01 +0000 (00:07 +0200)]
staging:speakup:i18n.c: Align open paranthesis

Fixed the following checkpath.pl issue:
CHECK: alignment should match open paranthesis.

Deleted a tab and added spaces to align open paranthesis.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: Fixed coding style errors and aligned indents
Tuomo Rinne [Thu, 2 Mar 2017 21:58:30 +0000 (21:58 +0000)]
staging: speakup: Fixed coding style errors and aligned indents

Fixed indentation to use tabs and aligned all the fields to same level.

Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: Add __printf format/arg verification, fix fallout
Joe Perches [Sat, 4 Mar 2017 16:13:11 +0000 (08:13 -0800)]
staging: speakup: Add __printf format/arg verification, fix fallout

Using __printf allows the compiler to verify formats and arguments.
Use it and fix the single misuse found.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup:indentation should use tabs
Arushi Singhal [Wed, 1 Mar 2017 19:33:03 +0000 (01:03 +0530)]
staging: speakup:indentation should use tabs

Indentation should always use tabs and never spaces.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Add comment for spinlock_t definition.
Varsha Rao [Thu, 2 Mar 2017 17:57:11 +0000 (23:27 +0530)]
staging: emxx_udc: Add comment for spinlock_t definition.

Members of nbu2ss_udc structure can change device state, maintain
completion state and control driver. Also provide access to read and
write to register. Hence, exclusive access to nbu2ss_udc is required.
The lock variable of type spinlock_t guarantees the exclusive access
and protects it.

In this patch, comment is added for spinlock_t definition, to fix the
following checkpatch issue:

CHECK: spinlock_t definition without comment

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: xgifb: Improved coding style
Arushi Singhal [Wed, 1 Mar 2017 16:45:15 +0000 (22:15 +0530)]
staging: xgifb: Improved coding style

New variable is added to make the code more readable.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Constify ieee80211_qos_parameters structure
Gargi Sharma [Thu, 2 Mar 2017 05:46:14 +0000 (11:16 +0530)]
staging: rtl8192u: Constify ieee80211_qos_parameters structure

Declare ieee80211_qos_parameters structure constant it is only passed
as src parameter to the function memcpy. The fields of
def_qos_parameters structure are never modified and hence it can be
declared as const.

Coccinelle Script:

@r1 disable optional_qualifier@
identifier i;
position p;
@@

static struct ieee80211_qos_parameters i@p ={...};

@ok1@
identifier r1.i;
position p;
expression e1,e2;
@@
memcpy(e1,&i@p,e2)

@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
static
+const
struct ieee80211_qos_parameters i={...};

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: comedi: ni_atmio: make device_ids const
Ian Abbott [Wed, 8 Mar 2017 18:02:05 +0000 (18:02 +0000)]
staging: comedi: ni_atmio: make device_ids const

The `device_ids[]` passed to `MODULE_DEVICE_TABLE()` should be `const`.
When the "ni_atmio" driver is built-in, gcc warns about `device_ids`
being defined but ununsed.  Make it `const`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: comedi: allow it to be built-in
Ian Abbott [Wed, 8 Mar 2017 18:02:04 +0000 (18:02 +0000)]
staging: comedi: allow it to be built-in

There is no particular reason why comedi has to be built as kernel
modules.  Remove the `depends on m` from the Kconfig file to allow it to
be built-in.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: comedi: comedi_fops: Change comedi_num_legacy_minors type
Cheah Kok Cheong [Tue, 7 Mar 2017 18:13:58 +0000 (02:13 +0800)]
Staging: comedi: comedi_fops: Change comedi_num_legacy_minors type

Change to unsigned to allow removal of negative value check in
init section. Use smaller data type since the max possible
value currently is 48.

Signed-off-by: Cheah Kok Cheong <thrust73@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: fix spelling mistake
Tobin C. Harding [Thu, 9 Mar 2017 04:47:04 +0000 (15:47 +1100)]
staging: ks7010: fix spelling mistake

Comment contains misspelled work 'Adress'.

Correct spelling: Adress -> Address

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: fix checkpatch CONSTANT_COMPARISON
Tobin C. Harding [Thu, 9 Mar 2017 04:47:02 +0000 (15:47 +1100)]
staging: ks7010: fix checkpatch CONSTANT_COMPARISON

Checkpatch emits WARNING: Comparisons should place the constant on the
right side of the test.

Move comparison constant to the right side of the test.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: fix checkpatch whitespace warnings
Tobin C. Harding [Thu, 9 Mar 2017 04:47:01 +0000 (15:47 +1100)]
staging: ks7010: fix checkpatch whitespace warnings

Checkpatch emits various warnings/errors pointing to misplaced
spaces.

- trailing whitespace
- please, no spaces at the start of a line
- please, no space before tabs
- Unnecessary space before function pointer arguments
- unnecessary whitespace before a quoted newline
- code indent should use tabs where possible

Remove all undesirable whitespace.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: eap_packet: Format comments to fit in line
Tamara Diaconita [Thu, 9 Mar 2017 08:00:31 +0000 (10:00 +0200)]
staging: ks7010: eap_packet: Format comments to fit in line

Split lines to have less than 80 characters.

Fix the checkpatch.pl warning:
WARNING: line over 80 characters.

Signed-off-by: Tamara Diaconita <diaconita.tamara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: Unnecessary parentheses removed and improved coding style.
Arushi Singhal [Wed, 1 Mar 2017 10:57:54 +0000 (16:27 +0530)]
staging: ks7010: Unnecessary parentheses removed and improved coding style.

Unnecessary parentheses are removed as reported by checkpatch.pl
to make coder nicer and to improve readability.
Also coding style is improved as it's often nicer to read if
 &(foo[0]) is converted to foo like:
 memcpy(&(ap->bssid[0]), &(ap_info->bssid[0]), ETH_ALEN);
 memcpy(ap->bssid, ap_info->bssid, ETH_ALEN);

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging, android: remove lowmemory killer from the tree
Michal Hocko [Wed, 22 Feb 2017 12:01:21 +0000 (13:01 +0100)]
staging, android: remove lowmemory killer from the tree

Lowmemory killer is sitting in the staging tree since 2008 without any
serious interest for fixing issues brought up by the MM folks. The main
objection is that the implementation is basically broken by design:
- it hooks into slab shrinker API which is not suitable for this
  purpose. lowmem_count implementation just shows this nicely.
  There is no scaling based on the memory pressure and no
  feedback to the generic shrinker infrastructure.
  Moreover lowmem_scan is called way too often for the heavy
  work it performs.
- it is not reclaim context aware - no NUMA and/or memcg
  awareness.

As the code stands right now it just adds a maintenance overhead when
core MM changes have to update lowmemorykiller.c as well. It also seems
that the alternative LMK implementation will be solely in the userspace
so this code has no perspective it seems. The staging tree is supposed
to be for a code which needs to be put in shape before it can be merged
which is not the case here obviously.

Signed-off-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vchiq_arm: Disable ability to dump memory by default
Michael Zoran [Wed, 8 Mar 2017 03:23:36 +0000 (19:23 -0800)]
staging: vchiq_arm: Disable ability to dump memory by default

vc04_services has an ioctl interface to dump arbitrary memory
to a custom debug log.  This is typically only needed by
diagnostic tools, and can potentially be a security issue
if the devtmpfs node doesn't have adequate permissions set.

Since the ability to dump memory still has debugging value,
create a new build configuration and disable the feature
by default.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vchiq_arm: Add compatibility wrappers for ioctls
Michael Zoran [Wed, 8 Mar 2017 03:23:35 +0000 (19:23 -0800)]
staging: vchiq_arm: Add compatibility wrappers for ioctls

This patch adds compatibility wrappers for the ioctls
exposed by vchiq/vc04_services.  The compat ioctls are
completely implemented on top of the native ioctls.  No
existing lines are modified.

While the ideal approach would be to cleanup the existing
code, this path is simplier and easier to review. While
it does have a small runtime performance penality vs
seperating the existing code into wrapper+worker functions,
the penality is small since only the metadata is copied
back onto the 32 bit user mode stack.

The on top of approach is the approach used by several
existing performance critical subsystems of Linux such
as the DRM 3D graphics subsystem.

Testing:

1. A 32 bit chroot was created on a RPI 3 and vchiq_test
was built for armhf.  The usual tests were run such as
vchiq_test -f 10 and vchiq_test -p.

2. This patch was copied onto the shipping version of
the Linux kernel used for the RPI and that kernel was
built for arm64. That kernel was used to boot Raspbian.
Many of the builtin features are now functional such
as the "hello_pi" examples, and minecraft_pi.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835_camera: Use a mapping table for context field of mmal_msg_header
Michael Zoran [Thu, 9 Mar 2017 05:10:10 +0000 (21:10 -0800)]
staging: bcm2835_camera: Use a mapping table for context field of mmal_msg_header

The camera driver passes messages back and forth between the firmware with
requests and replies.  One of the fields of the message header called
context is a pointer so the size changes between 32 bit and 64 bit.

The context field is used to pair reply messages from the firmware with
request messages from the kernel.  The simple solution would be
to use the padding field for the upper 32 bits of pointers, but this
would rely on the firmware always copying the pad field.

So instead handles are generated that are 32 bit numbers and a mapping
stored in a btree as implemented by the btree library in the kernel lib
directory.  The mapping pairs the handle with the pointer to the actual
data. The btree library was chosen since it's very easy to use and
red black trees would be overkill.

The camera driver also now forces in the btree library if the camera is
included in the build.  The btree library is a hidden configuration
option.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835_camera: Convert control_service field of mmal_msg_header to u32
Michael Zoran [Thu, 9 Mar 2017 05:10:09 +0000 (21:10 -0800)]
staging: bcm2835_camera: Convert control_service field of mmal_msg_header to u32

The camera driver passes messages back and forth between the firmware with
requests and replies.  One of the fields of the message header called
control_service is a pointer so the size changes between 32 bit and 64 bit.

Luckly, the field is not interperated by the driver, so it can be changed
to a u32 which has a fixed size.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoatomisp: USE_KMEM_CACHE is always defined so remove the dead code
Alan Cox [Wed, 8 Mar 2017 11:39:20 +0000 (11:39 +0000)]
atomisp: USE_KMEM_CACHE is always defined so remove the dead code

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoatomisp: HRT_KERNEL is always defined so clean up the ifdef use
Alan Cox [Wed, 8 Mar 2017 11:39:08 +0000 (11:39 +0000)]
atomisp: HRT_KERNEL is always defined so clean up the ifdef use

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoatomisp: trim unused mmgr code
Alan Cox [Wed, 8 Mar 2017 11:39:59 +0000 (11:39 +0000)]
atomisp: trim unused mmgr code

This cuts it back to what is basically a few wrapper functions. At some point
we can kill most of these too by changing the callers.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoatomisp: HRT_CSIM is never defined
Alan Cox [Wed, 8 Mar 2017 11:39:48 +0000 (11:39 +0000)]
atomisp: HRT_CSIM is never defined

Remove the content that is guarded by this define

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoatomisp: __SP is never defined so scrub this ifdef
Alan Cox [Wed, 8 Mar 2017 11:39:38 +0000 (11:39 +0000)]
atomisp: __SP is never defined so scrub this ifdef

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoatomisp: comment out some unused defines
Alan Cox [Wed, 8 Mar 2017 11:39:29 +0000 (11:39 +0000)]
atomisp: comment out some unused defines

Once we are a bit more sure of their obsolescence they will be deleted

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-camera: Remove explicit cache flush operations
Michael Zoran [Wed, 8 Mar 2017 12:21:51 +0000 (04:21 -0800)]
staging: bcm2835-camera: Remove explicit cache flush operations

The camera code has an explicit cache flush operation
which is not portable.  Now that vc04_services is using portable
DMA APIs that already do the cache flushing, explicit flushes
should no longer be needed.

The one call to __cpuc_flush_dcache_area has been removed.

Testing:
The offical V2 camera for the RPI was tested on a RPI 3
running in 32 bit mode(armhf).  The cheese application
and ffmpeg was used to view and stream video from the
camera.  Nothing new seems to be broken without the
cache flushing.

Signed-off-by: Michael Zoran <mzoran@crowfest.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: fix sparse warnings
Andrea Ghittino [Sat, 4 Mar 2017 17:20:50 +0000 (18:20 +0100)]
staging: unisys: fix sparse warnings

Sparse generates two warnings related to incorrect type in assignment.
This patch changes the types in the struct defined in unisys

Signed-off-by: Andrea Ghittino <aghittino@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: Replace "the the " with "the"
simran singhal [Fri, 3 Mar 2017 15:59:04 +0000 (21:29 +0530)]
staging: wlan-ng: Replace "the the " with "the"

This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Replace "the the " with "the"
simran singhal [Fri, 3 Mar 2017 15:59:05 +0000 (21:29 +0530)]
staging: rtl8192u: Replace "the the " with "the"

This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: Replace "the the " with "the"
simran singhal [Fri, 3 Mar 2017 15:59:06 +0000 (21:29 +0530)]
staging: unisys: Replace "the the " with "the"

This patch replace "the the " with "the". The replacement couldn't be
automated because sometimes the first "the" was meant to be another
word.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: media: platform: bcm2835 - style fix
Derek Robson [Sat, 11 Feb 2017 01:10:42 +0000 (14:10 +1300)]
Staging: media: platform: bcm2835 - style fix

Changed permissions to octal style
Found using checkpatch

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-audio: remove unused semaphores
Aishwarya Pant [Mon, 6 Mar 2017 19:57:41 +0000 (01:27 +0530)]
staging: bcm2835-audio: remove unused semaphores

This patch removes unused semaphores alsa_stream->buffers_update_sem
and alsa_stream->control_sem from struct bcm2835_alsa_stream

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: bcm2835-camera: Replace ternary operator with min_t macro
Narcisa Ana Maria Vasile [Tue, 7 Mar 2017 15:22:03 +0000 (17:22 +0200)]
staging: bcm2835-camera: Replace ternary operator with min_t macro

Use macro min_t to get the minimum of two values for readability.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: comedi: Replace "is is" with "is"
simran singhal [Sat, 4 Mar 2017 17:41:01 +0000 (23:11 +0530)]
staging: comedi: Replace "is is" with "is"

This patch replace "is is " with "is". The replacement couldn't be
automated because sometimes the first "is" was meant to be another
word.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Replace "is is" with "is"
simran singhal [Sat, 4 Mar 2017 17:40:59 +0000 (23:10 +0530)]
staging: rtl8192u: Replace "is is" with "is"

This patch replace "is is " with "is". The replacement couldn't be
automated because sometimes the first "is" was meant to be another
word.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: Remove lustre_eacl.h
Gargi Sharma [Thu, 2 Mar 2017 17:42:55 +0000 (23:12 +0530)]
staging: lustre: Remove lustre_eacl.h

The structures and the macros in the header file are not used
anywhere inside the kernel (verified by using grep). The structures
and macros were leftover from the patch
341f1f0affed1c24712f37c95bb654b3b33ab2c6 "staging: lustre: remove
remote client support". Also, removed the include statements for
lustre_eacl.h.

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: lnet: Constify kernel_param_ops structure
Gargi Sharma [Thu, 2 Mar 2017 16:57:15 +0000 (22:27 +0530)]
staging: lustre: lnet: Constify kernel_param_ops structure

The structure is used as an argument to module_param macro. This
macro calls a bunch of other macros and finally assigns the instance
of the kernel_param_ops structure to the const struct
kernel_param_ops* field of a variable of type kernel_param. Hence,
const can be added to the structure.

Coccinelle Script:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct kernel_param_ops i@p = { ... };

@ok1@
identifier r.i;
expression e;
position p;
@@
e = i@p

@script:python s@
i << r.i;
t;
@@
coccinelle.t = i[10:];

@ok2@
declarer name module_param;
expression e1,e2;
position p;
@@
module_param(e1,s.t@p,e2);

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct kernel_param_ops i = { ... };

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: fix sparse warning about different address spaces
Mario Bambagini [Wed, 1 Mar 2017 23:57:09 +0000 (00:57 +0100)]
staging: lustre: fix sparse warning about different address spaces

fixed the following sparse warning by adding proper cast:
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74: warning: incorrect type in argument 2 (different address spaces)
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74:    expected char const [noderef] <asn:1>*<noident>
drivers/staging//lustre/lustre/obdclass/obd_config.c:1055:74:    got char *[assigned] sval

Signed-off-by: Mario Bambagini <mario.bambagini@gmail.com>
Acked-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: atomisp: fix include Makefile mess
Greg Kroah-Hartman [Tue, 7 Mar 2017 12:21:24 +0000 (13:21 +0100)]
staging: atomisp: fix include Makefile mess

Using LINUXINCLUDE is a very old hack, and doesn't play well with
building objects in a different directory than the kernel source is in.

So fix up the include file references to be relative to make it obvious
we are pulling in local include files, which need to get fixed up.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: Replace "is is" with "is"
simran singhal [Sat, 4 Mar 2017 17:41:00 +0000 (23:11 +0530)]
staging: greybus: Replace "is is" with "is"

This patch replace "is is " with "is". The replacement couldn't be
automated because sometimes the first "is" was meant to be another
word.

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: loop_backtest: fixed consistent spacing style issue
Jonathan Bowie [Wed, 1 Mar 2017 10:46:30 +0000 (02:46 -0800)]
staging: greybus: loop_backtest: fixed consistent spacing style issue

Fixed incosistent spacing around arithmetic operator.

Signed-off-by: Jonathan Bowie <eudjtb@gmail.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: dgnc: replace usleep_range with udelay
Aishwarya Pant [Wed, 1 Mar 2017 12:36:30 +0000 (18:06 +0530)]
staging: dgnc: replace usleep_range with udelay

udelay is impelmented using a busy-wait loop and consumes CPU cycles
while usleep_range is implemented using interrupts.cls_flush_uart_write()
is called after a channel lock is acquired i.e. an atomic context.
Hence delay in this method should use udelay instead of usleep_range.

Signed-off-by: Aishwarya Pant <aishpant@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: dgnc: Constify ktermios structure
Gargi Sharma [Sun, 5 Mar 2017 09:51:44 +0000 (15:21 +0530)]
staging: dgnc: Constify ktermios structure

The ktermios structure is a local default termios struct. All ports
are initially created with this termios. Since, the structure is
never modified, it can be declared as const.

Coccinelle Script:
@r disable optional_qualifier@
identifier s,i;
position p;
@@
static struct ktermios i@p = { ... };

@ok1@
identifier r.i;
expression e;
position p;
@@
e = i@p

@bad@
position p != {r.p,ok1.p};
identifier r.i;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct ktermios i = { ... };

File Size before:

text data   bss   dec    hex   filename
25469 2048   256   27773  6c7d  drivers/staging/dgnc/dgnc_tty.o

File Size after:

text data bss dec hex filename
25636 2016 256 27908 6d04 drivers/staging/dgnc/dgnc_tty.o

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Logical continuations should be on the previous line
Arushi Singhal [Sat, 4 Mar 2017 15:57:40 +0000 (21:27 +0530)]
staging: wilc1000: Logical continuations should be on the previous line

This patch fixes the checkpatch issue:
CHECK: Logical continuations should be on the previous line.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: function prototype argument should have identifier name
Arushi Singhal [Sat, 4 Mar 2017 15:57:39 +0000 (21:27 +0530)]
staging: wilc1000: function prototype argument should have identifier name

function prototype argument should have an identifier name as reported
by checkpatch.pl.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Alignment should match open parenthesis
Arushi Singhal [Sat, 4 Mar 2017 15:57:38 +0000 (21:27 +0530)]
staging: wilc1000: Alignment should match open parenthesis

Fix checkpatch issues: "CHECK: Alignment should match open parenthesis".

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>