Commit graph

46566 commits

Author SHA1 Message Date
Ivan Safonov 90a6969250 staging:r8188eu: add iv length to frame data offset
If this frame contains IV/ICV fields, ether_type field located a little farther.

This bug already fixed here:
https://github.com/lwfinger/rtl8188eu/blob/master/core/rtw_recv.c#L569 .

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:28:47 +01:00
Xiangyang Zhang ddd10774a1 staging: ks7010: fixed a coding style issue
Fixed checkpatch.pl CHECK: Logical continuations should be on the
previous line

Signed-off-by: Xiangyang Zhang <xyz.sun.ok@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Tobin C. Harding 2c4951adfa staging: ks7010: invert if statement conditionals
Checkpatch emits WARNING: Avoid multiple line dereference.

Function uses if statement blocks to guard the body of the
function. If we invert these conditionals and return, then the code
becomes more readable and subsequent code is indented less. The
checkpatch fix then follows trivially.

Invert conditionals, return from function if new conditional evaluates
to true. Reduce the level of indentation in subsequent code.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Tobin C. Harding 6ad6e21bd4 staging: ks7010: remove redundant check
Function checks for condition inside a loop that checks the same
condition, this is redundant. Fix also removes checkpatch CHECK.

Remove redundant check.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Tobin C. Harding 61082bf696 staging: ks7010: add braces to multi-line indent
The addition of curly braces around single statements that span
multiple lines makes the code more readable in general.

Add curly braces to multi-line indented statement.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Tobin C. Harding 310e916f54 staging: ks7010: add explicit check to 'size' variables
When checking the value of a variable that holds a 0 an explicit check
is good style. i.e

  -    if (!size)
  +    if (size == 0)

Update checks on 'numerical' variables to use explicit checks.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Tobin C. Harding b5ca039ac1 staging: ks7010: add explicit check to memcmp() calls
Calls to functions memcmp() and strcmp() are more clearly readable
when the return value is explicitly checked. i.e

if (memcmp(foo, bar, size) == 0)

Modify driver to use an explicit check on the value returned by
memcmp().

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Tobin C. Harding 58af272b33 staging: ks7010: fix memcmp() bug
Call site to memcmp() treats return value as if it were an error code,
it is not. If memcmp() finds inputs to be not the same, an error
return code should be set explicitly.

Correctly handle return value from call to memcmp(), set error code
explicitly.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:27:23 +01:00
Arushi Singhal 12eed2f2fb staging: fbtft: Replace a bit shift by a use of BIT.
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@

-1 << c
+BIT(c)

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:25:33 +01:00
Arushi Singhal 4f8f316be6 staging: rts5208: Replace a bit shift by a use of BIT.
This patch replaces bit shifting on 1 with the BIT(x) macro.
This was done with coccinelle:
@@
constant c;
@@

-1 << c
+BIT(c)

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:25:33 +01:00
Narcisa Ana Maria Vasile 22d89cc86c staging: rtl8712: Invert comparison to reduce indentation
Check the condition: "pdata->length < 32" first, to be able to return immediately
in case of error and then continue with the rest of the function without one
extra indentation level.

This was found using the following Coccinelle script:

@disable neg_if@
expression e,E;
statement S;
@@

*if (e)
    S
    else { return -E; }

    @disable neg_if@
    expression e,E;
    statement S;
    identifier l;
    @@

    *if
(e)
    S
    else
{ rc = -E; goto l; }

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:24:45 +01:00
Narcisa Ana Maria Vasile ad93cc9f15 staging: rtl8712: Restructure code for clarity
Invert if statements to be able to return immediately in case of error,
and to avoid additional else branch.

Improve layout of function since there is more horizontal space now.

This was found using the following Coccinelle script:

@disable neg_if@
expression e,E;
statement S;
@@

*if (e)
    S
    else { return -E; }

    @disable neg_if@
    expression e,E;
    statement S;
    identifier l;
    @@

    *if
