1
0
Fork 0
Commit Graph

53364 Commits (479826cc86118e0d87e5cefb3df5b748e0480924)

Author SHA1 Message Date
Gustavo A. R. Silva 479826cc86 staging: comedi: ni_660x: fix missing break in switch statement
Add missing break statement in order to prevent the code from falling
through to the default case and return -EINVAL every time.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: aa94f28888 ("staging: comedi: ni_660x: tidy up ni_660x_set_pfi_routing()")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-13 19:43:34 +01:00
Chengguang Xu 209312369e staging: erofs: remove redundant unlikely annotation in unzip_vle.c
unlikely has already included in IS_ERR(),
so just remove it.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-12 10:45:45 +01:00
Chengguang Xu 7fadcdce5d staging: erofs: remove redundant likely/unlikely annotation in namei.c
unlikely has already included in IS_ERR(),
so just remove redundant likely/unlikely
annotation.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-12 10:45:45 +01:00
Sergio Paracuellos 52ec10337c staging: mt7621-pci: update driver's TODO file
Some of the things included in driver's TODO file have
been properly achieved. Update file accordly.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:50 +01:00
Guilherme Tadashi Maeoka d099c72d38 Staging: mt7621-pci: Fix space required coding style
Fix some space required coding style.

Signed-off-by: Guilherme Tadashi Maeoka <gui.maeoka@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:50 +01:00
Himadri Pandya 7ed27a0941 staging: rtl8192e: rename parameters of function dot11d_update_country - style
Rename following parameters of function dot11d_update_country to fix
checkpatch warning: Avoid CamelCase and make the parameter names more
readable, understandable.
	pTaddr -> address
	CoutryIeLen -> country_len
	pCoutryIe -> country

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:47 +01:00
Himadri Pandya 5441ab2ff5 staging: rtl8192e: rename local variables of function dot11d_update_country - style
Rename following local variables of function dot11d_update_country to
fix checkpatch warning: Avoid CamelCase and make the variable names more
readable, understandable.
	NumTriples -> number_of_triples
	MaxChnlNum -> max_channel_number
	pTriple -> triple

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:47 +01:00
Himadri Pandya c40cac3b76 staging: rtl8192e: rename function DOT11D_ScanComplete to dot11d_scan_complete - style
Rename function DOT11D_ScanComplete to dot11d_scan_complete to fix
checkpatch warning: Avoid CamelCase.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:47 +01:00
Himadri Pandya 43defd9328 staging: rtl8192e: rename function Dot11d_UpdateCountryIe to dot11d_update_country - style
Rename function Dot11d_UpdateCountryIe to dot11d_update_country to fix
checkpatch warning: Avoid CamelCase.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:47 +01:00
Himadri Pandya 8e9f5da2fd staging: rtl8192e: rename function Dot11d_Reset to dot11d_reset - style
Rename function Dot11d_Reset to dot11d_reset to fix checkpatch warning:
Avoid CamelCase.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:47 +01:00
Himadri Pandya 30c311a2a4 staging: rtl8192e: rename function Dot11d_Channelmap to dot11d_channel_map - style
Rename function Dot11d_Channelmap to dot11d_channel_map to fix
checkpatch warning: Avoid CamelCase.

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 10:02:47 +01:00
Greg Kroah-Hartman 3b6effbc38 Merge 5.0-rc6 into staging-next
We need the staging fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-11 09:25:01 +01:00
Linus Torvalds e464f50c05 Staging/IIO driver fixes for 5.0-rc6
Here are some small iio and staging driver fixes for 5.0-rc6.
 
 Nothing big, just resolve some reported IIO driver issues, and one
 staging driver bug.  One staging driver patch was added and then
 reverted as well.
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXF08/g8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yncDQCdHPommvFLUaEcsStGC8Ijg6kBn8IAoJTxwIvQ
 Qt9HCHiSuniry6xGY+UP
 =lZ/Y
 -----END PGP SIGNATURE-----

Merge tag 'staging-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging/IIO driver fixes from Greg KH:
 "Here are some small iio and staging driver fixes for 5.0-rc6.

  Nothing big, just resolve some reported IIO driver issues, and one
  staging driver bug. One staging driver patch was added and then
  reverted as well.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
  Revert "staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()"
  staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()
  staging: octeon: fix broken phylib usage
  iio: ti-ads8688: Update buffer allocation for timestamps
  tools: iio: iio_generic_buffer: make num_loops signed
  iio: adc: axp288: Fix TS-pin handling
  iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsius
