openwrt/staging/blogic.git
6 years agostaging: lustre: fix bug in osc_enter_cache_try
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: fix bug in osc_enter_cache_try

The lustre-release patch commit bdc5bb52c554 ("LU-4933 osc:
Automatically increase the max_dirty_mb") changed

-       if (cli->cl_dirty + PAGE_CACHE_SIZE <= cli->cl_dirty_max &&
+       if (cli->cl_dirty_pages < cli->cl_dirty_max_pages &&

When this patch landed in Linux a couple of years later, it landed as

-       if (cli->cl_dirty + PAGE_SIZE <= cli->cl_dirty_max &&
+       if (cli->cl_dirty_pages <= cli->cl_dirty_max_pages &&

which is clearly different ('<=' vs '<'), and allows cl_dirty_pages to
increase beyond cl_dirty_max_pages - which causes a latter assertion
to fails.

Fixes: 3147b268400a ("staging: lustre: osc: Automatically increase the max_dirty_mb")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obd_mount: use correct niduuid suffix.
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: obd_mount: use correct niduuid suffix.

Commit 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") moved
some sprintf() calls earlier in the code to combine them with
memory allocation and create kasprintf() calls.

In one case, this code movement moved the sprintf to a location where the
values being formatter were different.
In particular
       sprintf(niduuid, "%s_%x", mgcname, i);
was move from *after* the line
        i = 0;
to a location where the value of 'i' was at least 1.

This cause the wrong name to be formatted, and triggers

       CERROR("del MDC UUID %s failed: rc = %d\n",
              niduuid, rc);

at unmount time.

So use '0' instead of 'i'.

Fixes: 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove else after return statement
Santha Meena Ramamoorthy [Sat, 24 Feb 2018 22:56:36 +0000 (14:56 -0800)]
staging: lustre: remove else after return statement

Remove else after a return statement as it is not useful. Issue found
using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc/dpio: remove unused function
Anders Roxell [Tue, 6 Mar 2018 09:11:50 +0000 (10:11 +0100)]
staging: fsl-mc/dpio: remove unused function

gcc warns that function 'qbman_pull_desc_set_token' is not used.

drivers/staging/fsl-mc/bus/dpio/qbman-portal.c:525:13: warning: ‘qbman_pull_desc_set_token’ defined but not used [-Wunused-function]

In the current code we remove that function.

Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename u16DummyReasonCode to avoid camelCase
Ajay Singh [Fri, 2 Mar 2018 14:22:49 +0000 (19:52 +0530)]
staging: wilc1000: rename u16DummyReasonCode to avoid camelCase

Fix 'Avoid camelCase' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in handle_rcvd_ntwrk_info()
Ajay Singh [Fri, 2 Mar 2018 14:22:48 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in handle_rcvd_ntwrk_info()

Fix 'line over 80 character' issues found by checkpatch.pl script by
use of temporary variable and avoided leading tab.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename handle_connect_timeout() variables to avoid camelCase
Ajay Singh [Fri, 2 Mar 2018 14:22:47 +0000 (19:52 +0530)]
staging: wilc1000: rename handle_connect_timeout() variables to avoid camelCase

Fix 'Avoid camelCase' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_scan_complete_received()
Ajay Singh [Fri, 2 Mar 2018 14:22:46 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_scan_complete_received()

Fix 'line over 80 character' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_del_allstation() & wilc_deinit()
Ajay Singh [Fri, 2 Mar 2018 14:22:45 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_del_allstation() & wilc_deinit()

Fix 'line over 80 characters' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_add_ptk()
Ajay Singh [Fri, 2 Mar 2018 14:22:44 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_add_ptk()

Fix 'line over 80 characters' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename pstrHostIFkeyAttr to avoid camelCase issue
Ajay Singh [Fri, 2 Mar 2018 14:22:43 +0000 (19:52 +0530)]
staging: wilc1000: rename pstrHostIFkeyAttr to avoid camelCase issue

Fix 'Avoid camelCase' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in host_int_parse_join_bss_param()
Ajay Singh [Fri, 2 Mar 2018 14:22:42 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in host_int_parse_join_bss_param()

Fix 'line over 80 characters' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char for wilc_gnrl_async_info_received()
Ajay Singh [Fri, 2 Mar 2018 14:22:41 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char for wilc_gnrl_async_info_received()

Fix 'line over 80 char' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_network_info_received()
Ajay Singh [Fri, 2 Mar 2018 14:22:40 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_network_info_received()

Fix 'line over 80 character' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in handle_cfg_param()
Ajay Singh [Fri, 2 Mar 2018 14:22:39 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in handle_cfg_param()

Fix 'line over 80 char' issues found by checkpatch.pl script in
handle_cfg_param(). Rename variables and used temporary variables
to fix the line over 80 characters issue.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove always 'true' check from 'if' statement
Ajay Singh [Fri, 2 Mar 2018 14:22:38 +0000 (19:52 +0530)]
staging: wilc1000: remove always 'true' check from 'if' statement

Fix few smatch warning related to 'warn: always true condition'.

handle_cfg_param() warn: always true condition
'(cfg_param_attr->auth_timeout < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->rts_threshold < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->beacon_interval < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->site_survey_scan_time < 65536) => (0-u16max <
65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->active_scan_time < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->passive_scan_time < 65536) => (0-u16max < 65536)'

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename enuEvent to avoid camelCase
Ajay Singh [Fri, 2 Mar 2018 14:22:37 +0000 (19:52 +0530)]
staging: wilc1000: rename enuEvent to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_wlan_handle_rxq()
Ajay Singh [Fri, 2 Mar 2018 14:17:20 +0000 (19:47 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_handle_rxq()

Refactor wilc_wlan_handle_rxq() to fix line over 80 character issue
found by checkpatch.pl script. Added a new function to split
'wilc_wlan_handle_rxq' function code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set()
Ajay Singh [Fri, 2 Mar 2018 14:17:19 +0000 (19:47 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set()

Fix 'line over 80 characters' issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix open parenthesis mismatch in wilc_wlan_cfg_get()
Ajay Singh [Fri, 2 Mar 2018 14:17:18 +0000 (19:47 +0530)]
staging: wilc1000: fix open parenthesis mismatch in wilc_wlan_cfg_get()

Fix 'Alignment should match open parenthesis' issue found by
checkpatch.pl script. Reduce the leading tab, to make space for open
parenthesis match.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: Indent function parameter.
Quytelda Kahja [Tue, 6 Mar 2018 09:34:08 +0000 (01:34 -0800)]
staging: most: Indent function parameter.

Indent the parameters for a function call that extends past 80 characters.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: Add a blank line.
Quytelda Kahja [Tue, 6 Mar 2018 09:18:02 +0000 (01:18 -0800)]
staging: most: Add a blank line.

Use a blank line after components_show() function declaration.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Replace literal with constant.
Quytelda Kahja [Tue, 6 Mar 2018 10:00:04 +0000 (02:00 -0800)]
staging: ks7010: Replace literal with constant.

Replace literal bytestring with CIPHER_ID_WPA_WEP40 constant.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Remove unnecessary NULL checks
Dan Carpenter [Tue, 6 Mar 2018 10:03:56 +0000 (13:03 +0300)]
staging: emxx_udc: Remove unnecessary NULL checks

These pointers can't be NULL so I have removed the checks.

The checking was sort of problematic as well because it didn't make
sense.  In _nbu2ss_read_request_data() the && should have been ||.  In
nbu2ss_gad_get_frame() we know that "pgadget" is non-NULL and "udc" is
an offset from "pgadget" so it can't be NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Remove dead FRAGMENTS_T
Eric Anholt [Mon, 5 Mar 2018 20:28:02 +0000 (12:28 -0800)]
staging: vc04_services: Remove dead FRAGMENTS_T

It's not used in-tree, or in the downstream tree.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: replace NULL comparison with variable
Santha Meena Ramamoorthy [Mon, 5 Mar 2018 18:56:13 +0000 (10:56 -0800)]
staging: rtl8188eu: replace NULL comparison with variable

Replace NULL comparison of the variable with the variable name or
!variable to conform to the Linux kernel coding style. Issue found using
checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: place constant on the right side of test
Santha Meena Ramamoorthy [Mon, 5 Mar 2018 18:37:59 +0000 (10:37 -0800)]
staging: rtl8188eu: place constant on the right side of test

Place constants on the right side of the test during comparisons to
conform to the Linux kernel coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Replace memset with eth_zero_addr
Arushi Singhal [Sat, 3 Mar 2018 21:11:42 +0000 (02:41 +0530)]
staging: rtl8723bs: Replace memset with eth_zero_addr

Use eth_zero_addr to assign zero address to the given address array
instead of memset when the second argument in memset is address
of zero. Coccinelle was used to do the replacement and add the
header file linux/etherdevice.h if not already present.

The Coccinelle semantic patch that makes this change is as follows:
@header@
@@
#include <linux/etherdevice.h>

@r1@
expression e;
@@

-memset(e,0x00,ETH_ALEN);
+eth_zero_addr(e);

@includeheader depends on r1 && !header@
@@
+ #include <linux/etherdevice.h>
#include <...>

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Remove unnecessary semicolon.
Arushi Singhal [Sat, 3 Mar 2018 19:17:26 +0000 (00:47 +0530)]
staging: rtl8723bs: Remove unnecessary semicolon.

Remove unnecessary semicolon using semicolon.cocci Coccinelle script.

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>
6 years agostaging: rtl8192e: Add spaces around operators.
Dafna Hirschfeld [Fri, 2 Mar 2018 13:09:58 +0000 (15:09 +0200)]
staging: rtl8192e: Add spaces around operators.

Add spaces around arithmetic and bitwise operators to improve
readability of the code.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192e: Remove unnecessary parentheses
Dafna Hirschfeld [Fri, 2 Mar 2018 13:09:57 +0000 (15:09 +0200)]
staging: rtl8192e: Remove unnecessary parentheses

Remove unnecessary parentheses between 'address-of' operators
and a struct members.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192e: Fix issues regarding blank lines
Dafna Hirschfeld [Fri, 2 Mar 2018 13:09:56 +0000 (15:09 +0200)]
staging: rtl8192e: Fix issues regarding blank lines

Fix multiple blank lines and blank lines after braces.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: remove unnecessary parentheses
Arushi Singhal [Sat, 3 Mar 2018 05:32:36 +0000 (11:02 +0530)]
staging: rtl8712: remove unnecessary parentheses

Remove unnecessary parentheses around variables to conform to the Linux
kernel coding style. Issue found using checkpatch.

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>
6 years agostaging: rtl8712: Add spaces around '|'
Arushi Singhal [Sat, 3 Mar 2018 05:32:35 +0000 (11:02 +0530)]
staging: rtl8712: Add spaces around '|'

Add spaces around '|' to conform to the Linux
kernel coding style. Issue found using checkpatch.
CHECK: spaces preferred around that '|'.

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>
6 years agostaging: rtl8712: Added spaces around '+'
Arushi Singhal [Sat, 3 Mar 2018 05:32:34 +0000 (11:02 +0530)]
staging: rtl8712: Added spaces around '+'

Add spaces around arithmetic operator '+',  to conform to the Linux
kernel coding style. Issue found using checkpatch.

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>
6 years agostaging: rtl8712: Remove multiple blank line(s)
Arushi Singhal [Sat, 3 Mar 2018 05:32:33 +0000 (11:02 +0530)]
staging: rtl8712: Remove multiple blank line(s)

Remove extra blank line(s) to conform to the Linux
kernel coding style. Issue found using checkpatch.

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>
6 years agostaging: rtl8712: match alignment with open parenthesis
Arushi Singhal [Sat, 3 Mar 2018 05:32:32 +0000 (11:02 +0530)]
staging: rtl8712: match alignment with open parenthesis

Delete/Add tabs and spaces to align the code to fix the
checkpatch issue: "CHECK: Alignment should match open parenthesis".

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>
6 years agostaging: rtl8712: Fixed 'tabstop' coding style warning
Arushi Singhal [Sat, 3 Mar 2018 05:32:31 +0000 (11:02 +0530)]
staging: rtl8712: Fixed 'tabstop' coding style warning

Replace a mix of tabs and spaces indentation by tabs only.

Fixed checkpatch warning "Statements should start on a tabstop".

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>
6 years agostaging: vc04_services: bcm2835-audio: Change to unsigned int *
Nishka Dasgupta [Sat, 3 Mar 2018 19:12:44 +0000 (00:42 +0530)]
staging: vc04_services: bcm2835-audio: Change to unsigned int *

Change 'unsigned *' to 'unsigned int *'. Issue found with checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: bcm2835-audio Format multiline comment
Nishka Dasgupta [Sat, 3 Mar 2018 18:54:28 +0000 (00:24 +0530)]
staging: vc04_services: bcm2835-audio Format multiline comment

Format multiline comment by moving '*/' to a new line. Issue found with
checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: bcm2835-audio: Add blank line after declaration
Nishka Dasgupta [Thu, 1 Mar 2018 19:38:27 +0000 (01:08 +0530)]
staging: vc04_services: bcm2835-audio: Add blank line after declaration

Add blank line after declaration. Issue found with checkpatch.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Remove nonessential semicolon
Arushi Singhal [Sat, 3 Mar 2018 19:09:13 +0000 (00:39 +0530)]
staging: rtlwifi: Remove nonessential semicolon

Remove non-essential semicolon after 'else' and 'switch' statements. Issue
found using semicolon.cocci Coccinelle script.

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>
6 years agostaging: rtlwifi: remove unneeded semicolon
Santha Meena Ramamoorthy [Fri, 2 Mar 2018 14:14:39 +0000 (06:14 -0800)]
staging: rtlwifi: remove unneeded semicolon

Remove unneeded semicolon after 'while' and 'switch' statements. Issue
found using semicolon.cocci Coccinelle script.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: remove condition where it has no effect
Santha Meena Ramamoorthy [Fri, 2 Mar 2018 10:34:03 +0000 (02:34 -0800)]
staging: rtlwifi: remove condition where it has no effect

Remove condition where if and else branch are identical.
Issue found using cond_no_effect.cocci Coccinelle script.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: Fix style violation for line ending in '('
Rinkle Jain [Sun, 4 Mar 2018 07:22:25 +0000 (12:52 +0530)]
staging: vt6655: Fix style violation for line ending in '('

Replace line ending with '(' with function parameters to resolve
style issue found by checkpath.

Signed-off-by: Rinkle Jain <rinklejain96@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: remove unnecessary parentheses
Santha Meena Ramamoorthy [Fri, 2 Mar 2018 14:05:52 +0000 (06:05 -0800)]
staging: vt6655: remove unnecessary parentheses

Remove unnecessary parentheses around variables to conform to the Linux
kernel coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: Replace 'unsigned' with 'unsigned int'
Dafna Hirschfeld [Sun, 4 Mar 2018 20:09:34 +0000 (22:09 +0200)]
staging: lustre: obdclass: Replace 'unsigned' with 'unsigned int'

Replace 'unsigned' with 'unsigned int' to improve readability.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: Add 'const' to char* array
Dafna Hirschfeld [Sun, 4 Mar 2018 20:09:33 +0000 (22:09 +0200)]
staging: lustre: obdclass: Add 'const' to char* array

Replace 'const char*' arrays with 'const char * const'
since the values in the arrays are not changed.
Issues found with checkpatch.pl

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: obdclass: Fix comparison to NULL
Dafna Hirschfeld [Sun, 4 Mar 2018 20:09:32 +0000 (22:09 +0200)]
staging: lustre: obdclass: Fix comparison to NULL

Replace comparison to NULL with a 'not' operator.
Issue found with checkpatch.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: Replace "dont" with "don't"
Arushi Singhal [Sun, 4 Mar 2018 14:16:08 +0000 (19:46 +0530)]
staging: lustre: Replace "dont" with "don't"

Replace "dont" with "don't".
"Dont" is not same as "Do not" or "Don't".

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>
6 years agostaging: lustre: Replace "to to" with "to"
Arushi Singhal [Sun, 4 Mar 2018 14:16:07 +0000 (19:46 +0530)]
staging: lustre: Replace "to to" with "to"

This patch replace "to to" with "to".

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>
6 years agostaging: lustre: Replace "be be" with "be"
Arushi Singhal [Sun, 4 Mar 2018 14:16:06 +0000 (19:46 +0530)]
staging: lustre: Replace "be be" with "be"

This patch replace "be be" with "be".

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>
6 years agostaging: comedi: Replace "dont" with "don't
Arushi Singhal [Mon, 5 Mar 2018 04:28:08 +0000 (09:58 +0530)]
staging: comedi: Replace "dont" with "don't

Replace "dont" with "don't".
"Dont" is not same as "Do not" or "Don't".

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>
6 years agostaging: speakup: match alignment with open parenthesis
Santha Meena Ramamoorthy [Mon, 5 Mar 2018 17:34:13 +0000 (09:34 -0800)]
staging: speakup: match alignment with open parenthesis

Match alignment with the open parenthesis to conform to the Linux kernel
coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: Cleanup dpbp and dpcon API
Bogdan Purcareata [Thu, 1 Mar 2018 17:47:10 +0000 (11:47 -0600)]
staging: fsl-mc: Cleanup dpbp and dpcon API

Some functions and associated structures are not used by current code,
so remove them.

Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Replace local frame type constants with kernel constants.
Quytelda Kahja [Thu, 1 Mar 2018 05:19:11 +0000 (21:19 -0800)]
staging: ks7010: Replace local frame type constants with kernel constants.

This driver defined constants FRAME_TYPE_* to represent frame control
field codes; however, these constants are already defined in the header
'linux/ieee80211.h' as  IEEE80211_STYPE_*.  This change removes the locally
defined constants and substitutes the kernel's constants.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Replace local capability constants with kernel constants.
Quytelda Kahja [Thu, 1 Mar 2018 05:19:10 +0000 (21:19 -0800)]
staging: ks7010: Replace local capability constants with kernel constants.

This driver defined constants BSS_CAP_* to represent WLAN capability
codes; however, these constants are already defined in the header
'linux/ieee80211.h' as WLAN_CAPABILITY_*.  This change removes the locally
defined constants and substitutes the kernel's constants.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.
Quytelda Kahja [Thu, 1 Mar 2018 05:19:09 +0000 (21:19 -0800)]
staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.

The code that generates a WLAN capability mask is repeated in five
functions.  This change refactors that code into a new function, which is
called now in each of those functions.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN.
Quytelda Kahja [Thu, 1 Mar 2018 05:19:08 +0000 (21:19 -0800)]
staging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN.

SSID_MAX_SIZE is a constant defined locally in ks_hostif.h, but it should
be replaced with IEEE80211_MAX_SSID_LEN from the kernel's 802.11 header,
of which it is just a copy.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Use constants from ieee80211_eid instead of literal ints.
Quytelda Kahja [Thu, 1 Mar 2018 05:19:07 +0000 (21:19 -0800)]
staging: ks7010: Use constants from ieee80211_eid instead of literal ints.

The case statement in get_ap_information() should not use literal integers
to parse information element IDs when these values are provided by name
in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: use lib80211 CCMP decrypt
Ivan Safonov [Fri, 23 Feb 2018 14:57:42 +0000 (17:57 +0300)]
staging:r8188eu: use lib80211 CCMP decrypt

Custom AES decrypt implementation replaced with lib80211 library.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: fix u8 less than zero check
Colin Ian King [Fri, 23 Feb 2018 15:00:08 +0000 (15:00 +0000)]
staging: rtl8723bs: fix u8 less than zero check

The error variable ret is currently a u8 and so two comparisons
to see if an error return is less than zero will always be false
because ret is unsigned.  Fix this by making ret an int.

Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: remove unnecessary blank lines
Jeremy Fertic [Sat, 24 Feb 2018 00:55:52 +0000 (17:55 -0700)]
staging: vt6655: remove unnecessary blank lines

Remove unnecessary blank lines found using checkpatch.pl script.

Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc/dpio: qbman_pull_desc_set_token() can be static
Fengguang Wu [Wed, 28 Feb 2018 02:55:50 +0000 (10:55 +0800)]
staging: fsl-mc/dpio: qbman_pull_desc_set_token() can be static

Fixes: 1628e2e4dc76 ("staging: fsl-mc/dpio: allow the driver to compile multi-arch")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-dpaa2/eth: Fix incorrect casts
Ioana Radulescu [Mon, 26 Feb 2018 16:28:06 +0000 (10:28 -0600)]
staging: fsl-dpaa2/eth: Fix incorrect casts

The DPAA2 Ethernet driver incorrectly assumes virtual addresses
are always 64b long, which causes compiler errors when building
for a 32b platform.

Fix this by using explicit casts to uintptr_t where necessary.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc/dpio: allow the driver to compile multi-arch
Ioana Radulescu [Mon, 26 Feb 2018 16:28:05 +0000 (10:28 -0600)]
staging: fsl-mc/dpio: allow the driver to compile multi-arch

Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
thus allowing this driver to compile on all architectures supported
by the fsl-mc bus driver.

This was compile tested on:
 - powerpc (corenet_basic_defconfig, ppc64_defconfig)
 - x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
 - arm64 (defconfig)

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: dpio: remove foolish -Werror Makefile addtion
Greg Kroah-Hartman [Thu, 1 Mar 2018 16:27:50 +0000 (17:27 +0100)]
staging: fsl-mc: dpio: remove foolish -Werror Makefile addtion

With the zillion different compilers out there, never use -Werror,
otherwise your code will end up breaking the build for odd reasons.

Like now, if this driver is enabled, it breaks the build due to a
function that could be marked static.  So it's obvious no one is even
paying attention to this driver :(

Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc/dpio: Fix incorrect casts
Ioana Radulescu [Mon, 26 Feb 2018 16:28:04 +0000 (10:28 -0600)]
staging: fsl-mc/dpio: Fix incorrect casts

The DPIO driver incorrectly assumes virtual addresses are always
64b long, which causes compiler errors when building for a 32b
platform.

Fix this by using explicit casts to uintptr_t where necessary.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr
Colin Ian King [Wed, 28 Feb 2018 11:28:49 +0000 (11:28 +0000)]
staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr

Currently the allocation of priv->oldaddr is not null checked which will
lead to subsequent errors when accessing priv->oldaddr.  Fix this with
a null pointer check and a return of -ENOMEM on allocation failure.

Detected with Coccinelle:
drivers/staging/rtl8192u/r8192U_core.c:1708:2-15: alloc with no test,
possible model on line 1723

Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename WILC_WFI_mgmt_rx() to avoid camelCase
Ajay Singh [Mon, 26 Feb 2018 16:31:59 +0000 (22:01 +0530)]
staging: wilc1000: rename WILC_WFI_mgmt_rx() to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: move multiple definition of same macro to common header
Ajay Singh [Mon, 26 Feb 2018 16:31:58 +0000 (22:01 +0530)]
staging: wilc1000: move multiple definition of same macro to common header

Move the same #define from multiple '.c' files to common header file.
Instead of having same macro in different '.c' files, now kept in
common '.h' file.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_wlan_handle_txq()
Ajay Singh [Mon, 26 Feb 2018 16:31:57 +0000 (22:01 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_handle_txq()

Refactor wilc_wlan_handle_txq() to fix 'line over 80 char' issue found
by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename label _end_ in wilc_wlan_handle_txq()
Ajay Singh [Mon, 26 Feb 2018 16:31:56 +0000 (22:01 +0530)]
staging: wilc1000: rename label _end_ in wilc_wlan_handle_txq()

Rename label name starting with '_' to follow as per linux coding style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unnecessary while(0) in wilc_wlan_handle_txq()
Ajay Singh [Mon, 26 Feb 2018 16:31:55 +0000 (22:01 +0530)]
staging: wilc1000: remove unnecessary while(0) in wilc_wlan_handle_txq()

Refactor wilc_wlan_handle_txq() by removing unnecessary while(0)
loop. "Line over 80 char" issues in wilc_wlan_handle_txq() are fix by
reducing extra leading tab.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: Fix missing identifier in function definition argument.
Quytelda Kahja [Sat, 24 Feb 2018 07:58:35 +0000 (23:58 -0800)]
staging: most: Fix missing identifier in function definition argument.

The function pointer 'complete' in 'struct mbo' should use an identifier
for its argument.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: most: Remove unnecessary OOM messages.
Quytelda Kahja [Sat, 24 Feb 2018 07:58:34 +0000 (23:58 -0800)]
staging: most: Remove unnecessary OOM messages.

It isn't necessary for the driver to log out-of-memory errors, so
these have been removed and the functions simply return -ENOMEM.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192e: move logical continuation to previous line
Santha Meena Ramamoorthy [Wed, 28 Feb 2018 20:40:48 +0000 (12:40 -0800)]
staging: rtl8192e: move logical continuation to previous line

Move logical continuation '&&' to the previous line to conform to the
Linux kernel coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: replace NULL comparison with variable
Santha Meena Ramamoorthy [Wed, 28 Feb 2018 22:51:12 +0000 (14:51 -0800)]
staging: vt6655: replace NULL comparison with variable

Replace NULL comparison of the variable with just the variable name to
conform to the Linux kernel coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fix block comment style
Santha Meena Ramamoorthy [Wed, 28 Feb 2018 19:45:05 +0000 (11:45 -0800)]
staging: lustre: fix block comment style

Add trailing */ on a separate line for block comments to conform to
the Linux kernel coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: use kmemdup for allocation and copy
Dafna Hirschfeld [Tue, 27 Feb 2018 21:44:27 +0000 (23:44 +0200)]
staging: rtl8723bs: use kmemdup for allocation and copy

Use kmemdup instead of kzalloc and memcpy to simplify the code.
Issue found with coccicheck.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet/selftest: don't ignore status from lstcon_test_add
NeilBrown [Thu, 22 Feb 2018 22:09:33 +0000 (09:09 +1100)]
staging: lustre: lnet/selftest: don't ignore status from lstcon_test_add

If lstcon_test_add sets 'ret' (passed by reference) to 1,
then lst_test_add_ioctl() ignores the return value.
This isn't justified - the return value must be zero for 'ret'
to be meaningful.

Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lmv: correctly iput lmo_root
NeilBrown [Thu, 22 Feb 2018 22:09:33 +0000 (09:09 +1100)]
staging: lustre: lmv: correctly iput lmo_root

Commit 8f18c8a48b73 ("staging: lustre: lmv: separate master object
with master stripe") changed how lmo_root inodes were managed,
particularly when LMV_HASH_FLAG_MIGRATION is not set.
Previously lsm_md_oinfo[0].lmo_root was always a borrowed
inode reference and didn't need to by iput().
Since the change, that special case only applies when
LMV_HASH_FLAG_MIGRATION is set

In the upstream (lustre-release) version of this patch [Commit
60e07b972114 ("LU-4690 lod: separate master object with master
stripe")] the for loop in the lmv_unpack_md() was changed to count
from 0 and to ignore entry 0 if LMV_HASH_FLAG_MIGRATION is set.
In the patch that got applied to Linux, that change was missing,
so lsm_md_oinfo[0].lmo_root is never iput().
This results in a "VFS: Busy inodes" warning at unmount.

Fixes: 8f18c8a48b73 ("staging: lustre: lmv: separate master object with master stripe")
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lov: use correct env in lov_io_data_version_end()
NeilBrown [Thu, 22 Feb 2018 22:09:33 +0000 (09:09 +1100)]
staging: lustre: lov: use correct env in lov_io_data_version_end()

lov - the logical object volume manager - is responsible for
striping data across multiple volumes.

So when it is given a request, it creates one or more
sub-requests, one for each target volume.  Each sub_io
request has a sub_env environment which it operates in.

When lov_io_data_version_end() calls lov_io_end_wrapper() to
wait for and close off a sub_io, it passes the wrong
environment.

This causes an LINVRNT() to fail in cl2osc_io(), and may
cause other problems.

This patch changes the call to use ->sub_env, much like
other code in the same file.

Fixes: f0cf21abcccc ("staging: lustre: clio: add CIT_DATA_VERSION and remove IOC_LOV_GETINFO")
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c."
Greg Kroah-Hartman [Tue, 27 Feb 2018 13:42:14 +0000 (14:42 +0100)]
Revert "Staging: bcm2048: Fix function argument alignment in radio-bcm2048.c."

This reverts commit 444634f5ed6f0179cd63ff09bea62c03963ad0f9.

Should not be going through my tree, sorry about that.

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: merge 'if' statements that test the same condition
Dafna Hirschfeld [Sat, 24 Feb 2018 10:27:26 +0000 (12:27 +0200)]
staging: wilc1000: merge 'if' statements that test the same condition

Merge the instructions of two 'if' statements that test the same
condition and move a 'memcpy' instruction related to a different variable.
Issue found with coccicheck.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192e: use struct pointer to get the size of the struct
Santha Meena Ramamoorthy [Sat, 24 Feb 2018 21:46:33 +0000 (13:46 -0800)]
staging: rtl8192e: use struct pointer to get the size of the struct

Use pointer to the structure to get the size of the structure in order
to conform to the Linux kernel coding style. Issue found using
checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: speakup: add braces around else statement
Santha Meena Ramamoorthy [Sat, 24 Feb 2018 23:25:49 +0000 (15:25 -0800)]
staging: speakup: add braces around else statement

Add braces {} around else statement to conform to the Linux kernel
coding style. Issue found using checkpatch.

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8192u: Fix alignments in 'if' statements
Dafna Hirschfeld [Sun, 25 Feb 2018 20:19:36 +0000 (22:19 +0200)]
staging: rtl8192u: Fix alignments in 'if' statements

Fix alignments in two 'if' statements and break lines
to avoid over 80 characters lines.
Issues found with coccicheck.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fsl-mc: merge fix for CONFIG_FSL_MC_BUS moving
Stephen Rothwell [Fri, 23 Feb 2018 02:28:36 +0000 (13:28 +1100)]
staging: fsl-mc: merge fix for CONFIG_FSL_MC_BUS moving

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoMerge 4.16-rc3 into staging-next
Greg Kroah-Hartman [Mon, 26 Feb 2018 14:32:00 +0000 (15:32 +0100)]
Merge 4.16-rc3 into staging-next

We want the IIO/Staging fixes in here, and to resolve a merge problem
with the move of the fsl-mc code.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoLinux 4.16-rc3
Linus Torvalds [Mon, 26 Feb 2018 02:50:41 +0000 (18:50 -0800)]
Linux 4.16-rc3

6 years agoMerge tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa
Linus Torvalds [Mon, 26 Feb 2018 01:02:24 +0000 (17:02 -0800)]
Merge tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa

Pull Xtensa fixes from Max Filippov:
 "Two fixes for reserved memory/DMA buffers allocation in high memory on
  xtensa architecture

   - fix memory accounting when reserved memory is in high memory region

   - fix DMA allocation from high memory"

* tag 'xtensa-20180225' of git://github.com/jcmvbkbc/linux-xtensa:
  xtensa: support DMA buffers in high memory
  xtensa: fix high memory/reserved memory collision

6 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Feb 2018 00:58:55 +0000 (16:58 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "A small set of fixes:

   - UAPI data type correction for hyperv

   - correct the cpu cores field in /proc/cpuinfo on CPU hotplug

   - return proper error code in the resctrl file system failure path to
     avoid silent subsequent failures

   - correct a subtle accounting issue in the new vector allocation code
     which went unnoticed for a while and caused suspend/resume
     failures"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/topology: Update the 'cpu cores' field in /proc/cpuinfo correctly across CPU hotplug operations
  x86/topology: Fix function name in documentation
  x86/intel_rdt: Fix incorrect returned value when creating rdgroup sub-directory in resctrl file system
  x86/apic/vector: Handle vector release on CPU unplug correctly
  genirq/matrix: Handle CPU offlining proper
  x86/headers/UAPI: Use __u64 instead of u64 in <uapi/asm/hyperv.h>

6 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Feb 2018 00:57:22 +0000 (16:57 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fix from Thomas Gleixner:
 "A single commit which shuts up a bogus GCC-8 warning"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/oprofile: Fix bogus GCC-8 warning in nmi_setup()

6 years agoMerge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Feb 2018 00:29:59 +0000 (16:29 -0800)]
Merge branch 'locking-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull locking fixes from Thomas Gleixner:
 "Three patches to fix memory ordering issues on ALPHA and a comment to
  clarify the usage scope of a mutex internal function"

* 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  locking/xchg/alpha: Fix xchg() and cmpxchg() memory ordering bugs
  locking/xchg/alpha: Clean up barrier usage by using smp_mb() in place of __ASM__MB
  locking/xchg/alpha: Add unconditional memory barrier to cmpxchg()
  locking/mutex: Add comment to __mutex_owner() to deter usage

6 years agoMerge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 26 Feb 2018 00:27:51 +0000 (16:27 -0800)]
Merge branch 'core-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull cleanup patchlet from Thomas Gleixner:
 "A single commit removing a bunch of bogus double semicolons all over
  the tree"

* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  treewide/trivial: Remove ';;$' typo noise

6 years agoMerge tag 'nfs-for-4.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sun, 25 Feb 2018 21:43:18 +0000 (13:43 -0800)]
Merge tag 'nfs-for-4.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

 - fix a broken cast in nfs4_callback_recallany()

 - fix an Oops during NFSv4 migration events

 - make struct nlmclnt_fl_close_lock_ops static

* tag 'nfs-for-4.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: make struct nlmclnt_fl_close_lock_ops static
  nfs: system crashes after NFS4ERR_MOVED recovery
  NFSv4: Fix broken cast in nfs4_callback_recallany()

6 years agoMerge tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sun, 25 Feb 2018 00:05:50 +0000 (16:05 -0800)]
Merge tag 'powerpc-4.16-4' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Add handling for a missing instruction in our 32-bit BPF JIT so that
   it can be used for seccomp filtering.

 - Add a missing NULL pointer check before a function call in new EEH
   code.

 - Fix an error path in the new ocxl driver to correctly return EFAULT.

 - The support for the new ibm,drc-info device tree property turns out
   to need several fixes, so for now we just stop advertising to
   firmware that we support it until the bugs can be ironed out.

 - One fix for the new drmem code which was incorrectly modifying the
   device tree in place.

 - Finally two fixes for the RFI flush support, so that firmware can
   advertise to us that it should be disabled entirely so as not to
   affect performance.

Thanks to: Bharata B Rao, Frederic Barrat, Juan J. Alvarez, Mark Lord,
Michael Bringmann.

* tag 'powerpc-4.16-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/powernv: Support firmware disable of RFI flush
  powerpc/pseries: Support firmware disable of RFI flush
  powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2
  powerpc/bpf/jit: Fix 32-bit JIT for seccomp_data access
  powerpc/pseries: Revert support for ibm,drc-info devtree property
  powerpc/pseries: Fix duplicate firmware feature for DRC_INFO
  ocxl: Fix potential bad errno on irq allocation
  powerpc/eeh: Fix crashes in eeh_report_resume()

6 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Fri, 23 Feb 2018 23:14:17 +0000 (15:14 -0800)]
Merge git://git./linux/kernel/git/davem/net

Pull networking fixes from David Miller:

 1) Fix TTL offset calculation in mac80211 mesh code, from Peter Oh.

 2) Fix races with procfs in ipt_CLUSTERIP, from Cong Wang.

 3) Memory leak fix in lpm_trie BPF map code, from Yonghong Song.

 4) Need to use GFP_ATOMIC in BPF cpumap allocations, from Jason Wang.

 5) Fix potential deadlocks in netfilter getsockopt() code paths, from
    Paolo Abeni.

 6) Netfilter stackpointer size checks really are needed to validate
    user input, from Florian Westphal.

 7) Missing timer init in x_tables, from Paolo Abeni.

 8) Don't use WQ_MEM_RECLAIM in mac80211 hwsim, from Johannes Berg.

 9) When an ibmvnic device is brought down then back up again, it can be
    sent queue entries from a previous session, handle this properly
    instead of crashing. From Thomas Falcon.

10) Fix TCP checksum on LRO buffers in mlx5e, from Gal Pressman.

11) When we are dumping filters in cls_api, the output SKB is empty, and
    the filter we are dumping is too large for the space in the SKB, we
    should return -EMSGSIZE like other netlink dump operations do.
    Otherwise userland has no signal that is needs to increase the size
    of its read buffer. From Roman Kapl.

12) Several XDP fixes for virtio_net, from Jesper Dangaard Brouer.

13) Module refcount leak in netlink when a dump start fails, from Jason
    Donenfeld.

14) Handle sub-optimal GSO sizes better in TCP BBR congestion control,
    from Eric Dumazet.

15) Releasing bpf per-cpu arraymaps can take a long time, add a
    condtional scheduling point. From Eric Dumazet.

16) Implement retpolines for tail calls in x64 and arm64 bpf JITs. From
    Daniel Borkmann.

17) Fix page leak in gianfar driver, from Andy Spencer.

18) Missed clearing of estimator scratch buffer, from Eric Dumazet.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (76 commits)
  net_sched: gen_estimator: fix broken estimators based on percpu stats
  gianfar: simplify FCS handling and fix memory leak
  ipv6 sit: work around bogus gcc-8 -Wrestrict warning
  macvlan: fix use-after-free in macvlan_common_newlink()
  bpf, arm64: fix out of bounds access in tail call
  bpf, x64: implement retpoline for tail call
  rxrpc: Fix send in rxrpc_send_data_packet()
  net: aquantia: Fix error handling in aq_pci_probe()
  bpf: fix rcu lockdep warning for lpm_trie map_free callback
  bpf: add schedule points in percpu arrays management
  regulatory: add NUL to request alpha2
  ibmvnic: Fix early release of login buffer
  net/smc9194: Remove bogus CONFIG_MAC reference
  net: ipv4: Set addr_type in hash_keys for forwarded case
  tcp_bbr: better deal with suboptimal GSO
  smsc75xx: fix smsc75xx_set_features()
  netlink: put module reference if dump start fails
  selftests/bpf/test_maps: exit child process without error in ENOMEM case
  selftests/bpf: update gitignore with test_libbpf_open
  selftests/bpf: tcpbpf_kern: use in6_* macros from glibc
  ..

6 years agoMerge branch 'fixes-v4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorr...
Linus Torvalds [Fri, 23 Feb 2018 23:04:24 +0000 (15:04 -0800)]
Merge branch 'fixes-v4.16-rc3' of git://git./linux/kernel/git/jmorris/linux-security

Pull security subsystem fixes from James Morris:

 - keys fixes via David Howells:
      "A collection of fixes for Linux keyrings, mostly thanks to Eric
       Biggers:

        - Fix some PKCS#7 verification issues.

        - Fix handling of unsupported crypto in X.509.

        - Fix too-large allocation in big_key"

 - Seccomp updates via Kees Cook:
      "These are fixes for the get_metadata interface that landed during
       -rc1. While the new selftest is strictly not a bug fix, I think
       it's in the same spirit of avoiding bugs"

 - an IMA build fix from Randy Dunlap

* 'fixes-v4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  integrity/security: fix digsig.c build error with header file
  KEYS: Use individual pages in big_key for crypto buffers
  X.509: fix NULL dereference when restricting key with unsupported_sig
  X.509: fix BUG_ON() when hash algorithm is unsupported
  PKCS#7: fix direct verification of SignerInfo signature
  PKCS#7: fix certificate blacklisting
  PKCS#7: fix certificate chain verification
  seccomp: add a selftest for get_metadata
  ptrace, seccomp: tweak get_metadata behavior slightly
  seccomp, ptrace: switch get_metadata types to arch independent