(e)
    S
    else
{ rc = -E; goto l; }

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:24:45 +01:00
Narcisa Ana Maria Vasile 09e1aa1aaa staging: rtl8712: Invert the test on check_fwstate() to reduce indentation
Negate if condition to be able to return immediately in case of error,
and then continue with the rest of the function
without extra indentation level.

This was found using the following Coccinelle script:

@disable neg_if@
expression e,E;
statement S;
@@

*if (e)
    S
    else { return -E; }

    @disable neg_if@
    expression e,E;
    statement S;
    identifier
    l;
    @@

    *if
(e)
    S
    else
{ rc = -E; goto l; }

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:24:45 +01:00
Narcisa Ana Maria Vasile e6d9379507 staging: rtl8712: Invert if statements to reduce indentation level
Invert if statements to be able to return immediately in case of error,
and to avoid additional else branch, and then continue with the rest
of the function without excessive indentation.

This was found using the following Coccinelle script:

@disable neg_if@
expression e,E;
statement S;
@@

*if (e)
S
else { return -E; }

@disable neg_if@
expression e,E;
statement S;
identifier l;
@@

*if (e)
S
else { rc = -E; goto l;  }

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:24:45 +01:00
Arushi Singhal ff49304b5b staging: sm750fb: Remove typedef from "typedef enum _spolarity_t"
This patch removes typedefs from enum and renames it from "typedef enum
_spolarity_t" to "enum spolarity" as per kernel coding standards."

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:23:19 +01:00
Arushi Singhal bf76023131 staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t"
This patch removes typedefs from struct and renames it from "typedef
struct _mode_parameter_t" to "struct mode_parameter" as per kernel
coding standards."

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:23:19 +01:00
Abhishek Bhardwaj fdbcd02357 staging: dgnc: remove tracing prints in dgnc_tty.c
Remove tracing prints in dgnc_tty_send_xchar. The same functionality
could be achieved by using ftrace.

Signed-off-by: Abhishek Bhardwaj <abshkbh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:21:25 +01:00
Arushi Singhal 65bf4ea10f staging: speakup: Match alignment with 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>
2017-03-23 14:20:41 +01:00
Arushi Singhal 3b4ad1ecd1 staging: speakup: Removed Unnecessary parentheses.
Unnecessary parentheses are removed to improve readability.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:20:41 +01:00
Arushi Singhal 205931ea88 staging: speakup: spaces preferred around operator
Fixed the checkpatch.pl issues like:
CHECK: spaces preferred around that '&' (ctx:VxV)
CHECK: spaces preferred around that '|' (ctx:VxV)
CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
etc.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:20:41 +01:00
Arushi Singhal 23996ee52e staging: speakup: Moved OR operator to previous line.
Moved logical OR operator to previous line to fix the following
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>
2017-03-23 14:20:41 +01:00
Arushi Singhal 0dcb212413 staging: speakup: fixes braces {} should be used on all arms of this statement
This patch fixes the checks reported by checkpatch.pl
for braces {} should be used on all arms of this statement.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:20:41 +01:00
Arushi Singhal b8f107bc90 staging: speakup: Simplify "NULL" comparisons
Fixed coding style for null comparisons in speakup driver to be more
consistant with the rest of the kernel coding style.
Replaced 'x != NULL' with 'x' and 'x = NULL' with '!x'.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:20:41 +01:00
Arushi Singhal 049aa51558 staging: speakup: Moved logical to previous line.
Moved logical operator to previous line to fix the following
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>
2017-03-23 14:20:40 +01:00
Pranay Kr. Srivastava ad5a942f6c remove unnecessary initial allocation of vc
This patch removes the unnecessary allocation of
current foreground vc during initialization.