2019-02-08 10:51:59 -08:00
K Hodges c2f4dd4364 staging: wlan-ng: formatting change in cfg80211.c
Resolve "Line over 80 characters" warning from checkpatch

Signed-off-by: K Hodges <khodges42@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-08 10:31:14 +01:00
K Hodges c4089864e8 staging: android: formatting change in ashmem.c
Resolved "Line over 80 characters" warning from checkpatch

Signed-off-by: K Hodges <khodges42@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-08 10:31:14 +01:00
Himadri Pandya a180ef30da staging: rtl8192e: rename members of struct rtllib_device - style
Rename following members of struct rtllib_device to fix checkpatch
warning: Avoid CamelCase
	pDot11dInfo -> dot11d_info
	bGlobalDomain -> global_domain
	IbssStartChnl -> bss_start_channel

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:36:02 +01:00
Himadri Pandya 6841d9abec staging: rtl8192e: rename members of struct rt_dot11d_info - style
Rename following members of struct rt_dot11d_info to fix checkpatch
warning: Avoid Camelcase
	bEnabled -> enabled
	CountryIeLen -> country_len
	CountryIeBuf -> country_buffer
	CountryIeSrcAddr -> country_src_addr
	CountryIeWatchdog -> country_watchdog
	MaxTxPwrDbmList -> max_tx_power_list
	State -> state

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:36:02 +01:00
Himadri Pandya cc7834fb5d staging: rtl8192e: rename members of struct chnl_txpow_triple - style
Rename following members of chnl_txpow_triple to fix checkpatch
warning: Avoid CamelCase
	FirstChnl -> first_channel
	NumChnls -> num_channels
	MaxTxPowerInDbm -> max_tx_power

Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:36:02 +01:00
Ajay Singh edce68b969 staging: wilc1000: rename linux_wlan.c and linux_mon.c
Rename linux_wlan.c and linux_mon.c to wilc_netdev.c and wilc_mon.c to
include 'wilc_' prefix.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh c6eab5e6de staging: wilc1000: remove 'linux_' prefix in function names
Remove 'linux_' prefix and replace it with 'wilc_' namespace.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh 55e311d844 staging: wilc1000: rename wilc_frmw_to_linux()
Rename wilc_frmw_to_linux() to wilc_frmw_to_host() to be remove the _linux
suffix.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh 5e63a59844 staging: wilc1000: added 'wilc_' prefix for function in wilc_sdio.c file
Cleanup patch to have proper follow clear namespace in wilc_sdio.c file.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh d4d30e466a staging: wilc1000: avoid function forward declaration in wilc_sdio.c file
Cleanup patch to avoid function forward declaration by reordering the
function.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh 6b0b7d86e4 staging: wilc1000: move macro and function prototype from wilc_wlan_if.h file
Move data structure and function prototype from 'wilc_wlan_if.h file.
Now, this file contains constant specific to the firmware.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh f5436edeed staging: wilc1000: add 'wilc_' prefix to have proper namespace
Cleanup patch to rename data structure and function name to have 'wilc_'
prefix.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Ajay Singh dda037057a staging: wilc1000: fix to set correct value for 'vif_num'
Set correct value in '->vif_num' for the total number of interfaces and
set '->idx' value using 'i'.

Fixes: 735bb39ca3 ("staging: wilc1000: simplify vif[i]->ndev accesses")
Fixes: 0e490657c7 ("staging: wilc1000: Fix problem with wrong vif index")
Cc: <stable@vger.kernel.org>
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:34:45 +01:00
Nishad Kamdar b9f46c060c staging: vt6656: Use the correct style for SPDX license Identifier
This patch corrects the style for SPDX license Identifier in mac.h
by using "/* */" in place of "//" as per Linux kernel licensing rules.
Issue found by checkpatch.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:33:54 +01:00
Colin Ian King 5e767cca29 staging: rtl8192u: remove redundant nul check on pointer dev
There is a null check on pointer dev which implies it may be null, however
dev can never be null as it is set in rtl8192_usb_probe via the call
to usb_set_intfdata.

Detected by CoverityScan, CID#143078 ("Dereference after null check")