This initialization is already handled in the loop
that follows it for all available virtual consoles.

Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:16:52 +01:00
Pranay Kr. Srivastava 4e9cc9a0a5 return same error value from spk_set_key_info
This patch makes spk_set_key_info return -EINVAL
in case of failure instead of returning 4 different
values for the type of error that occurred.

Print the offending values instead as debug message.

Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:16:52 +01:00
Alan Cox 2c14d2e426 ov5693: remove unused function
It's commented out in the tree with a note saying to remove it. So let's remove it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:00:58 +01:00
Samuel Thibault e1f28c86a2 speakup: Fix spurious space pronunciation on spelling letters
This gathers emitting the caps start string, space, spelled letter
string, space, and caps stop string, into one printf, to avoid
sending to the synth a space character alone, which the synth would
then pronounce.

Similarly, emit space along control-letter and letter spelling.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Zahari Yurukov <zahari.yurukov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23 14:00:58 +01:00
Greg Kroah-Hartman c831c583f8 2nd set of new device support, features and cleanups for IIO in the 4.12 cycle
A good collection of outreachy related patches in here - mostly staging
 driver cleanup. Also a fair number of patches added explicit OF device ID
 tables for i2c drivers - a precursor to dropping (eventually) the implicit
 probing.
 
 New Device Support
 * Allwinner SoC ADC.
   - So far covers the sun4i-a10, sun5i-a13 and sun6i-a31 general purpose ADCs,
   including thermal side of things.
   This missed the last cycle due to my incompetence, so good to get in now,
   particularly as various patches dependent on it are appearing.
 * ltc2632
   - new driver supporting ltc2632-l12, ltc2632-l10, ltc2632-l8, ltc2632-h12,
     ltc-2632-h10, ltc-2632-h8 dacs
 
 Cleanups
 * Documentation
   - drop a broken reference to i2c/trivial-devices
 * ad2s1200
   - drop & from function pointers for consistency.
 * ad2s1210
   - formatting fixes.
 * ad7152
   - octal permissions instead of symbolic.
   - drop & from function pointers for consistent usage.
 * ad7192
   - drop & from function pointers for consistent usage.
 * ad7280
   - replace core mlock usage with a local lock as mlock is intended only to
   protect the current device state (direct reads, or triggered and buffered)
 * ad7746
   - drop & from function pointers for consistent usage.
   - replace core mlock usage with a local lock as mlock is intended only to
   protect the current device state (direct reads, or triggered and buffered)
 * ad7754
   - move contents of header file into source file as not used anywhere else.
 * ad7759
   - move contents of header file into source file as not used anywhere else.
 * ad7780
   - drop & from function pointers for consistent usage.
 * ad7832
   - replace core mlock usage with a local lock as mlock is intended only to
   protect the current device state (direct reads, or triggered and buffered)
 * ad9834
   - replace core mlock usage with a local lock as mlock is intended only to
   protect the current device state (direct reads, or triggered and buffered)
   - drop an unnecessary goto in favour of direct return.
 * adis16060
   - drop & from function pointers as inconsistent.
 * adis16201
   - drop a local mutex as the adis core already protects everything necessary.
   - drop & from function pointers for consistent usage.
 * adis16203
   - drop & from function pointers for consistent usage.
 * adis16209
   - drop a local mutex as the adis core already protects everything necessary.
   - use an enum for scan index giving slightly nicer code.
   - drop & from function pointers for consistent usage.
 * adis16240
   - drop a local mutex as the adis core already protects everything necessary.
   - use an enum for scan index giving slightly nicer code.
   - drop & from function pointers for consistent usage.
 * apds9960
   - add OF device ID table.
 * bma180
   - add OF device ID table.
   - prefer unsigned int to bare use of unsigned.
 * bmc150_magn
   - add OF device ID table.
 * hmp03
   - add OF device ID table.
 * ina2xx
   - add OF device ID table.
 * itg3200
   - add OF device ID table.
 * mag3110
   - add OF device ID table.
 * max11100
   - remove .owner field as it is set by the spi core.
 * max5821
   - add .of_match_table set to the ID table which was present but not used.
 * mcp4725
   - add OF device ID table.
 * mlx96014
   - add OF device ID table.
 * mma7455
   - add OF device ID table.
 * mma7660
   - add OF device ID table.
 * mpl3115
   - add OF device ID table.
 * mpu6050
   - add OF device ID table.
 * pc104
   - mask pc104 drivers behind a global pc104 config option.
 * ti-ads1015
   - add OF device ID table.
 * tsl2563
   - add OF device ID table.
 * us5182d
   - add OF device ID table.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAljRe1MRHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0Foh41xAAgVPrPnMF3vzHZADKbZRdvc0XPRoDl4Hf
 6Z9sL+5hFNskwH2tPGxCDigz/RZA6gjB5XLxv+gA/UYPyiYSRnlLNeslzL0HSkPL
 ACKN2f8mutzz0fJ9z5E14M7h+7y5/d3Chj3BmcCeVdHq900kgJaB0aJ7/YWEsvdj
 HGwDvpMvOXzLnVTFTPmJLqryQVZun4kSlpUFxieQlsNNkfkwJS5owdj2R2z/P/y/
 wNsUzeTmmACSbH2JLPrOd8krYnDnmP7xvkTUEfM5W4bOCI8sSRqlxKRseaWc4IPF
 dyxujpwKave+Yq4evmZi9k/BMvq4a5pqKI0TsHoA+LdGWc9vILO6av1S0xa/bM/L
 PAvjwPaDmJ9vfgUSQFsHLnYY2ZFF93Z1kGnGk28lwFKCcQT3qC0t9UjqBf1cyYuo
 yXjotmKeqn9fjgZcUW3HT9vGr6TLROsd3zjgBvrUg0cuBcv2i04nADHEtITS4ZQx
 oDgDqgxBbnbrjxM9DC91uPF8uMJRu+95OKjHe9p+MOzyg+BlquBjaIrg1XBsJpo/
 229PSOjg/g3KeVDS4op6+kyTr2fhn0hFdgiUdXDlnKdsOAbB9mhr9uGHFM3wm5PF
 CkXtHA2ke1ys9ygJzu/1FSKBZJhJRfcl46BUbO+Ea2VEvuTtKDXCTPeFD7vG5tHV
 1s6OUVuaZHw=
 =PwhQ
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-4.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

2nd set of new device support, features and cleanups for IIO in the 4.12 cycle

A good collection of outreachy related patches in here - mostly staging
driver cleanup. Also a fair number of patches added explicit OF device ID
tables for i2c drivers - a precursor to dropping (eventually) the implicit
probing.

New Device Support
* Allwinner SoC ADC.
  - So far covers the sun4i-a10, sun5i-a13 and sun6i-a31 general purpose ADCs,
  including thermal side of things.
  This missed the last cycle due to my incompetence, so good to get in now,
  particularly as various patches dependent on it are appearing.
* ltc2632
  - new driver supporting ltc2632-l12, ltc2632-l10, ltc2632-l8, ltc2632-h12,
    ltc-2632-h10, ltc-2632-h8 dacs

Cleanups
* Documentation
  - drop a broken reference to i2c/trivial-devices
* ad2s1200
  - drop & from function pointers for consistency.
* ad2s1210
  - formatting fixes.
* ad7152
  - octal permissions instead of symbolic.
  - drop & from function pointers for consistent usage.
* ad7192
  - drop & from function pointers for consistent usage.
* ad7280
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
* ad7746
  - drop & from function pointers for consistent usage.
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
* ad7754
  - move contents of header file into source file as not used anywhere else.
* ad7759
  - move contents of header file into source file as not used anywhere else.
* ad7780
  - drop & from function pointers for consistent usage.