Fixes: 8fc8598e61 ("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>
2019-02-07 13:33:54 +01:00
Jin Chen 83a95c1683 staging: sm750fb: Rename setDisplayControl to set_display_control - style
Fix checkpatch.pl warning:
    CHECK: Avoid CamelCase: <setDisplayControl>

Signed-off-by: Jin Chen <nobijinc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:33:54 +01:00
Dan Carpenter dc96476e0a Staging: rtl8723bs: remove some dead code
"psecnetwork" is the address of &psecuritypriv->sec_bss.  Since
->sec_bss isn't the first member of the struct that means that
"psecnetwork" can't be NULL.

We can just remove this dead code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:33:54 +01:00
Ajay Singh 2a95c4e04a staging: wilc1000: define p2p related static variable as constants
Add constant qualifer for 'p2p_vendor_spec' & 'p2p_oui' static
variable because they are treated like constant values.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh 0d0f0b06a1 staging: wilc1000: move 'curr_channel' static variable in 'wilc' struct
Avoid the use of static variable and move it as part of wilc structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh 458e303bdc staging: wilc1000: move static variable 'wlan_channel' to 'wilc' struct
Avoid use of static variable 'wlan_channel' by moving it inside the wilc
structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh 8707091415 staging: wilc1000: avoid use of static variable in linux_mon.c
Define local variable for 'srcadd' & 'bssid' static variables and use
ether_addr_copy() to copy value into them.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh 98f83d3d01 staging: wilc1000: avoid use of 'hif_deinit_lock' static variable
Avoid use of static variable 'hif_deinit_lock' and move it as part of
wilc struct.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh d7d540ea66 staging: wilc1000: remove unused struct 'add_sta_param'
Remove 'add_sta_param' structure as its not used now.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh 20c888becc staging: wilc1000: add check before performing operation on net_device
Before calling an operation on net_device check if that interface is
available.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh f2bf97cb95 staging: wilc1000: avoid use of interface names for validation
Avoid use of interface name i.e 'wlan0' & 'p2p0' to check the interface
type in dev_state_ev_handler(). Now making use of netdev_ops and iface
type to know interface. Reorder the functions to avoid the forward
declaration after the above changes

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh ea3c0d4eaa staging: wilc1000: use random number for cookie instead of pointer
Use random number to assign to cookie value.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh b6c6cd11c7 staging: wilc1000: refactor code to use cookie information
Make use of cookie information to pass to wpa_s and handle cookie value
received in the cfg80211_ops callbacks.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:20 +01:00
Ajay Singh 9a4b45fb99 staging: wilc1000: refactor linux_wlan_init_test_config()
Refactor linux_wlan_init_test_config() to use correct endianness for wid
values and remove unnecessary code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:19 +01:00
Ajay Singh 3c55a24ee2 staging: wilc1000: remove use of 'terminated_handle' static variable
Remove use of 'terminated_handle' variable and set the 'hif_drv' to
NULL once it's free.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-07 13:31:19 +01:00
Ajay Singh 6f466168fa staging: wilc1000: refactor scan() cfg80211 ops callback
Refactor scan() cfg80211 callback function and use correct value for
valid channel number limit.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:41 +01:00
Ajay Singh 0ae6cb7a24 staging: wilc1000: make use of iface type to identify p2p interface
Remove SSID string compare instead use interface type check for p2p
client interface.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:41 +01:00
Ajay Singh b36b9735ae staging: wilc1000: rename timeout related macros
Rename timeout related macros to have their unit clear from their name.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:41 +01:00
Ajay Singh 96ce4f83cd staging: wilc1000: remove unnecessary debug log messages
Remove unnecessary debug log messages.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:40 +01:00
Ajay Singh bd3c733954 staging: wilc1000: remove redundant macros for radiotap
Remove macro define which are already present in the included header.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:40 +01:00
Ajay Singh 06fee3d5b3 staging: wilc1000: remove conditional lock in wilc_wfi_deinit_mon_interface()
wilc_wfi_deinit_mon_interface() calls unregister_netdev() which
requires the rtnl lock again. Now move wilc_wfi_deinit_mon_interface()
out of wilc_mac_close(). Also remove explicit call to wilc_mac_close()
because unregister_netdev() takes care of calling wilc_mac_close().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:40 +01:00
Ajay Singh 588713006e staging: wilc1000: avoid the use of 'wilc_wfi_mon' static variable
Avoid use of static variable for monitor net_device and move it inside
wilc structure.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:38:40 +01:00
Colin Ian King 5ae890780e staging: most: cdev: add missing check for cdev_add failure
Currently the call to cdev_add is missing a check for failure. Fix this by
checking for failure and exiting via a new error path that ensures the
allocated comp_channel struct is kfree'd.

Detected by CoverityScan, CID#1462359 ("Unchecked return value")

Fixes: 9bc79bbcd0 ("Staging: most: add MOST driver's aim-cdev module")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04 12:36:14 +01:00