* ad7832
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
* ad9834
  - replace core mlock usage with a local lock as mlock is intended only to
  protect the current device state (direct reads, or triggered and buffered)
  - drop an unnecessary goto in favour of direct return.
* adis16060
  - drop & from function pointers as inconsistent.
* adis16201
  - drop a local mutex as the adis core already protects everything necessary.
  - drop & from function pointers for consistent usage.
* adis16203
  - drop & from function pointers for consistent usage.
* adis16209
  - drop a local mutex as the adis core already protects everything necessary.
  - use an enum for scan index giving slightly nicer code.
  - drop & from function pointers for consistent usage.
* adis16240
  - drop a local mutex as the adis core already protects everything necessary.
  - use an enum for scan index giving slightly nicer code.
  - drop & from function pointers for consistent usage.
* apds9960
  - add OF device ID table.
* bma180
  - add OF device ID table.
  - prefer unsigned int to bare use of unsigned.
* bmc150_magn
  - add OF device ID table.
* hmp03
  - add OF device ID table.
* ina2xx
  - add OF device ID table.
* itg3200
  - add OF device ID table.
* mag3110
  - add OF device ID table.
* max11100
  - remove .owner field as it is set by the spi core.
* max5821
  - add .of_match_table set to the ID table which was present but not used.
* mcp4725
  - add OF device ID table.
* mlx96014
  - add OF device ID table.
* mma7455
  - add OF device ID table.
* mma7660
  - add OF device ID table.
* mpl3115
  - add OF device ID table.
* mpu6050
  - add OF device ID table.
* pc104
  - mask pc104 drivers behind a global pc104 config option.
* ti-ads1015
  - add OF device ID table.
* tsl2563
  - add OF device ID table.
* us5182d
  - add OF device ID table.
2017-03-22 11:56:03 +01:00
Tobin C. Harding 1770ae9d3f staging: ks7010: rename return value identifier
Driver uses multiple identifier names for the same task (retval, ret,
rc). It would be easier to read the code if a single task is
identified with a single name. 'ret' is the most common return value
identifier name found in the kernel tree, following the principle of
least surprise using 'ret' is a decent choice.

Rename rc -> ret
Rename retval -> ret

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding 1e765f3188 staging: ks7010: remove zero comparison
Comparison, equal to zero, is redundant

'if (foo == 0)'  is equal to  'if (!foo)'

Typical kernel coding style is to use the shorter form.

Remove unnecessary zero comparison.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding c133b9bd8f staging: ks7010: remove non-zero comparison
Comparison, does not equal zero, is redundant

'if (foo != 0)'  is equal to  'if (foo)'

Typical kernel coding style is to use the shorter form.

Remove unnecessary non-zero comparison.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding f283dd6901 staging: ks7010: make goto labels uniform
Driver uses different label forms for similar purposes. It would be
more clear if single use case has uniform label. 'out' is generic and
adds no meaning to label.

Documentation/process/coding-style.rst:
Choose label names which say what the goto does or why the goto
exists.

Rename labels so as to better describe what they do. If an execution
path only exists for the label on an error, prefix the label with
'err_'. If a non-error execution path exist do not use prefix.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding 13b05e467d staging: ks7010: return directly on error
Function uses goto label with no clean up code. In this case we
should just return directly.

Remove goto statement, return directly on error.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding 0185f6c963 staging: ks7010: fix checkpatch MULTIPLE_ASSIGNMENTS
Checkpatch emits CHECK: multiple assignments should be avoided.

Move multiple line assignment to individual lines.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding 5a21405ddb staging: ks7010: fix checkpatch BRACES
Checkpatch emits CHECK: Unbalanced braces around else
statement. Statements in question are single statements so we do not
need braces. Checkpatch also warns about multiple line dereference for
this code.

Fix if/else/else if statement use of braces. Fix function argument layout
at the same time since it is the same statement.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:56:07 +01:00
Tobin C. Harding 44c3cd5e04 staging: ks7010: fix checkpatch PARENTHESIS_ALIGNMENT
Checkpatch emits CHECK: Alignment should match open parenthesis.

Fix alignment to open parenthesis in line with kernel coding style.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:52:33 +01:00
Tobin C. Harding f842397229 staging: ks7010: fix checkpatch SPACING
Checkpatch emits CHECK: No space is necessary after a cast.

Remove unnecessary space after cast.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:52:33 +01:00
Tobin C. Harding 44f2bf55e2 staging: ks7010: fix checkpatch LINE_SPACING
Checkpatch emits CHECK: Please use a blank line after
function/struct/union/enum declarations.

Add blank line after function definition.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:52:33 +01:00
Stefan Wahren 2ea91ce574 staging: vchiq_arm: Fix MODULE_LICENSE
Regarding to the header the driver is licensed under BSD and GPL.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:52:33 +01:00
Arvind Yadav 4b4eda0017 Staging: media: Unmap and release region obtained by ioremap_nocache
Free memory mapping, if vpfe_ipipe_init is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:52:29 +01:00
Arushi Singhal 7369e062fd staging:sm750fb: Code readability is improved.
New variables are added to make the code more readable.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:45:30 +01:00
Ding-Chi Wang 50d94eac3e staging: rtl8712: checkpatch: Avoid multiple line dereferences
"WARNING: Avoid multiple line dereference - prefer 'poid_par_priv->information_buf_len'"
"WARNING: Avoid multiple line dereference - prefer 'padapter->registrypriv.dev_network.Configuration'"
"WARNING: Avoid multiple line dereference - prefer 'Adapter->mppriv.workparam.io_value'"

Signed-off-by: Ding-Chi Wang <dcwang.tw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:44:55 +01:00
Narcisa Ana Maria Vasile 217d31c4cd staging: lustre: libcfs: Define pr_fmt() to include relevant name
Define a pr_fmt() for tracefile.c
Remove redundant prefix 'Lustre' from pr_*() calls.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:42:41 +01:00
Narcisa Ana Maria Vasile f7b24d5397 staging: lustre: libcfs: Replace printk() with pr_*()
Convert printk() calls into corresponding pr_*() calls.

Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:42:41 +01:00
Jérémy Lefaure 447a7f934e staging: media: atomisp: fix build errors when PM is disabled
The function atomisp_restore_iumit_reg is unused when PM is disabled.
Adding __maybe_unused to the function definition avoids a warning.

The function atomisp_mrfld_power_down is defined only when PM is
enabled. So in atomisp_pci_probe, it should be called only when PM is
enabled.

Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:40:59 +01:00
Daeseok Youn 435ec8afa5 staging: atomisp: remove useless condition in if-statements
The css_pipe_id was checked with 'CSS_PIPE_ID_COPY' in previous if-
statement. In this case, if the css_pipe_id equals to 'CSS_PIPE_ID_COPY',
it could not enter the next if-statement. But the "next" if-statement
has the condition to check whether the css_pipe_id equals to
'CSS_PIPE_ID_COPY' or not. It should be removed.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:39:58 +01:00
Varsha Rao 00987f507c staging: media: atomisp: Remove unnecessary braces.
Remove braces which are not required to fix the check patch issue. The
following coccinelle script is used to fix this issue.

@@
expression e,e1;
@@
if(e)
-{
 e1;
-}

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>
2017-03-21 08:39:10 +01:00
Varsha Rao 2e58bb4a33 staging: media: atomisp: Remove unnecessary blank lines.
Remove multiple blank lines, which are not required. This patch fixes
the following check patch issue:

CHECK: Please don't use multiple blank lines

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>
2017-03-21 08:39:10 +01:00
Varsha Rao 3cd0d0920f staging: media: atomisp: Fix block comments warning.
Use kernel preferred block commenting style, to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21 08:39:10 +01:00