2021-04-15 00:38:15

by Lee Jones

[permalink] [raw]
Subject: [PATCH 00/57] Rid W=1 warnings from Staging

This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

Lee Jones (57):
staging: r8192U_core: Remove two unused variables 'ret' and
'reset_status'
staging: android: ashmem: Supply description for 'new_range'
staging: comedi_8254: Fix descriptions for 'i8254' and 'iobase'
staging: r8192U_core: Do not use kernel-doc formatting for !kernel-doc
headers
staging: r819xU_phy: Remove some local variables from the stack
staging: r819xU_cmdpkt: Remove functionless method
'cmpk_handle_query_config_rx'
staging: wlan-ng: cfg80211: Move large struct onto the heap
staging: rtw_ioctl_set: Move 'channel_table' to the only place it's
used
staging: rtl8188eu: core: rtw_ieee80211: Fix incorrectly documented
function
staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables
staging: rtl8723bs: core: rtw_mlme_ext: Deal with a bunch of unused
variables
staging: rtl8712: rtl871x_mp_ioctl: Remove a bunch of unused tables
staging: rtl8723bs: core: rtw_recv: Mark debug variable as
__maybe_unused
staging: rtl8188eu: core: rtw_security: Fix some formatting and
misdocumentation
staging: rtl8723bs: core: rtw_security: Demote non-conformant
kernel-doc header
staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta'
staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly
staging: octeon: ethernet-tx: Fix formatting issue in function header
staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable
'start_seq'
staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the
heap
staging: iio: frequency: ad9834: Provide missing description for
'devid'
staging: nvec: Fix a bunch of kernel-doc issues
staging: ks7010: ks_hostif: Remove a bunch of unused variables
staging: fwserial: Demote a whole host of kernel-doc abuses
staging: sm750fb: sm750_accel: Provide description for 'accel' and fix
function naming
staging: most: net: Fix some kernel-doc formatting issues
staging: vt6655: upc: Suppress set but not used warning in macro
staging: rtl8192u: ieee80211_softmac: Move a large data struct onto
the heap
staging: most: dim2: Provide missing descriptions and fix doc-rot
staging: rtl8723bs: core: rtw_ieee80211: Remove seemingly pointless
copy
staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is
set
staging: rtl8723bs: core: rtw_mlme_ext: 'evt_seq' is only used if
CHECK_EVENT_SEQ is set
staging: most: i2c: Fix a little doc-rot
staging: most: dim2: hal: Fix one kernel-doc header and demote two
non-conforming ones
staging: most: dim2: hal: Demote non-conformant kernel-doc headers
staging: axis-fifo: axis-fifo: Fix some formatting issues
staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers
into the heap
staging: fbtft: fb_ili9320: Remove unused variable 'ret'
staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named
function
staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and
dead code
staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc
headers
staging: rtl8188eu: os_dep: rtw_android: Demote kernel-doc abuse
staging: rtl8723bs: hal: rtl8723b_hal_init: Remove unused variable and
dead code
staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed
functions
staging: rtl8723bs: hal: sdio_halinit: 'start' is only used if debug
is enabled
staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused
and remove another
staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug
is enabled
staging: comedi: drivers: jr3_pci: Remove set but unused variable
'min_full_scale'
staging: comedi: drivers: ni_tio: Fix slightly broken kernel-doc and
demote others
staging: comedi: drivers: ni_routes: Demote non-conforming kernel-doc
headers
staging: axis-fifo: axis-fifo: Fix function naming in the
documentation
staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable
'func_start'
staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer
onto the heap
staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug
variables as __maybe_unused
staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to
where it is used
staging: comedi: drivers: comedi_isadma: Fix misspelling of
'dma_chan1'
staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'

drivers/staging/android/ashmem.c | 1 +
drivers/staging/axis-fifo/axis-fifo.c | 18 +--
drivers/staging/comedi/drivers/comedi_8254.c | 3 +-
.../staging/comedi/drivers/comedi_isadma.c | 2 +-
drivers/staging/comedi/drivers/jr3_pci.c | 3 +-
.../staging/comedi/drivers/ni_mio_common.c | 9 --
drivers/staging/comedi/drivers/ni_routes.c | 6 +-
drivers/staging/comedi/drivers/ni_stc.h | 9 +-
drivers/staging/comedi/drivers/ni_tio.c | 12 +-
drivers/staging/fbtft/fb_ili9320.c | 3 +-
drivers/staging/fwserial/fwserial.c | 46 +++----
drivers/staging/iio/frequency/ad9834.c | 5 +-
drivers/staging/ks7010/ks_hostif.c | 14 +-
drivers/staging/most/dim2/dim2.c | 23 ++--
drivers/staging/most/dim2/hal.c | 10 +-
drivers/staging/most/i2c/i2c.c | 12 +-
drivers/staging/most/net/net.c | 6 +-
drivers/staging/nvec/nvec.c | 7 +-
drivers/staging/octeon/ethernet-tx.c | 1 -
drivers/staging/qlge/qlge_main.c | 4 +-
.../staging/rtl8188eu/core/rtw_ieee80211.c | 2 +-
.../staging/rtl8188eu/core/rtw_ioctl_set.c | 8 ++
drivers/staging/rtl8188eu/core/rtw_security.c | 10 +-
.../staging/rtl8188eu/include/rtw_mlme_ext.h | 8 --
.../staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +-
drivers/staging/rtl8188eu/os_dep/mon.c | 6 +-
.../staging/rtl8188eu/os_dep/rtw_android.c | 2 +-
.../rtl8192u/ieee80211/ieee80211_softmac.c | 9 +-
drivers/staging/rtl8192u/r8192U_core.c | 11 +-
drivers/staging/rtl8192u/r819xU_cmdpkt.c | 41 ------
drivers/staging/rtl8192u/r819xU_phy.c | 48 +++++--
drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 29 ++--
drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 127 ------------------
.../staging/rtl8723bs/core/rtw_ieee80211.c | 6 +-
drivers/staging/rtl8723bs/core/rtw_mlme.c | 17 +--
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 19 +--
drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 10 +-
.../staging/rtl8723bs/core/rtw_wlan_util.c | 4 +-
.../staging/rtl8723bs/hal/odm_NoiseMonitor.c | 9 +-
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 +--
.../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 10 +-
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 +-
drivers/staging/rtl8723bs/hal/sdio_ops.c | 7 +-
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
drivers/staging/sm750fb/sm750_accel.c | 4 +-
drivers/staging/vt6655/upc.h | 2 +-
drivers/staging/wlan-ng/cfg80211.c | 30 +++--
49 files changed, 256 insertions(+), 404 deletions(-)

Cc: [email protected]
Cc: "Alexander A. Klimov" <[email protected]>
Cc: Allen Pais <[email protected]>
Cc: Anders Blomdell <[email protected]>
Cc: Andrea Merello <[email protected]>
Cc: Andres Klode <[email protected]>
Cc: Andrey Shvetsov <[email protected]>
Cc: "Arve Hjønnevåg" <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: Comedi <[email protected]>
Cc: "David A. Schleef" <[email protected]>
Cc: [email protected]
Cc: Fabio Aiuto <[email protected]>
Cc: Florian Schilhabel <[email protected]>
Cc: Forest Bond <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: H Hartley Sweeten <[email protected]>
Cc: Hridya Valsaraju <[email protected]>
Cc: Ian Abbott <[email protected]>
Cc: Ilya Petrov <[email protected]>
Cc: Jacob Feder <[email protected]>
Cc: Jerry chuang <[email protected]>
Cc: Joel Fernandes <[email protected]>
Cc: "John B. Wyatt IV" <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: "J.P. Mellor" <[email protected]>
Cc: karthik alapati <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Kernel Team <[email protected]>
Cc: [email protected]
Cc: Larry Finger <[email protected]>
Cc: Lars-Peter Clausen <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Marc Dietrich <[email protected]>
Cc: Marco Cesati <[email protected]>
Cc: Martijn Coenen <[email protected]>
Cc: Michael Hennerich <[email protected]>
Cc: Michael Straube <[email protected]>
Cc: Mori Hess <[email protected]>
Cc: "Nícolas F. R. A. Prado" <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Pierre-Hugues Husson <[email protected]>
Cc: Robert Love <[email protected]>
Cc: Romain Perier <[email protected]>
Cc: Ross Schmidt <[email protected]>
Cc: "Spencer E. Olson" <[email protected]>
Cc: [email protected]
Cc: Sudip Mukherjee <[email protected]>
Cc: Sumera Priyadarsini <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Teddy Wang <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Todd Kjos <[email protected]>
Cc: Truxton Fulton <[email protected]>
Cc: "Uwe Kleine-König" <[email protected]>
Cc: [email protected]
Cc: WLAN FAE <[email protected]>
Cc: Zhansaya Bagdauletkyzy <[email protected]>
--
2.27.0


2021-04-15 00:38:19

by Lee Jones

[permalink] [raw]
Subject: [PATCH 06/57] staging: r819xU_cmdpkt: Remove functionless method 'cmpk_handle_query_config_rx'

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8192u/r819xU_cmdpkt.c: In function ‘cmpk_handle_query_config_rx’:
drivers/staging/rtl8192u/r819xU_cmdpkt.c:274:24: warning: variable ‘rx_query_cfg’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Michael Straube <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8192u/r819xU_cmdpkt.c | 41 ------------------------
1 file changed, 41 deletions(-)

diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
index 4cece40a92f6e..30a320422358d 100644
--- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
+++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
@@ -249,46 +249,6 @@ static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
DMESG("<---- cmpk_handle_interrupt_status()\n");
}

-/*-----------------------------------------------------------------------------
- * Function: cmpk_handle_query_config_rx()
- *
- * Overview: The function is responsible for extract the message from
- * firmware. It will contain dedicated info in
- * ws-06-0063-rtl8190-command-packet-specification. Please
- * refer to chapter "Beacon State Element".
- *
- * Input: u8 *pmsg - Message Pointer of the command packet.
- *
- * Output: NONE
- *
- * Return: NONE
- *
- * Revised History:
- * When Who Remark
- * 05/12/2008 amy Create Version 0 porting from windows code.
- *
- *---------------------------------------------------------------------------
- */
-static void cmpk_handle_query_config_rx(struct net_device *dev, u8 *pmsg)
-{
- struct cmpk_query_cfg rx_query_cfg;
-
- /* 1. Extract TX feedback info from RFD to temp structure buffer. */
- /* It seems that FW use big endian(MIPS) and DRV use little endian in
- * windows OS. So we have to read the content byte by byte or transfer
- * endian type before copy the message copy.
- */
- rx_query_cfg.cfg_action = (pmsg[4] & 0x80) >> 7;
- rx_query_cfg.cfg_type = (pmsg[4] & 0x60) >> 5;
- rx_query_cfg.cfg_size = (pmsg[4] & 0x18) >> 3;
- rx_query_cfg.cfg_page = (pmsg[6] & 0x0F) >> 0;
- rx_query_cfg.cfg_offset = pmsg[7];
- rx_query_cfg.value = (pmsg[8] << 24) | (pmsg[9] << 16) |
- (pmsg[10] << 8) | (pmsg[11] << 0);
- rx_query_cfg.mask = (pmsg[12] << 24) | (pmsg[13] << 16) |
- (pmsg[14] << 8) | (pmsg[15] << 0);
-}
-
/*-----------------------------------------------------------------------------
* Function: cmpk_count_tx_status()
*
@@ -514,7 +474,6 @@ u32 cmpk_message_handle_rx(struct net_device *dev,
break;

case BOTH_QUERY_CONFIG:
- cmpk_handle_query_config_rx(dev, pcmd_buff);
cmd_length = CMPK_BOTH_QUERY_CONFIG_SIZE;
break;

--
2.27.0

2021-04-15 00:38:24

by Lee Jones

[permalink] [raw]
Subject: [PATCH 09/57] staging: rtl8188eu: core: rtw_ieee80211: Fix incorrectly documented function

Fixes the following W=1 kernel build warning(s):

from drivers/staging/rtl8188eu/core/rtw_ieee80211.c:11:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:778: warning: expecting prototype for ieee802_11_parse_elems(). Prototype was for rtw_ieee802_11_parse_elems() instead

Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index 7a706fe11750c..e88ebe8891fc6 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -765,7 +765,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
}

/**
- * ieee802_11_parse_elems - Parse information elements in management frames
+ * rtw_ieee802_11_parse_elems - Parse information elements in management frames
* @start: Pointer to the start of ies
* @len: Length of IE buffer in octets
* @elems: Data structure for parsed elements
--
2.27.0

2021-04-15 00:38:30

by Lee Jones

[permalink] [raw]
Subject: [PATCH 15/57] staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header

Fixes the following W=1 kernel build warning(s):

from drivers/staging/rtl8188eu/core/rtw_security.c:10:
drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1'
drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1'
drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1'
drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2'
drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2'
drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2'
drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
index 9587d89a6b24e..60b724729900e 100644
--- a/drivers/staging/rtl8723bs/core/rtw_security.c
+++ b/drivers/staging/rtl8723bs/core/rtw_security.c
@@ -1921,7 +1921,7 @@ const u8 rcons[] = {
/* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
};

-/**
+/*
* Expand the cipher key into the encryption key schedule.
*
* @return the number of rounds for the given cipher key size.
--
2.27.0

2021-04-15 00:38:44

by Lee Jones

[permalink] [raw]
Subject: [PATCH 24/57] staging: fwserial: Demote a whole host of kernel-doc abuses

Fixes the following W=1 kernel build warning(s):

drivers/staging/fwserial/fwserial.c:52: warning: Function parameter or member 'fwserial_list' not described in 'LIST_HEAD'
drivers/staging/fwserial/fwserial.c:52: warning: expecting prototype for fwserial_list(). Prototype was for LIST_HEAD() instead
drivers/staging/fwserial/fwserial.c:62: warning: cannot understand function prototype: 'struct fwtty_port *port_table[MAX_TOTAL_PORTS]; '
drivers/staging/fwserial/fwserial.c:295: warning: Function parameter or member 'port' not described in 'fwtty_update_port_status'
drivers/staging/fwserial/fwserial.c:295: warning: Function parameter or member 'status' not described in 'fwtty_update_port_status'
drivers/staging/fwserial/fwserial.c:388: warning: Function parameter or member 'port' not described in '__fwtty_port_line_status'
drivers/staging/fwserial/fwserial.c:412: warning: Function parameter or member 'port' not described in '__fwtty_write_port_status'
drivers/staging/fwserial/fwserial.c:433: warning: Function parameter or member 'port' not described in 'fwtty_write_port_status'
drivers/staging/fwserial/fwserial.c:486: warning: Function parameter or member 'work' not described in 'fwtty_do_hangup'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'card' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'request' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'tcode' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'destination' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'source' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'generation' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'addr' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'data' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'len' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Function parameter or member 'callback_data' not described in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:605: warning: Excess function parameter 'parameters' description in 'fwtty_port_handler'
drivers/staging/fwserial/fwserial.c:670: warning: Function parameter or member 'card' not described in 'fwtty_tx_complete'
drivers/staging/fwserial/fwserial.c:670: warning: Function parameter or member 'rcode' not described in 'fwtty_tx_complete'
drivers/staging/fwserial/fwserial.c:670: warning: Function parameter or member 'txn' not described in 'fwtty_tx_complete'
drivers/staging/fwserial/fwserial.c:914: warning: Function parameter or member 'tty_port' not described in 'fwtty_port_carrier_raised'
drivers/staging/fwserial/fwserial.c:1021: warning: Function parameter or member 'tty_port' not described in 'fwtty_port_shutdown'
drivers/staging/fwserial/fwserial.c:1312: warning: Function parameter or member 'tty' not described in 'fwtty_break_ctl'
drivers/staging/fwserial/fwserial.c:1312: warning: Function parameter or member 'state' not described in 'fwtty_break_ctl'
drivers/staging/fwserial/fwserial.c:1681: warning: Function parameter or member 'peer' not described in 'fwserial_claim_port'
drivers/staging/fwserial/fwserial.c:1681: warning: Function parameter or member 'index' not described in 'fwserial_claim_port'
drivers/staging/fwserial/fwserial.c:1708: warning: Function parameter or member 'peer' not described in 'fwserial_find_port'
drivers/staging/fwserial/fwserial.c:1775: warning: Function parameter or member 'peer' not described in 'fwserial_connect_peer'
drivers/staging/fwserial/fwserial.c:1844: warning: Function parameter or member 'driver' not described in 'fwserial_close_port'
drivers/staging/fwserial/fwserial.c:1844: warning: Function parameter or member 'port' not described in 'fwserial_close_port'
drivers/staging/fwserial/fwserial.c:1911: warning: Function parameter or member 'card' not described in '__fwserial_peer_by_node_id'
drivers/staging/fwserial/fwserial.c:1911: warning: Function parameter or member 'generation' not described in '__fwserial_peer_by_node_id'
drivers/staging/fwserial/fwserial.c:1911: warning: Function parameter or member 'id' not described in '__fwserial_peer_by_node_id'
drivers/staging/fwserial/fwserial.c:2090: warning: Function parameter or member 'peer' not described in 'fwserial_remove_peer'
drivers/staging/fwserial/fwserial.c:2321: warning: Function parameter or member 'unit' not described in 'fwserial_probe'
drivers/staging/fwserial/fwserial.c:2321: warning: Function parameter or member 'id' not described in 'fwserial_probe'
drivers/staging/fwserial/fwserial.c:2344: warning: Function parameter or member 'unit' not described in 'fwserial_remove'
drivers/staging/fwserial/fwserial.c:2382: warning: Function parameter or member 'unit' not described in 'fwserial_update'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'card' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'request' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'tcode' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'destination' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'source' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'generation' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'addr' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'data' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'len' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Function parameter or member 'callback_data' not described in 'fwserial_mgmt_handler'
drivers/staging/fwserial/fwserial.c:2717: warning: Excess function parameter 'parameters' description in 'fwserial_mgmt_handler'

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/fwserial/fwserial.c | 46 ++++++++++++++---------------
1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 1ee6382cafc42..9ade8e7a68bae 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -45,14 +45,14 @@ module_param_named(loop, create_loop_dev, bool, 0644);
*/
#define WAKEUP_CHARS 256

-/**
+/*
* fwserial_list: list of every fw_serial created for each fw_card
* See discussion in fwserial_probe.
*/
static LIST_HEAD(fwserial_list);
static DEFINE_MUTEX(fwserial_list_mutex);

-/**
+/*
* port_table: array of tty ports allocated to each fw_card
*
* tty ports are allocated during probe when an fw_serial is first
@@ -284,7 +284,7 @@ static void fwtty_restart_tx(struct fwtty_port *port)
spin_unlock_bh(&port->lock);
}

-/**
+/*
* fwtty_update_port_status - decodes & dispatches line status changes
*
* Note: in loopback, the port->lock is being held. Only use functions that
@@ -375,7 +375,7 @@ static void fwtty_update_port_status(struct fwtty_port *port,
wake_up_interruptible(&port->port.delta_msr_wait);
}

-/**
+/*
* __fwtty_port_line_status - generate 'line status' for indicated port
*
* This function returns a remote 'MSR' state based on the local 'MCR' state,
@@ -403,7 +403,7 @@ static unsigned int __fwtty_port_line_status(struct fwtty_port *port)
return status;
}

-/**
+/*
* __fwtty_write_port_status - send the port line status to peer
*
* Note: caller must be holding the port lock.
@@ -426,7 +426,7 @@ static int __fwtty_write_port_status(struct fwtty_port *port)
return err;
}

-/**
+/*
* fwtty_write_port_status - same as above but locked by port lock
*/
static int fwtty_write_port_status(struct fwtty_port *port)
@@ -462,7 +462,7 @@ static void fwtty_throttle_port(struct fwtty_port *port)
tty_kref_put(tty);
}

-/**
+/*
* fwtty_do_hangup - wait for ldisc to deliver all pending rx; only then hangup
*
* When the remote has finished tx, and all in-flight rx has been received and
@@ -589,9 +589,8 @@ static int fwtty_rx(struct fwtty_port *port, unsigned char *data, size_t len)
return err;
}

-/**
+/*
* fwtty_port_handler - bus address handler for port reads/writes
- * @parameters: fw_address_callback_t as specified by firewire core interface
*
* This handler is responsible for handling inbound read/write dma from remotes.
*/
@@ -656,7 +655,7 @@ static void fwtty_port_handler(struct fw_card *card,
fw_send_response(card, request, rcode);
}

-/**
+/*
* fwtty_tx_complete - callback for tx dma
* @data: ignored, has no meaning for write txns
* @length: ignored, has no meaning for write txns
@@ -904,7 +903,7 @@ static void fwtty_port_dtr_rts(struct tty_port *tty_port, int on)
spin_unlock_bh(&port->lock);
}

-/**
+/*
* fwtty_port_carrier_raised: required tty_port operation
*
* This port operation is polled after a tty has been opened and is waiting for
@@ -1011,7 +1010,7 @@ static int fwtty_port_activate(struct tty_port *tty_port,
return 0;
}

-/**
+/*
* fwtty_port_shutdown
*
* Note: the tty port core ensures this is not the console and
@@ -1297,7 +1296,7 @@ static void fwtty_set_termios(struct tty_struct *tty, struct ktermios *old)
}
}

-/**
+/*
* fwtty_break_ctl - start/stop sending breaks
*
* Signals the remote to start or stop generating simulated breaks.
@@ -1669,7 +1668,7 @@ static inline int fwserial_send_mgmt_sync(struct fwtty_peer *peer,
return rcode;
}

-/**
+/*
* fwserial_claim_port - attempt to claim port @ index for peer
*
* Returns ptr to claimed port or error code (as ERR_PTR())
@@ -1697,7 +1696,7 @@ static struct fwtty_port *fwserial_claim_port(struct fwtty_peer *peer,
return port;
}

-/**
+/*
* fwserial_find_port - find avail port and claim for peer
*
* Returns ptr to claimed port or NULL if none avail
@@ -1764,7 +1763,7 @@ static void fwserial_plug_timeout(struct timer_list *t)
fwserial_release_port(port, false);
}

-/**
+/*
* fwserial_connect_peer - initiate virtual cable with peer
*
* Returns 0 if VIRT_CABLE_PLUG request was successfully sent,
@@ -1829,7 +1828,7 @@ static int fwserial_connect_peer(struct fwtty_peer *peer)
return err;
}

-/**
+/*
* fwserial_close_port -
* HUP the tty (if the tty exists) and unregister the tty device.
* Only used by the unit driver upon unit removal to disconnect and
@@ -1893,7 +1892,7 @@ static struct fw_serial *__fwserial_lookup_rcu(struct fw_card *card)
return NULL;
}

-/**
+/*
* __fwserial_peer_by_node_id - finds a peer matching the given generation + id
*
* If a matching peer could not be found for the specified generation/node id,
@@ -2076,7 +2075,7 @@ static int fwserial_add_peer(struct fw_serial *serial, struct fw_unit *unit)
return 0;
}

-/**
+/*
* fwserial_remove_peer - remove a 'serial' unit device as a 'peer'
*
* Remove a 'peer' from its list of peers. This function is only
@@ -2279,7 +2278,7 @@ static int fwserial_create(struct fw_unit *unit)
return err;
}

-/**
+/*
* fwserial_probe: bus probe function for firewire 'serial' unit devices
*
* A 'serial' unit device is created and probed as a result of:
@@ -2331,7 +2330,7 @@ static int fwserial_probe(struct fw_unit *unit,
return err;
}

-/**
+/*
* fwserial_remove: bus removal function for firewire 'serial' unit devices
*
* The corresponding 'peer' for this unit device is removed from the list of
@@ -2363,7 +2362,7 @@ static void fwserial_remove(struct fw_unit *unit)
mutex_unlock(&fwserial_list_mutex);
}

-/**
+/*
* fwserial_update: bus update function for 'firewire' serial unit devices
*
* Updates the new node_id and bus generation for this peer. Note that locking
@@ -2699,9 +2698,8 @@ static int fwserial_parse_mgmt_write(struct fwtty_peer *peer,
return rcode;
}

-/**
+/*
* fwserial_mgmt_handler: bus address handler for mgmt requests
- * @parameters: fw_address_callback_t as specified by firewire core interface
*
* This handler is responsible for handling virtual cable requests from remotes
* for all cards.
--
2.27.0

2021-04-15 00:38:47

by Lee Jones

[permalink] [raw]
Subject: [PATCH 11/57] staging: rtl8723bs: core: rtw_mlme_ext: Deal with a bunch of unused variables

Some are used inside debug prints. These get marked as __maybe_unused.

Others are used within #ifery. These are defined inside the same #ifery.

Lastly, ones that are truly unused are removed entirely.

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘OnAssocReq’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1058:17: warning: variable ‘reassoc’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘OnAction_back’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1792:30: warning: variable ‘reason_code’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘_linked_info_dump’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5393:21: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘led_blink_hdl’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6517:25: warning: variable ‘ledBlink_param’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ross Schmidt <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index f19a15a3924b6..d1dbf234e9e02 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -1019,7 +1019,7 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
u16 capab_info;
struct rtw_ieee802_11_elems elems;
struct sta_info *pstat;
- unsigned char reassoc, *p, *pos, *wpa_ie;
+ unsigned char __maybe_unused reassoc, *p, *pos, *wpa_ie;
unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
int i, ie_len, wpa_ie_len, left;
unsigned char supportRate[16];
@@ -1719,7 +1719,7 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra
struct recv_reorder_ctrl *preorder_ctrl;
unsigned char *frame_body;
unsigned char category, action;
- unsigned short tid, status, reason_code = 0;
+ unsigned short tid, status, __maybe_unused reason_code = 0;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 *pframe = precv_frame->u.hdr.rx_data;
@@ -5121,7 +5121,7 @@ void _linked_info_dump(struct adapter *padapter)
} else if ((pmlmeinfo->state&0x03) == _HW_STATE_AP_) {
struct list_head *phead, *plist;

- struct sta_info *psta = NULL;
+ struct sta_info __maybe_unused *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;

spin_lock_bh(&pstapriv->asoc_list_lock);
@@ -5980,7 +5980,8 @@ u8 set_tx_beacon_cmd(struct adapter *padapter)

u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
{
- u8 evt_code, evt_seq;
+ u8 evt_seq;
+ u8 evt_code;
u16 evt_sz;
uint *peventbuf;
void (*event_callback)(struct adapter *dev, u8 *pbuf);
@@ -6191,12 +6192,9 @@ u8 set_chplan_hdl(struct adapter *padapter, unsigned char *pbuf)

u8 led_blink_hdl(struct adapter *padapter, unsigned char *pbuf)
{
- struct LedBlink_param *ledBlink_param;
-
if (!pbuf)
return H2C_PARAMETERS_ERROR;

- ledBlink_param = (struct LedBlink_param *)pbuf;
return H2C_SUCCESS;
}

--
2.27.0

2021-04-15 00:38:48

by Lee Jones

[permalink] [raw]
Subject: [PATCH 14/57] staging: rtl8188eu: core: rtw_security: Fix some formatting and misdocumentation

Fixes the following W=1 kernel build warning(s):

from drivers/staging/rtl8188eu/core/rtw_security.c:10:
drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1'
drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1'
drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1'
drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2'
drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2'
drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2'
drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Michael Straube <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8188eu/core/rtw_security.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c
index 617f89842c812..4d0a23bf3f660 100644
--- a/drivers/staging/rtl8188eu/core/rtw_security.c
+++ b/drivers/staging/rtl8188eu/core/rtw_security.c
@@ -465,8 +465,9 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in ROM)

/**
* phase1() - generate P1K, given TA, TK, IV32
- * @tk[]: temporal key [128 bits]
- * @ta[]: transmitter's MAC address [ 48 bits]
+ * @p1k: placeholder for the returned phase 1 key
+ * @tk: temporal key [128 bits]
+ * @ta: transmitter's MAC address [ 48 bits]
* @iv32: upper 32 bits of IV [ 32 bits]
*
* This function only needs to be called every 2**16 packets,
@@ -498,8 +499,9 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)

/**
* phase2() - generate RC4KEY, given TK, P1K, IV16
- * @tk[]: Temporal key [128 bits]
- * @p1k[]: Phase 1 output key [ 80 bits]
+ * @rc4key: Placeholder for the returned key
+ * @tk: Temporal key [128 bits]
+ * @p1k: Phase 1 output key [ 80 bits]
* @iv16: low 16 bits of IV counter [ 16 bits]
*
* The value {TA, IV32, IV16} for Phase1/Phase2 must be unique
--
2.27.0

2021-04-15 00:38:52

by Lee Jones

[permalink] [raw]
Subject: [PATCH 33/57] staging: most: i2c: Fix a little doc-rot

Fixes the following W=1 kernel build warning(s):

drivers/staging/most/i2c/i2c.c:66: warning: Function parameter or member 'most_iface' not described in 'configure_channel'
drivers/staging/most/i2c/i2c.c:66: warning: Function parameter or member 'ch_idx' not described in 'configure_channel'
drivers/staging/most/i2c/i2c.c:66: warning: Excess function parameter 'iface' description in 'configure_channel'
drivers/staging/most/i2c/i2c.c:66: warning: Excess function parameter 'channel' description in 'configure_channel'
drivers/staging/most/i2c/i2c.c:121: warning: Function parameter or member 'most_iface' not described in 'enqueue'
drivers/staging/most/i2c/i2c.c:121: warning: Function parameter or member 'ch_idx' not described in 'enqueue'
drivers/staging/most/i2c/i2c.c:121: warning: Excess function parameter 'iface' description in 'enqueue'
drivers/staging/most/i2c/i2c.c:121: warning: Excess function parameter 'channel' description in 'enqueue'
drivers/staging/most/i2c/i2c.c:166: warning: Function parameter or member 'most_iface' not described in 'poison_channel'
drivers/staging/most/i2c/i2c.c:166: warning: Function parameter or member 'ch_idx' not described in 'poison_channel'
drivers/staging/most/i2c/i2c.c:166: warning: Excess function parameter 'iface' description in 'poison_channel'
drivers/staging/most/i2c/i2c.c:166: warning: Excess function parameter 'channel_id' description in 'poison_channel'

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Andrey Shvetsov <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/most/i2c/i2c.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/most/i2c/i2c.c b/drivers/staging/most/i2c/i2c.c
index 893a8babdb2f7..7042f10887bb6 100644
--- a/drivers/staging/most/i2c/i2c.c
+++ b/drivers/staging/most/i2c/i2c.c
@@ -51,8 +51,8 @@ static void pending_rx_work(struct work_struct *);

/**
* configure_channel - called from MOST core to configure a channel
- * @iface: interface the channel belongs to
- * @channel: channel to be configured
+ * @most_iface: interface the channel belongs to
+ * @ch_idx: channel to be configured
* @channel_config: structure that holds the configuration information
*
* Return 0 on success, negative on failure.
@@ -107,8 +107,8 @@ static int configure_channel(struct most_interface *most_iface,

/**
* enqueue - called from MOST core to enqueue a buffer for data transfer
- * @iface: intended interface
- * @channel: ID of the channel the buffer is intended for
+ * @most_iface: intended interface
+ * @ch_idx: ID of the channel the buffer is intended for
* @mbo: pointer to the buffer object
*
* Return 0 on success, negative on failure.
@@ -153,8 +153,8 @@ static int enqueue(struct most_interface *most_iface,

/**
* poison_channel - called from MOST core to poison buffers of a channel
- * @iface: pointer to the interface the channel to be poisoned belongs to
- * @channel_id: corresponding channel ID
+ * @most_iface: pointer to the interface the channel to be poisoned belongs to
+ * @ch_idx: corresponding channel ID
*
* Return 0 on success, negative on failure.
*
--
2.27.0

2021-04-15 00:38:55

by Lee Jones

[permalink] [raw]
Subject: [PATCH 34/57] staging: most: dim2: hal: Fix one kernel-doc header and demote two non-conforming ones

Fixes the following W=1 kernel build warning(s):

drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'buf_size' not described in 'dim_norm_isoc_buffer_size'
drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'packet_length' not described in 'dim_norm_isoc_buffer_size'
drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for Retrieves maximal possible correct buffer size for isochronous data type(). Prototype was for dim_norm_isoc_buffer_size() instead
drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'buf_size' not described in 'dim_norm_sync_buffer_size'
drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'bytes_per_frame' not described in 'dim_norm_sync_buffer_size'
drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for Retrieves maximal possible correct buffer size for synchronous data type(). Prototype was for dim_norm_sync_buffer_size() instead

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Andrey Shvetsov <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/most/dim2/hal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/dim2/hal.c b/drivers/staging/most/dim2/hal.c
index 39e17a7d2f24b..30112413f20a0 100644
--- a/drivers/staging/most/dim2/hal.c
+++ b/drivers/staging/most/dim2/hal.c
@@ -97,7 +97,7 @@ static int dbr_get_mask_size(u16 size)

/**
* Allocates DBR memory.
- * @param size Allocating memory size.
+ * @size: Allocating memory size.
* @return Offset in DBR memory by success or DBR_SIZE if out of memory.
*/
static int alloc_dbr(u16 size)
@@ -778,7 +778,7 @@ void dim_service_mlb_int_irq(void)
writel(0, &g.dim2->MS1);
}

-/**
+/*
* Retrieves maximal possible correct buffer size for isochronous data type
* conform to given packet length and not bigger than given buffer size.
*
@@ -792,7 +792,7 @@ u16 dim_norm_isoc_buffer_size(u16 buf_size, u16 packet_length)
return norm_isoc_buffer_size(buf_size, packet_length);
}

-/**
+/*
* Retrieves maximal possible correct buffer size for synchronous data type
* conform to given bytes per frame and not bigger than given buffer size.
*
--
2.27.0

2021-04-15 00:39:01

by Lee Jones

[permalink] [raw]
Subject: [PATCH 21/57] staging: iio: frequency: ad9834: Provide missing description for 'devid'

Also demote kernel-doc abuses

Fixes the following W=1 kernel build warning(s):

drivers/staging/iio/frequency/ad9834.c:87: warning: Function parameter or member 'devid' not described in 'ad9834_state'
drivers/staging/iio/frequency/ad9834.c:93: warning: cannot understand function prototype: 'enum ad9834_supported_device_ids '
drivers/staging/iio/frequency/ad9834.c:320: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Lars-Peter Clausen <[email protected]>
Cc: Michael Hennerich <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/iio/frequency/ad9834.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
index 60a3ae5587b90..94b131ef8a22c 100644
--- a/drivers/staging/iio/frequency/ad9834.c
+++ b/drivers/staging/iio/frequency/ad9834.c
@@ -58,6 +58,7 @@
* @spi: spi_device
* @mclk: external master clock
* @control: cached control word
+ * @devid: device id
* @xfer: default spi transfer
* @msg: default spi message
* @freq_xfer: tuning word spi transfer
@@ -86,7 +87,7 @@ struct ad9834_state {
__be16 freq_data[2];
};

-/**
+/*
* ad9834_supported_device_ids:
*/

@@ -316,7 +317,7 @@ ssize_t ad9834_show_out1_wavetype_available(struct device *dev,
static IIO_DEVICE_ATTR(out_altvoltage0_out1_wavetype_available, 0444,
ad9834_show_out1_wavetype_available, NULL, 0);

-/**
+/*
* see dds.h for further information
*/

--
2.27.0

2021-04-15 00:39:03

by Lee Jones

[permalink] [raw]
Subject: [PATCH 17/57] staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘rtw_init_bcmc_stainfo’:
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:512:6: warning: variable ‘res’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Ross Schmidt <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
index 7b631a6b258a1..233febc145983 100644
--- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c
@@ -497,7 +497,6 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
{
struct sta_info *psta;
- u32 res = _SUCCESS;
NDIS_802_11_MAC_ADDRESS bcast_addr = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};

struct sta_priv *pstapriv = &padapter->stapriv;
@@ -505,15 +504,12 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)

psta = rtw_alloc_stainfo(pstapriv, bcast_addr);

- if (!psta) {
- res = _FAIL;
- goto exit;
- }
+ if (!psta)
+ return _FAIL;

/* default broadcast & multicast use macid 1 */
psta->mac_id = 1;

-exit:
return _SUCCESS;
}

--
2.27.0

2021-04-15 00:39:05

by Lee Jones

[permalink] [raw]
Subject: [PATCH 39/57] staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named function

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_ieee80211.c:889: warning: expecting prototype for ieee802_11_parse_elems(). Prototype was for rtw_ieee802_11_parse_elems() instead

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index d8513acf4911c..e341789954b99 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -875,7 +875,7 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
}

/**
- * ieee802_11_parse_elems - Parse information elements in management frames
+ * rtw_ieee802_11_parse_elems - Parse information elements in management frames
* @start: Pointer to the start of IEs
* @len: Length of IE buffer in octets
* @elems: Data structure for parsed elements
--
2.27.0

2021-04-15 00:39:45

by Lee Jones

[permalink] [raw]
Subject: [PATCH 38/57] staging: fbtft: fb_ili9320: Remove unused variable 'ret'

Fixes the following W=1 kernel build warning(s):

drivers/staging/fbtft/fb_ili9320.c: In function ‘read_devicecode’:
drivers/staging/fbtft/fb_ili9320.c:25:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/fbtft/fb_ili9320.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fb_ili9320.c b/drivers/staging/fbtft/fb_ili9320.c
index f2e72d14431db..f0ebc40857b34 100644
--- a/drivers/staging/fbtft/fb_ili9320.c
+++ b/drivers/staging/fbtft/fb_ili9320.c
@@ -22,11 +22,10 @@

static unsigned int read_devicecode(struct fbtft_par *par)
{
- int ret;
u8 rxbuf[8] = {0, };

write_reg(par, 0x0000);
- ret = par->fbtftops.read(par, rxbuf, 4);
+ par->fbtftops.read(par, rxbuf, 4);
return (rxbuf[2] << 8) | rxbuf[3];
}

--
2.27.0

2021-04-15 00:40:01

by Lee Jones

[permalink] [raw]
Subject: [PATCH 32/57] staging: rtl8723bs: core: rtw_mlme_ext: 'evt_seq' is only used if CHECK_EVENT_SEQ is set

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘mlme_evt_hdl’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:6004:5: warning: variable ‘evt_seq’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘issue_probersp’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2543:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index d1dbf234e9e02..f708e7b9f8fc8 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -5980,7 +5980,7 @@ u8 set_tx_beacon_cmd(struct adapter *padapter)

u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf)
{
- u8 evt_seq;
+ u8 __maybe_unused evt_seq;
u8 evt_code;
u16 evt_sz;
uint *peventbuf;
--
2.27.0

2021-04-15 00:40:02

by Lee Jones

[permalink] [raw]
Subject: [PATCH 41/57] staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc headers

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or member 'skb' not described in 'unprotect_frame'
drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or member 'iv_len' not described in 'unprotect_frame'
drivers/staging/rtl8188eu/os_dep/mon.c:21: warning: Function parameter or member 'icv_len' not described in 'unprotect_frame'
drivers/staging/rtl8188eu/os_dep/mon.c:75: warning: Function parameter or member 'dev' not described in 'rtl88eu_mon_recv_hook'
drivers/staging/rtl8188eu/os_dep/mon.c:75: warning: Function parameter or member 'frame' not described in 'rtl88eu_mon_recv_hook'
drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or member 'dev' not described in 'rtl88eu_mon_xmit_hook'
drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or member 'frame' not described in 'rtl88eu_mon_xmit_hook'
drivers/staging/rtl8188eu/os_dep/mon.c:108: warning: Function parameter or member 'frag_len' not described in 'rtl88eu_mon_xmit_hook'

Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8188eu/os_dep/mon.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/mon.c b/drivers/staging/rtl8188eu/os_dep/mon.c
index 73b9599fe0dc5..9b40de7d39e72 100644
--- a/drivers/staging/rtl8188eu/os_dep/mon.c
+++ b/drivers/staging/rtl8188eu/os_dep/mon.c
@@ -14,7 +14,7 @@
#include <rtw_xmit.h>
#include <mon.h>

-/**
+/*
* unprotect_frame() - unset Protected flag and strip off IV and ICV/MIC
*/
static void unprotect_frame(struct sk_buff *skb, int iv_len, int icv_len)
@@ -65,7 +65,7 @@ static void mon_recv_encrypted(struct net_device *dev, const u8 *data,
netdev_info(dev, "Encrypted packets are not supported");
}

-/**
+/*
* rtl88eu_mon_recv_hook() - forward received frame to the monitor interface
*
* Assumes that the frame contains an IV and an ICV/MIC, and that
@@ -96,7 +96,7 @@ void rtl88eu_mon_recv_hook(struct net_device *dev, struct recv_frame *frame)
mon_recv_encrypted(dev, data, data_len);
}

-/**
+/*
* rtl88eu_mon_xmit_hook() - forward trasmitted frame to the monitor interface
*
* Assumes that:
--
2.27.0

2021-04-15 00:40:06

by Lee Jones

[permalink] [raw]
Subject: [PATCH 03/57] staging: comedi_8254: Fix descriptions for 'i8254' and 'iobase'

Fixes the following W=1 kernel build warning(s):

drivers/staging/comedi/drivers/comedi_8254.c:561: warning: Function parameter or member 'i8254' not described in 'comedi_8254_subdevice_init'
drivers/staging/comedi/drivers/comedi_8254.c:620: warning: Function parameter or member 'iobase' not described in 'comedi_8254_init'
drivers/staging/comedi/drivers/comedi_8254.c:620: warning: Excess function parameter 'mmio' description in 'comedi_8254_init'

Cc: Ian Abbott <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "David A. Schleef" <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/comedi/drivers/comedi_8254.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/comedi_8254.c b/drivers/staging/comedi/drivers/comedi_8254.c
index d1d509e9add94..4bf5daa9e8855 100644
--- a/drivers/staging/comedi/drivers/comedi_8254.c
+++ b/drivers/staging/comedi/drivers/comedi_8254.c
@@ -555,6 +555,7 @@ static int comedi_8254_insn_config(struct comedi_device *dev,
/**
* comedi_8254_subdevice_init - initialize a comedi_subdevice for the 8254 timer
* @s: comedi_subdevice struct
+ * @i8254: comedi_8254 struct
*/
void comedi_8254_subdevice_init(struct comedi_subdevice *s,
struct comedi_8254 *i8254)
@@ -607,7 +608,7 @@ static struct comedi_8254 *__i8254_init(unsigned long iobase,

/**
* comedi_8254_init - allocate and initialize the 8254 device for pio access
- * @mmio: port I/O base address
+ * @iobase: port I/O base address
* @osc_base: base time of the counter in ns
* OPTIONAL - only used by comedi_8254_cascade_ns_to_timer()
* @iosize: I/O register size
--
2.27.0

2021-04-15 00:40:08

by Lee Jones

[permalink] [raw]
Subject: [PATCH 04/57] staging: r8192U_core: Do not use kernel-doc formatting for !kernel-doc headers

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8192u/r8192U_core.c:3714: warning: Function parameter or member 'dev' not described in 'UpdateRxPktTimeStamp8190'
drivers/staging/rtl8192u/r8192U_core.c:3714: warning: Function parameter or member 'stats' not described in 'UpdateRxPktTimeStamp8190'
drivers/staging/rtl8192u/r8192U_core.c:3714: warning: expecting prototype for Function(). Prototype was for UpdateRxPktTimeStamp8190() instead
drivers/staging/rtl8192u/r8192U_core.c:4314: warning: Function parameter or member 'dev' not described in 'UpdateReceivedRateHistogramStatistics8190'
drivers/staging/rtl8192u/r8192U_core.c:4314: warning: Function parameter or member 'stats' not described in 'UpdateReceivedRateHistogramStatistics8190'
drivers/staging/rtl8192u/r8192U_core.c:4314: warning: expecting prototype for Function(). Prototype was for UpdateReceivedRateHistogramStatistics8190() instead

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Andrea Merello <[email protected]>
Cc: Jerry chuang <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
index 643769e32e433..932b942ca1f30 100644
--- a/drivers/staging/rtl8192u/r8192U_core.c
+++ b/drivers/staging/rtl8192u/r8192U_core.c
@@ -3694,7 +3694,7 @@ static u8 HwRateToMRate90(bool bIsHT, u8 rate)
return ret_rate;
}

-/**
+/*
* Function: UpdateRxPktTimeStamp
* Overview: Record the TSF time stamp when receiving a packet
*
@@ -4294,7 +4294,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
rtl8192_record_rxdesc_forlateruse(pstats, &previous_stats);
}

-/**
+/*
* Function: UpdateReceivedRateHistogramStatistics
* Overview: Record the received data rate
*
--
2.27.0

2021-04-15 00:40:17

by Lee Jones

[permalink] [raw]
Subject: [PATCH 10/57] staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_build_wmm_ie_ht’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2482:6: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restructure_ht_ie’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2498:21: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_update_ht_cap’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2647:33: warning: variable ‘pht_addtinfo’ set but not used [-Wunused-but-set-variable]
from drivers/staging/rtl8188eu/core/rtw_mlme.c:12:

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index a7e40aaae2d9b..c624887aeed0c 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -2352,12 +2352,11 @@ void rtw_build_wmm_ie_ht(struct adapter *padapter, u8 *out_ie, uint *pout_len)
{
unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
int out_len;
- u8 *pframe;

if (padapter->mlmepriv.qospriv.qos_option == 0) {
out_len = *pout_len;
- pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC,
- _WMM_IE_Length_, WMM_IE, pout_len);
+ rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC,
+ _WMM_IE_Length_, WMM_IE, pout_len);

padapter->mlmepriv.qospriv.qos_option = 1;
}
@@ -2368,7 +2367,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
{
u32 ielen, out_len;
enum ieee80211_max_ampdu_length_exp max_rx_ampdu_factor;
- unsigned char *p, *pframe;
+ unsigned char *p;
struct ieee80211_ht_cap ht_capie;
u8 cbw40_enable = 0, stbc_rx_enable = 0, rf_type = 0, operation_bw = 0;
struct registry_priv *pregistrypriv = &padapter->registrypriv;
@@ -2491,8 +2490,8 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
else
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);

- pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_HT_CAPABILITY,
- sizeof(struct ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len);
+ rtw_set_ie(out_ie+out_len, WLAN_EID_HT_CAPABILITY,
+ sizeof(struct ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len);

phtpriv->ht_option = true;

@@ -2500,7 +2499,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len);
if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) {
out_len = *pout_len;
- pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_HT_OPERATION, ielen, p+2, pout_len);
+ rtw_set_ie(out_ie+out_len, WLAN_EID_HT_OPERATION, ielen, p+2, pout_len);
}
}

@@ -2515,7 +2514,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
int len;
/* struct sta_info *bmc_sta, *psta; */
struct ieee80211_ht_cap *pht_capie;
- struct ieee80211_ht_addt_info *pht_addtinfo;
/* struct recv_reorder_ctrl *preorder_ctrl; */
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
@@ -2552,7 +2550,6 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe
len = 0;
p = rtw_get_ie(pie+sizeof(struct ndis_802_11_fix_ie), WLAN_EID_HT_OPERATION, &len, ie_len-sizeof(struct ndis_802_11_fix_ie));
if (p && len > 0) {
- pht_addtinfo = (struct ieee80211_ht_addt_info *)(p+2);
/* todo: */
}

--
2.27.0

2021-04-15 00:40:17

by Lee Jones

[permalink] [raw]
Subject: [PATCH 07/57] staging: wlan-ng: cfg80211: Move large struct onto the heap

Fixes the following W=1 kernel build warning(s):

drivers/staging/wlan-ng/cfg80211.c: In function ‘prism2_scan’:
drivers/staging/wlan-ng/cfg80211.c:388:1: warning: the frame size of 1296 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Sumera Priyadarsini <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/wlan-ng/cfg80211.c | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 759e475e303c0..7951bd63816ff 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -276,7 +276,7 @@ static int prism2_scan(struct wiphy *wiphy,
struct prism2_wiphy_private *priv = wiphy_priv(wiphy);
struct wlandevice *wlandev;
struct p80211msg_dot11req_scan msg1;
- struct p80211msg_dot11req_scan_results msg2;
+ struct p80211msg_dot11req_scan_results *msg2;
struct cfg80211_bss *bss;
struct cfg80211_scan_info info = {};

@@ -301,6 +301,10 @@ static int prism2_scan(struct wiphy *wiphy,
return -EOPNOTSUPP;
}

+ msg2 = kzalloc(sizeof(*msg2), GFP_KERNEL);
+ if (!msg2)
+ return -ENOMEM;
+
priv->scan_request = request;

memset(&msg1, 0x00, sizeof(msg1));
@@ -342,31 +346,30 @@ static int prism2_scan(struct wiphy *wiphy,
for (i = 0; i < numbss; i++) {
int freq;

- memset(&msg2, 0, sizeof(msg2));
- msg2.msgcode = DIDMSG_DOT11REQ_SCAN_RESULTS;
- msg2.bssindex.data = i;
+ msg2->msgcode = DIDMSG_DOT11REQ_SCAN_RESULTS;
+ msg2->bssindex.data = i;

result = p80211req_dorequest(wlandev, (u8 *)&msg2);
if ((result != 0) ||
- (msg2.resultcode.data != P80211ENUM_resultcode_success)) {
+ (msg2->resultcode.data != P80211ENUM_resultcode_success)) {
break;
}

ie_buf[0] = WLAN_EID_SSID;
- ie_buf[1] = msg2.ssid.data.len;
+ ie_buf[1] = msg2->ssid.data.len;
ie_len = ie_buf[1] + 2;
- memcpy(&ie_buf[2], &msg2.ssid.data.data, msg2.ssid.data.len);
- freq = ieee80211_channel_to_frequency(msg2.dschannel.data,
+ memcpy(&ie_buf[2], &msg2->ssid.data.data, msg2->ssid.data.len);
+ freq = ieee80211_channel_to_frequency(msg2->dschannel.data,
NL80211_BAND_2GHZ);
bss = cfg80211_inform_bss(wiphy,
ieee80211_get_channel(wiphy, freq),
CFG80211_BSS_FTYPE_UNKNOWN,
- (const u8 *)&msg2.bssid.data.data,
- msg2.timestamp.data, msg2.capinfo.data,
- msg2.beaconperiod.data,
+ (const u8 *)&msg2->bssid.data.data,
+ msg2->timestamp.data, msg2->capinfo.data,
+ msg2->beaconperiod.data,
ie_buf,
ie_len,
- (msg2.signal.data - 65536) * 100, /* Conversion to signed type */
+ (msg2->signal.data - 65536) * 100, /* Conversion to signed type */
GFP_KERNEL);

if (!bss) {
@@ -378,12 +381,13 @@ static int prism2_scan(struct wiphy *wiphy,
}

if (result)
- err = prism2_result2err(msg2.resultcode.data);
+ err = prism2_result2err(msg2->resultcode.data);

exit:
info.aborted = !!(err);
cfg80211_scan_done(request, &info);
priv->scan_request = NULL;
+ kfree(msg2);
return err;
}

--
2.27.0

2021-04-15 00:40:21

by Lee Jones

[permalink] [raw]
Subject: [PATCH 57/57] staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Fabio Aiuto <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index f6d734dd1a24f..60d3d6d1ba678 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
{
u8 u1bTmp;
u8 bMacPwrCtrlOn;
- u8 ret = _FAIL;

/* Run LPS WL RFOFF flow */
- ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);

/* ==== Reset digital sequence ====== */

@@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
/* ==== Reset digital sequence end ====== */

bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
- ret = false;
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
- ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
+ HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
}

static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
--
2.27.0

2021-04-15 00:40:22

by Lee Jones

[permalink] [raw]
Subject: [PATCH 35/57] staging: most: dim2: hal: Demote non-conformant kernel-doc headers

Fixes the following W=1 kernel build warning(s):

drivers/staging/most/dim2/hal.c:99: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'buf_size' not described in 'dim_norm_isoc_buffer_size'
drivers/staging/most/dim2/hal.c:788: warning: Function parameter or member 'packet_length' not described in 'dim_norm_isoc_buffer_size'
drivers/staging/most/dim2/hal.c:788: warning: expecting prototype for Retrieves maximal possible correct buffer size for isochronous data type(). Prototype was for dim_norm_isoc_buffer_size() instead
drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'buf_size' not described in 'dim_norm_sync_buffer_size'
drivers/staging/most/dim2/hal.c:802: warning: Function parameter or member 'bytes_per_frame' not described in 'dim_norm_sync_buffer_size'
drivers/staging/most/dim2/hal.c:802: warning: expecting prototype for Retrieves maximal possible correct buffer size for synchronous data type(). Prototype was for dim_norm_sync_buffer_size() instead

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Andrey Shvetsov <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/most/dim2/hal.c | 4 ++--
drivers/staging/qlge/qlge_main.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/most/dim2/hal.c b/drivers/staging/most/dim2/hal.c
index 30112413f20a0..65282c2768628 100644
--- a/drivers/staging/most/dim2/hal.c
+++ b/drivers/staging/most/dim2/hal.c
@@ -96,9 +96,9 @@ static int dbr_get_mask_size(u16 size)
}

/**
- * Allocates DBR memory.
+ * alloc_dbr() - Allocates DBR memory.
* @size: Allocating memory size.
- * @return Offset in DBR memory by success or DBR_SIZE if out of memory.
+ * Returns: Offset in DBR memory by success or DBR_SIZE if out of memory.
*/
static int alloc_dbr(u16 size)
{
diff --git a/drivers/staging/qlge/qlge_main.c b/drivers/staging/qlge/qlge_main.c
index c9dc6a852af4a..55a04ca9307c1 100644
--- a/drivers/staging/qlge/qlge_main.c
+++ b/drivers/staging/qlge/qlge_main.c
@@ -1389,7 +1389,7 @@ static void qlge_categorize_rx_err(struct qlge_adapter *qdev, u8 rx_err,
}
}

-/**
+/*
* qlge_update_mac_hdr_len - helper routine to update the mac header length
* based on vlan tags if present
*/
@@ -2235,7 +2235,7 @@ static void qlge_vlan_mode(struct net_device *ndev, netdev_features_t features)
}
}

-/**
+/*
* qlge_update_hw_vlan_features - helper routine to reinitialize the adapter
* based on the features to enable/disable hardware vlan accel
*/
--
2.27.0

2021-04-15 00:40:22

by Lee Jones

[permalink] [raw]
Subject: [PATCH 43/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Remove unused variable and dead code

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘CCX_FwC2HTxRpt_8723b’:
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3355:5: warning: variable ‘seq_no’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Marco Cesati <[email protected]>
Cc: Fabio Aiuto <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 8d6ea8850556f..4773f0dcd9819 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3199,23 +3199,14 @@ static void hw_var_set_mlme_join(struct adapter *padapter, u8 variable, u8 *val)

void CCX_FwC2HTxRpt_8723b(struct adapter *padapter, u8 *pdata, u8 len)
{
- u8 seq_no;
-
#define GET_8723B_C2H_TX_RPT_LIFE_TIME_OVER(_Header) LE_BITS_TO_1BYTE((_Header + 0), 6, 1)
#define GET_8723B_C2H_TX_RPT_RETRY_OVER(_Header) LE_BITS_TO_1BYTE((_Header + 0), 7, 1)

- seq_no = *(pdata+6);
-
if (GET_8723B_C2H_TX_RPT_RETRY_OVER(pdata) | GET_8723B_C2H_TX_RPT_LIFE_TIME_OVER(pdata)) {
rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_CCX_PKT_FAIL);
- }
-/*
- else if (seq_no != padapter->xmitpriv.seq_no) {
- rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_CCX_PKT_FAIL);
- }
-*/
- else
+ } else {
rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_SUCCESS);
+ }
}

s32 c2h_id_filter_ccx_8723b(u8 *buf)
--
2.27.0

2021-04-15 00:40:31

by Lee Jones

[permalink] [raw]
Subject: [PATCH 23/57] staging: ks7010: ks_hostif: Remove a bunch of unused variables

Add comments to preserve documentation.

Fixes the following W=1 kernel build warning(s):

drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_mib_get_confirm’:
drivers/staging/ks7010/ks_hostif.c:528:6: warning: variable ‘mib_val_type’ set but not used [-Wunused-but-set-variable]
drivers/staging/ks7010/ks_hostif.c:527:6: warning: variable ‘mib_val_size’ set but not used [-Wunused-but-set-variable]
drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_infrastructure_set_confirm’:
drivers/staging/ks7010/ks_hostif.c:849:6: warning: variable ‘result_code’ set but not used [-Wunused-but-set-variable]
drivers/staging/ks7010/ks_hostif.c: In function ‘hostif_phy_information_confirm’:
drivers/staging/ks7010/ks_hostif.c:929:19: warning: variable ‘noise’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/ks7010/ks_hostif.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index 8bc3b7d8d3d5e..eaa70893224a1 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -524,13 +524,11 @@ void hostif_mib_get_confirm(struct ks_wlan_private *priv)
struct net_device *dev = priv->net_dev;
u32 mib_status;
u32 mib_attribute;
- u16 mib_val_size;
- u16 mib_val_type;

mib_status = get_dword(priv);
mib_attribute = get_dword(priv);
- mib_val_size = get_word(priv);
- mib_val_type = get_word(priv);
+ get_word(priv); /* mib_val_size */
+ get_word(priv); /* mib_val_type */

if (mib_status) {
netdev_err(priv->net_dev, "attribute=%08X, status=%08X\n",
@@ -846,9 +844,7 @@ void hostif_ps_adhoc_set_confirm(struct ks_wlan_private *priv)
static
void hostif_infrastructure_set_confirm(struct ks_wlan_private *priv)
{
- u16 result_code;
-
- result_code = get_word(priv);
+ get_word(priv); /* result_code */
priv->infra_status = 1; /* infrastructure mode set */
hostif_sme_enqueue(priv, SME_MODE_SET_CONFIRM);
}
@@ -926,14 +922,14 @@ static
void hostif_phy_information_confirm(struct ks_wlan_private *priv)
{
struct iw_statistics *wstats = &priv->wstats;
- u8 rssi, signal, noise;
+ u8 rssi, signal;
u8 link_speed;
u32 transmitted_frame_count, received_fragment_count;
u32 failed_count, fcs_error_count;

rssi = get_byte(priv);
signal = get_byte(priv);
- noise = get_byte(priv);
+ get_byte(priv); /* noise */
link_speed = get_byte(priv);
transmitted_frame_count = get_dword(priv);
received_fragment_count = get_dword(priv);
--
2.27.0

2021-04-15 00:40:31

by Lee Jones

[permalink] [raw]
Subject: [PATCH 26/57] staging: most: net: Fix some kernel-doc formatting issues

Fixes the following W=1 kernel build warning(s):

drivers/staging/most/net/net.c:548: warning: Function parameter or member 'iface' not described in 'on_netinfo'
drivers/staging/most/net/net.c:548: warning: Function parameter or member 'link_stat' not described in 'on_netinfo'
drivers/staging/most/net/net.c:548: warning: Function parameter or member 'mac_addr' not described in 'on_netinfo'

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Andrey Shvetsov <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/most/net/net.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c
index f125bb6da406f..a5fd14246046e 100644
--- a/drivers/staging/most/net/net.c
+++ b/drivers/staging/most/net/net.c
@@ -539,9 +539,9 @@ static void __exit most_net_exit(void)

/**
* on_netinfo - callback for HDM to be informed about HW's MAC
- * @param iface - most interface instance
- * @param link_stat - link status
- * @param mac_addr - MAC address
+ * @iface: most interface instance
+ * @link_stat: link status
+ * @mac_addr: MAC address
*/
static void on_netinfo(struct most_interface *iface,
unsigned char link_stat, unsigned char *mac_addr)
--
2.27.0

2021-04-15 00:40:36

by Lee Jones

[permalink] [raw]
Subject: [PATCH 46/57] staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused and remove another

'err' is only used if debug is enabled.

Also remove 4 year old TODO.

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read32’:
drivers/staging/rtl8723bs/hal/sdio_ops.c:170:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/sdio_ops.c: In function ‘sdio_read_mem’:
drivers/staging/rtl8723bs/hal/sdio_ops.c:381:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Fabio Aiuto <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_ops.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c
index 701f1abbd0f07..51d72262d11e4 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_ops.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c
@@ -160,7 +160,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)
u32 ftaddr;
u8 shift;
u32 val;
- s32 err;
+ s32 __maybe_unused err;
__le32 le_tmp;

adapter = intfhdl->padapter;
@@ -360,10 +360,7 @@ static void sdio_read_mem(
u8 *rmem
)
{
- s32 err;
-
- err = sdio_readN(intfhdl, addr, cnt, rmem);
- /* TODO: Report error is err not zero */
+ sdio_readN(intfhdl, addr, cnt, rmem);
}

static void sdio_write_mem(
--
2.27.0

2021-04-15 00:40:37

by Lee Jones

[permalink] [raw]
Subject: [PATCH 51/57] staging: axis-fifo: axis-fifo: Fix function naming in the documentation

Fixes the following W=1 kernel build warning(s):

drivers/staging/axis-fifo/axis-fifo.c:356: warning: expecting prototype for axis_fifo_write(). Prototype was for axis_fifo_read() instead

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jacob Feder <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/axis-fifo/axis-fifo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 8eee17dc77ab9..b23eabb863d17 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -337,7 +337,7 @@ static void reset_ip_core(struct axis_fifo *fifo)
}

/**
- * axis_fifo_write() - Read a packet from AXIS-FIFO character device.
+ * axis_fifo_read() - Read a packet from AXIS-FIFO character device.
* @f: Open file.
* @buf: User space buffer to read to.
* @len: User space buffer length.
--
2.27.0

2021-04-15 00:40:38

by Lee Jones

[permalink] [raw]
Subject: [PATCH 52/57] staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable 'func_start'

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function ‘odm_InbandNoise_Monitor_NSeries’:
drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:18: warning: variable ‘func_start’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Marco Cesati <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
index e3b44481bd888..956e5a725a5d7 100644
--- a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
+++ b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
@@ -29,9 +29,8 @@ static s16 odm_InbandNoise_Monitor_NSeries(
u8 max_rf_path = 0, rf_path;
u8 reg_c50, reg_c58, valid_done = 0;
struct noise_level noise_data;
- u32 start = 0, func_start = 0;
+ u32 start = 0;

- func_start = jiffies;
pDM_Odm->noise_level.noise_all = 0;

if ((pDM_Odm->RFType == ODM_1T2R) || (pDM_Odm->RFType == ODM_2T2R))
--
2.27.0

2021-04-15 00:40:40

by Lee Jones

[permalink] [raw]
Subject: [PATCH 31/57] staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is set

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_joinbss_event_prehandle’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:1192:12: warning: variable ‘retry’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Fabio Aiuto <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index c624887aeed0c..f8ce4f2d31e13 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -1189,7 +1189,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
/* define REJOIN */
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
{
- static u8 retry;
+ static u8 __maybe_unused retry;
struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
struct sta_priv *pstapriv = &adapter->stapriv;
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
--
2.27.0

2021-04-15 00:40:59

by Lee Jones

[permalink] [raw]
Subject: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

... and mark it as __maybe_unused since not all users of the
header file reference it.

Fixes the following W=1 kernel build warning(s):

drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]

Cc: Ian Abbott <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: "Uwe Kleine-König" <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: "David A. Schleef" <[email protected]>
Cc: Mori Hess <[email protected]>
Cc: Truxton Fulton <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/comedi/drivers/ni_mio_common.c | 9 ---------
drivers/staging/comedi/drivers/ni_stc.h | 9 ++++++++-
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 4f80a4991f953..37615b4e2c10d 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x = {
}
};

-static const struct comedi_lrange range_ni_E_ao_ext = {
- 4, {
- BIP_RANGE(10),
- UNI_RANGE(10),
- RANGE_ext(-1, 1),
- RANGE_ext(0, 1)
- }
-};
-
static const struct comedi_lrange *const ni_range_lkup[] = {
[ai_gain_16] = &range_ni_E_ai,
[ai_gain_8] = &range_ni_E_ai_limited,
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index fbc0b753a0f59..0822e65f709dd 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1137,6 +1137,13 @@ struct ni_private {
u8 rgout0_usage;
};

-static const struct comedi_lrange range_ni_E_ao_ext;
+static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext = {
+ 4, {
+ BIP_RANGE(10),
+ UNI_RANGE(10),
+ RANGE_ext(-1, 1),
+ RANGE_ext(0, 1)
+ }
+};

#endif /* _COMEDI_NI_STC_H */
--
2.27.0

2021-04-15 00:41:01

by Lee Jones

[permalink] [raw]
Subject: [PATCH 49/57] staging: comedi: drivers: ni_tio: Fix slightly broken kernel-doc and demote others

Fixes the following W=1 kernel build warning(s):

drivers/staging/comedi/drivers/ni_tio.c:1515: warning: Function parameter or member 'counter_dev' not described in 'ni_tio_get_routing'
drivers/staging/comedi/drivers/ni_tio.c:1515: warning: Function parameter or member 'dest' not described in 'ni_tio_get_routing'
drivers/staging/comedi/drivers/ni_tio.c:1515: warning: expecting prototype for Retrieves the register value of the current source of the output selector for(). Prototype was for ni_tio_get_routing() instead
drivers/staging/comedi/drivers/ni_tio.c:1544: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
drivers/staging/comedi/drivers/ni_tio.c:1584: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Ian Abbott <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Mori Hess <[email protected]>
Cc: "J.P. Mellor" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Comedi <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/comedi/drivers/ni_tio.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_tio.c b/drivers/staging/comedi/drivers/ni_tio.c
index f6154addaa956..da6826d77e600 100644
--- a/drivers/staging/comedi/drivers/ni_tio.c
+++ b/drivers/staging/comedi/drivers/ni_tio.c
@@ -1501,7 +1501,7 @@ int ni_tio_insn_config(struct comedi_device *dev,
}
EXPORT_SYMBOL_GPL(ni_tio_insn_config);

-/**
+/*
* Retrieves the register value of the current source of the output selector for
* the given destination.
*
@@ -1541,10 +1541,10 @@ int ni_tio_get_routing(struct ni_gpct_device *counter_dev, unsigned int dest)
EXPORT_SYMBOL_GPL(ni_tio_get_routing);

/**
- * Sets the register value of the selector MUX for the given destination.
- * @counter_dev:Pointer to general counter device.
- * @destination:Device-global identifier of route destination.
- * @register_value:
+ * ni_tio_set_routing() - Sets the register value of the selector MUX for the given destination.
+ * @counter_dev: Pointer to general counter device.
+ * @dest: Device-global identifier of route destination.
+ * @reg:
* The first several bits of this value should store the desired
* value to write to the register. All other bits are for
* transmitting information that modify the mode of the particular
@@ -1580,7 +1580,7 @@ int ni_tio_set_routing(struct ni_gpct_device *counter_dev, unsigned int dest,
}
EXPORT_SYMBOL_GPL(ni_tio_set_routing);

-/**
+/*
* Sets the given destination MUX to its default value or disable it.
*
* Return: 0 if successful; -EINVAL if terminal is unknown.
--
2.27.0

2021-04-15 00:41:42

by Lee Jones

[permalink] [raw]
Subject: [PATCH 36/57] staging: axis-fifo: axis-fifo: Fix some formatting issues

Fixes the following W=1 kernel build warning(s):

drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'f' not described in 'axis_fifo_read'
drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'buf' not described in 'axis_fifo_read'
drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'len' not described in 'axis_fifo_read'
drivers/staging/axis-fifo/axis-fifo.c:356: warning: Function parameter or member 'off' not described in 'axis_fifo_read'
drivers/staging/axis-fifo/axis-fifo.c:356: warning: expecting prototype for axis_fifo_write(). Prototype was for axis_fifo_read() instead
drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'f' not described in 'axis_fifo_write'
drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'buf' not described in 'axis_fifo_write'
drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'len' not described in 'axis_fifo_write'
drivers/staging/axis-fifo/axis-fifo.c:478: warning: Function parameter or member 'off' not described in 'axis_fifo_write'

Cc: Greg Kroah-Hartman <[email protected]>
Cc: "John B. Wyatt IV" <[email protected]>
Cc: Jacob Feder <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/axis-fifo/axis-fifo.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index ed92810897389..8eee17dc77ab9 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -338,10 +338,10 @@ static void reset_ip_core(struct axis_fifo *fifo)

/**
* axis_fifo_write() - Read a packet from AXIS-FIFO character device.
- * @f Open file.
- * @buf User space buffer to read to.
- * @len User space buffer length.
- * @off Buffer offset.
+ * @f: Open file.
+ * @buf: User space buffer to read to.
+ * @len: User space buffer length.
+ * @off: Buffer offset.
*
* As defined by the device's documentation, we need to check the device's
* occupancy before reading the length register and then the data. All these
@@ -460,10 +460,10 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,

/**
* axis_fifo_write() - Write buffer to AXIS-FIFO character device.
- * @f Open file.
- * @buf User space buffer to write to the device.
- * @len User space buffer length.
- * @off Buffer offset.
+ * @f: Open file.
+ * @buf: User space buffer to write to the device.
+ * @len: User space buffer length.
+ * @off: Buffer offset.
*
* As defined by the device's documentation, we need to write to the device's
* data buffer then to the device's packet length register atomically. Also,
--
2.27.0

2021-04-15 00:41:43

by Lee Jones

[permalink] [raw]
Subject: [PATCH 42/57] staging: rtl8188eu: os_dep: rtw_android: Demote kernel-doc abuse

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8188eu/os_dep/rtw_android.c:56: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst

Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8188eu/os_dep/rtw_android.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/rtw_android.c b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
index f5763a9d70c58..91c51b5583d27 100644
--- a/drivers/staging/rtl8188eu/os_dep/rtw_android.c
+++ b/drivers/staging/rtl8188eu/os_dep/rtw_android.c
@@ -52,7 +52,7 @@ struct android_wifi_priv_cmd {
int total_len;
};

-/**
+/*
* Local (static) functions and variables
*/

--
2.27.0

2021-04-15 00:41:43

by Lee Jones

[permalink] [raw]
Subject: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function ‘translate_scan’:
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:310:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_wx_set_mlme’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6: warning: variable ‘reason’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’:
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: ‘iw_operation_mode’ defined but not used [-Wunused-const-variable=]

Cc: Larry Finger <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index c95ae4d6a3b6b..cc14f00947781 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
/* parsing WPA/WPA2 IE */
{
u8 *buf;
- u8 wpa_ie[255], rsn_ie[255];
+ u8 *wpa_ie, *rsn_ie;
u16 wpa_len = 0, rsn_len = 0;
u8 *p;

@@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
if (!buf)
return start;

+ wpa_ie = kzalloc(255, GFP_ATOMIC);
+ if (!wpa_ie)
+ return start;
+
+ rsn_ie = kzalloc(255, GFP_ATOMIC);
+ if (!rsn_ie)
+ return start;
+
rtw_get_sec_ie(pnetwork->network.ies, pnetwork->network.ie_length, rsn_ie, &rsn_len, wpa_ie, &wpa_len);
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan: ssid =%s\n", pnetwork->network.ssid.ssid));
RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len));
@@ -268,6 +276,8 @@ static char *translate_scan(struct adapter *padapter,
start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
}
kfree(buf);
+ kfree(wpa_ie);
+ kfree(rsn_ie);
}

{/* parsing WPS IE */
--
2.27.0

2021-04-15 00:41:48

by Lee Jones

[permalink] [raw]
Subject: [PATCH 40/57] staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and dead code

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c: In function ‘odm_InbandNoise_Monitor_NSeries’:
drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c:32:34: warning: variable ‘func_end’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Marco Cesati <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
index c3de123e2a487..e3b44481bd888 100644
--- a/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
+++ b/drivers/staging/rtl8723bs/hal/odm_NoiseMonitor.c
@@ -29,7 +29,7 @@ static s16 odm_InbandNoise_Monitor_NSeries(
u8 max_rf_path = 0, rf_path;
u8 reg_c50, reg_c58, valid_done = 0;
struct noise_level noise_data;
- u32 start = 0, func_start = 0, func_end = 0;
+ u32 start = 0, func_start = 0;

func_start = jiffies;
pDM_Odm->noise_level.noise_all = 0;
@@ -150,12 +150,6 @@ static s16 odm_InbandNoise_Monitor_NSeries(
if (bPauseDIG)
odm_PauseDIG(pDM_Odm, ODM_RESUME_DIG, IGIValue);

- func_end = jiffies_to_msecs(jiffies - func_start);
- /* printk("%s noise_a = %d, noise_b = %d noise_all:%d (%d ms)\n", __func__, */
- /* pDM_Odm->noise_level.noise[ODM_RF_PATH_A], */
- /* pDM_Odm->noise_level.noise[ODM_RF_PATH_B], */
- /* pDM_Odm->noise_level.noise_all, func_end); */
-
ODM_RT_TRACE(pDM_Odm, ODM_COMP_COMMON, ODM_DBG_LOUD, ("odm_DebugControlInbandNoise_Nseries() <==\n"));
return pDM_Odm->noise_level.noise_all;

--
2.27.0

2021-04-15 00:41:52

by Lee Jones

[permalink] [raw]
Subject: [PATCH 45/57] staging: rtl8723bs: hal: sdio_halinit: 'start' is only used if debug is enabled

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘_ReadAdapterInfo8723BS’:
drivers/staging/rtl8723bs/hal/sdio_halinit.c:1170:16: warning: variable ‘start’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Fabio Aiuto <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 2098384efe927..f6d734dd1a24f 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -1153,7 +1153,7 @@ static void _InitOtherVariable(struct adapter *Adapter)
static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
{
u8 val8;
- unsigned long start;
+ unsigned long __maybe_unused start;

/* before access eFuse, make sure card enable has been called */
if (!padapter->hw_init_completed)
--
2.27.0

2021-04-15 00:41:52

by Lee Jones

[permalink] [raw]
Subject: [PATCH 44/57] staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed functions

... and fix a misnamed param.

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:53: warning: expecting prototype for PHY_QueryBBReg(). Prototype was for PHY_QueryBBReg_8723B() instead
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:87: warning: expecting prototype for PHY_SetBBReg(). Prototype was for PHY_SetBBReg_8723B() instead
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: Function parameter or member 'RegAddr' not described in 'PHY_QueryRFReg_8723B'
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:252: warning: expecting prototype for PHY_QueryRFReg(). Prototype was for PHY_QueryRFReg_8723B() instead
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c:285: warning: expecting prototype for PHY_SetRFReg(). Prototype was for PHY_SetRFReg_8723B() instead

Cc: Greg Kroah-Hartman <[email protected]>
Cc: karthik alapati <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
index f43abf9b0d225..011b42e1b9917 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
@@ -38,7 +38,7 @@ static u32 phy_CalculateBitShift(u32 BitMask)


/**
- * PHY_QueryBBReg - Read "specific bits" from BB register.
+ * PHY_QueryBBReg_8723B - Read "specific bits" from BB register.
* @Adapter:
* @RegAddr: The target address to be readback
* @BitMask: The target bit position in the target address
@@ -66,7 +66,7 @@ u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask)


/**
- * PHY_SetBBReg - Write "Specific bits" to BB register (page 8~).
+ * PHY_SetBBReg_8723B - Write "Specific bits" to BB register (page 8~).
* @Adapter:
* @RegAddr: The target address to be modified
* @BitMask: The target bit position in the target address
@@ -231,10 +231,10 @@ static void phy_RFSerialWrite_8723B(


/**
- * PHY_QueryRFReg - Query "Specific bits" to RF register (page 8~).
+ * PHY_QueryRFReg_8723B - Query "Specific bits" to RF register (page 8~).
* @Adapter:
* @eRFPath: Radio path of A/B/C/D
- * @RegAdd: The target address to be read
+ * @RegAddr: The target address to be read
* @BitMask: The target bit position in the target address
* to be read
*
@@ -263,7 +263,7 @@ u32 PHY_QueryRFReg_8723B(
}

/**
- * PHY_SetRFReg - Write "Specific bits" to RF register (page 8~).
+ * PHY_SetRFReg_8723B - Write "Specific bits" to RF register (page 8~).
* @Adapter:
* @eRFPath: Radio path of A/B/C/D
* @RegAddr: The target address to be modified
--
2.27.0

2021-04-15 00:41:58

by Lee Jones

[permalink] [raw]
Subject: [PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale'

Fixes the following W=1 kernel build warning(s):

drivers/staging/comedi/drivers/jr3_pci.c: In function ‘jr3_pci_poll_subdevice’:
drivers/staging/comedi/drivers/jr3_pci.c:507:22: warning: variable ‘min_full_scale’ set but not used [-Wunused-but-set-variable]

Cc: Ian Abbott <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "Alexander A. Klimov" <[email protected]>
Cc: Anders Blomdell <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/comedi/drivers/jr3_pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index 7a02c4fa3cda8..afa2f8d5c8c0c 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -504,10 +504,9 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
result = poll_delay_min_max(20, 100);
} else {
/* Set full scale */
- struct six_axis_t min_full_scale;
struct six_axis_t max_full_scale;

- min_full_scale = get_min_full_scales(sensor);
+ get_min_full_scales(sensor);
max_full_scale = get_max_full_scales(sensor);
set_full_scales(sensor, max_full_scale);

--
2.27.0

2021-04-15 00:42:06

by Lee Jones

[permalink] [raw]
Subject: [PATCH 47/57] staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug is enabled

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function ‘_cfg80211_rtw_mgmt_tx’:
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2754:7: warning: variable ‘ack’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 89a21eb63c0a9..48b64fb579755 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2591,7 +2591,7 @@ static int _cfg80211_rtw_mgmt_tx(struct adapter *padapter, u8 tx_ch, const u8 *b
struct pkt_attrib *pattrib;
unsigned char *pframe;
int ret = _FAIL;
- bool ack = true;
+ bool __maybe_unused ack = true;
struct ieee80211_hdr *pwlanhdr;
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
--
2.27.0

2021-04-15 00:42:06

by Lee Jones

[permalink] [raw]
Subject: [PATCH 50/57] staging: comedi: drivers: ni_routes: Demote non-conforming kernel-doc headers

Fixes the following W=1 kernel build warning(s):

drivers/staging/comedi/drivers/ni_routes.c:249: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
drivers/staging/comedi/drivers/ni_routes.c:398: warning: Function parameter or member 'routes' not described in 'ni_route_set_has_source'
drivers/staging/comedi/drivers/ni_routes.c:398: warning: Function parameter or member 'source' not described in 'ni_route_set_has_source'
drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or member 'src_sel_reg_value' not described in 'ni_find_route_source'
drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or member 'dest' not described in 'ni_find_route_source'
drivers/staging/comedi/drivers/ni_routes.c:524: warning: Function parameter or member 'tables' not described in 'ni_find_route_source'

Cc: Ian Abbott <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "Alexander A. Klimov" <[email protected]>
Cc: "Spencer E. Olson" <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/comedi/drivers/ni_routes.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_routes.c b/drivers/staging/comedi/drivers/ni_routes.c
index 1f2aa3b239a0d..f0f8cd424b309 100644
--- a/drivers/staging/comedi/drivers/ni_routes.c
+++ b/drivers/staging/comedi/drivers/ni_routes.c
@@ -245,7 +245,7 @@ unsigned int ni_get_valid_routes(const struct ni_route_tables *tables,
}
EXPORT_SYMBOL_GPL(ni_get_valid_routes);

-/**
+/*
* List of NI global signal names that, as destinations, are only routeable
* indirectly through the *_arg elements of the comedi_cmd structure.
*/
@@ -387,7 +387,7 @@ ni_find_route_set(const int destination,
}
EXPORT_SYMBOL_GPL(ni_find_route_set);

-/**
+/*
* ni_route_set_has_source() - Determines whether the given source is in
* included given route_set.
*
@@ -506,7 +506,7 @@ s8 ni_route_to_register(const int src, const int dest,
}
EXPORT_SYMBOL_GPL(ni_route_to_register);

-/**
+/*
* ni_find_route_source() - Finds the signal source corresponding to a signal
* route (src-->dest) of the specified routing register
* value and the specified route destination on the
--
2.27.0

2021-04-15 00:42:13

by Lee Jones

[permalink] [raw]
Subject: [PATCH 53/57] staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer onto the heap

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c: In function ‘issue_probersp’:
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2543:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index f708e7b9f8fc8..78ca8fbaab8da 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -2450,9 +2450,13 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
u8 *ssid_ie;
signed int ssid_ielen;
signed int ssid_ielen_diff;
- u8 buf[MAX_IE_SZ];
+ u8 *buf;
u8 *ies = pmgntframe->buf_addr+TXDESC_OFFSET+sizeof(struct ieee80211_hdr_3addr);

+ buf = rtw_zmalloc(MAX_IE_SZ);
+ if (!buf)
+ return;
+
ssid_ie = rtw_get_ie(ies+_FIXED_IE_LENGTH_, WLAN_EID_SSID, &ssid_ielen,
(pframe-ies)-_FIXED_IE_LENGTH_);

@@ -2478,6 +2482,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
pframe += ssid_ielen_diff;
pattrib->pktlen += ssid_ielen_diff;
}
+ kfree (buf);
}
} else {
/* timestamp will be inserted by hardware */
--
2.27.0

2021-04-15 00:42:15

by Lee Jones

[permalink] [raw]
Subject: [PATCH 54/57] staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug variables as __maybe_unused

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘SetHwReg8723B’:
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:32: warning: variable ‘ioted’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:20: warning: variable ‘masked’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3507:7: warning: variable ‘input_b’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function ‘GetHalDefVar8723B’:
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:46: warning: variable ‘lowest_rate’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:34: warning: variable ‘hight_rate’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:21: warning: variable ‘curr_tx_sgi’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4072:7: warning: variable ‘curr_tx_rate’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4071:20: warning: variable ‘rate_mask2’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:4071:8: warning: variable ‘rate_mask1’ set but not used [-Wunused-but-set-variable]

Cc: Greg Kroah-Hartman <[email protected]>
Cc: Marco Cesati <[email protected]>
Cc: Fabio Aiuto <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index 4773f0dcd9819..ebed2a912dcdd 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -3348,7 +3348,8 @@ void SetHwReg8723B(struct adapter *padapter, u8 variable, u8 *val)
case HW_VAR_BASIC_RATE:
{
struct mlme_ext_info *mlmext_info = &padapter->mlmeextpriv.mlmext_info;
- u16 input_b = 0, masked = 0, ioted = 0, BrateCfg = 0;
+ u16 __maybe_unused input_b = 0, __maybe_unused masked = 0;
+ u16 __maybe_unused ioted = 0, BrateCfg = 0;
u16 rrsr_2g_force_mask = (RRSR_11M|RRSR_5_5M|RRSR_1M);
u16 rrsr_2g_allow_mask = (RRSR_24M|RRSR_12M|RRSR_6M|RRSR_CCK_RATES);

@@ -3894,8 +3895,9 @@ u8 GetHalDefVar8723B(struct adapter *padapter, enum hal_def_variable variable, v
u8 mac_id = *(u8 *)pval;
u32 cmd;
u32 ra_info1, ra_info2;
- u32 rate_mask1, rate_mask2;
- u8 curr_tx_rate, curr_tx_sgi, hight_rate, lowest_rate;
+ u32 __maybe_unused rate_mask1, __maybe_unused rate_mask2;
+ u8 __maybe_unused curr_tx_rate, __maybe_unused curr_tx_sgi;
+ u8 __maybe_unused hight_rate, __maybe_unused lowest_rate;

cmd = 0x40000100 | mac_id;
rtw_write32(padapter, REG_HMEBOX_DBG_2_8723B, cmd);
--
2.27.0

2021-04-15 00:42:17

by Lee Jones

[permalink] [raw]
Subject: [PATCH 56/57] staging: comedi: drivers: comedi_isadma: Fix misspelling of 'dma_chan1'

Fixes the following W=1 kernel build warning(s):

drivers/staging/comedi/drivers/comedi_isadma.c:157: warning: Function parameter or member 'dma_chan1' not described in 'comedi_isadma_alloc'
drivers/staging/comedi/drivers/comedi_isadma.c:157: warning: Excess function parameter 'dma_chan' description in 'comedi_isadma_alloc'

Cc: Ian Abbott <[email protected]>
Cc: H Hartley Sweeten <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: [email protected]
Signed-off-by: Lee Jones <[email protected]>
---
drivers/staging/comedi/drivers/comedi_isadma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/comedi_isadma.c b/drivers/staging/comedi/drivers/comedi_isadma.c
index c729094298c2f..479b58e209ba6 100644
--- a/drivers/staging/comedi/drivers/comedi_isadma.c
+++ b/drivers/staging/comedi/drivers/comedi_isadma.c
@@ -143,7 +143,7 @@ EXPORT_SYMBOL_GPL(comedi_isadma_set_mode);
* comedi_isadma_alloc - allocate and initialize the ISA DMA
* @dev: comedi_device struct
* @n_desc: the number of cookies to allocate
- * @dma_chan: DMA channel for the first cookie
+ * @dma_chan1: DMA channel for the first cookie
* @dma_chan2: DMA channel for the second cookie
* @maxsize: the size of the buffer to allocate for each cookie
* @dma_dir: the DMA direction
--
2.27.0

2021-04-15 05:21:56

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote:
> ---
> drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> index c95ae4d6a3b6b..cc14f00947781 100644
> --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> @@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
> /* parsing WPA/WPA2 IE */
> {
> u8 *buf;
> - u8 wpa_ie[255], rsn_ie[255];
> + u8 *wpa_ie, *rsn_ie;
> u16 wpa_len = 0, rsn_len = 0;
> u8 *p;
>
> @@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
> if (!buf)
> return start;
>
> + wpa_ie = kzalloc(255, GFP_ATOMIC);
> + if (!wpa_ie)
> + return start;

kfree(buf);

> +
> + rsn_ie = kzalloc(255, GFP_ATOMIC);
> + if (!rsn_ie)
> + return start;

kfree(buf);
kfree(wpa_ie);

> +
> rtw_get_sec_ie(pnetwork->network.ies, pnetwork->network.ie_length, rsn_ie, &rsn_len, wpa_ie, &wpa_len);
> RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan: ssid =%s\n", pnetwork->network.ssid.ssid));
> RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_scan: wpa_len =%d rsn_len =%d\n", wpa_len, rsn_len));

regards,
dan carpenter

2021-04-15 05:27:32

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote:
> On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote:
> > ---
> > drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > index c95ae4d6a3b6b..cc14f00947781 100644
> > --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > @@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
> > /* parsing WPA/WPA2 IE */
> > {
> > u8 *buf;
> > - u8 wpa_ie[255], rsn_ie[255];
> > + u8 *wpa_ie, *rsn_ie;
> > u16 wpa_len = 0, rsn_len = 0;
> > u8 *p;
> >
> > @@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
> > if (!buf)
> > return start;

Arnd, added this return... I don't understand why we aren't returning
-ENOMEM here.

> >
> > + wpa_ie = kzalloc(255, GFP_ATOMIC);
> > + if (!wpa_ie)
> > + return start;
>
> kfree(buf);
>
> > +
> > + rsn_ie = kzalloc(255, GFP_ATOMIC);
> > + if (!rsn_ie)
> > + return start;
>

regards,
dan carpenter

2021-04-15 05:54:39

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

I screwed up my last email and dropped Lee and Arnd from the To: headers.
Resending.

On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote:
> On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote:
> > ---
> > drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > index c95ae4d6a3b6b..cc14f00947781 100644
> > --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > @@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
> > /* parsing WPA/WPA2 IE */
> > {
> > u8 *buf;
> > - u8 wpa_ie[255], rsn_ie[255];
> > + u8 *wpa_ie, *rsn_ie;
> > u16 wpa_len = 0, rsn_len = 0;
> > u8 *p;
> >
> > @@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
> > if (!buf)
> > return start;

Arnd added this return. I think it should be -ENOMEM, though?

> >
> > + wpa_ie = kzalloc(255, GFP_ATOMIC);
> > + if (!wpa_ie)
> > + return start;
>
> kfree(buf);
>
> > +
> > + rsn_ie = kzalloc(255, GFP_ATOMIC);
> > + if (!rsn_ie)
> > + return start;
>

regards,
dan carpenter

2021-04-15 06:57:17

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

Hello Lee,

nitpick: You move range_ni_E_ao_ext to the header. However that header
doesn't use range_ni_E_ao_ext, so the subject is technically wrong.

On Wed, Apr 14, 2021 at 07:11:27PM +0100, Lee Jones wrote:
> ... and mark it as __maybe_unused since not all users of the
> header file reference it.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]
>
> Cc: Ian Abbott <[email protected]>
> Cc: H Hartley Sweeten <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Thierry Reding <[email protected]>
> Cc: "Uwe Kleine-König" <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: "David A. Schleef" <[email protected]>
> Cc: Mori Hess <[email protected]>
> Cc: Truxton Fulton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/staging/comedi/drivers/ni_mio_common.c | 9 ---------
> drivers/staging/comedi/drivers/ni_stc.h | 9 ++++++++-
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
> index 4f80a4991f953..37615b4e2c10d 100644
> --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> @@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x = {
> }
> };
>
> -static const struct comedi_lrange range_ni_E_ao_ext = {
> - 4, {
> - BIP_RANGE(10),
> - UNI_RANGE(10),
> - RANGE_ext(-1, 1),
> - RANGE_ext(0, 1)
> - }
> -};
> -
> static const struct comedi_lrange *const ni_range_lkup[] = {
> [ai_gain_16] = &range_ni_E_ai,
> [ai_gain_8] = &range_ni_E_ai_limited,
> diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
> index fbc0b753a0f59..0822e65f709dd 100644
> --- a/drivers/staging/comedi/drivers/ni_stc.h
> +++ b/drivers/staging/comedi/drivers/ni_stc.h
> @@ -1137,6 +1137,13 @@ struct ni_private {
> u8 rgout0_usage;
> };
>
> -static const struct comedi_lrange range_ni_E_ao_ext;
> +static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext = {
> + 4, {
> + BIP_RANGE(10),
> + UNI_RANGE(10),
> + RANGE_ext(-1, 1),
> + RANGE_ext(0, 1)
> + }
> +};

I think a downside of this solution is that range_ni_E_ao_ext might be
duplicated in the object files. (Ditto for the status quo BTW.)

I think the right approach to fix the compiler warning and the
duplication is to declare range_ni_E_ao_ext external in the header and
keep the definition in ni_mio_common.c.

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |


Attachments:
(No filename) (2.94 kB)
signature.asc (499.00 B)
Download all attachments

2021-04-15 08:11:56

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH 15/57] staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header

On Wed, Apr 14, 2021 at 07:10:47PM +0100, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> from drivers/staging/rtl8188eu/core/rtw_security.c:10:
> drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1'
> drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1'
> drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1'
> drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2'
> drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2'
> drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2'
> drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> index 9587d89a6b24e..60b724729900e 100644
> --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> @@ -1921,7 +1921,7 @@ const u8 rcons[] = {
> /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
> };
>
> -/**
> +/*
> * Expand the cipher key into the encryption key schedule.
> *
> * @return the number of rounds for the given cipher key size.
> --
> 2.27.0
>
>

Hi,

did you mean 'demote' in subject line?

thank you,

fabio

2021-04-15 08:34:00

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

On Thu, 15 Apr 2021, Dan Carpenter wrote:

> I screwed up my last email and dropped Lee and Arnd from the To: headers.
> Resending.
>
> On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote:
> > On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote:
> > > ---
> > > drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++++++++++-
> > > 1 file changed, 11 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > index c95ae4d6a3b6b..cc14f00947781 100644
> > > --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > @@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
> > > /* parsing WPA/WPA2 IE */
> > > {
> > > u8 *buf;
> > > - u8 wpa_ie[255], rsn_ie[255];
> > > + u8 *wpa_ie, *rsn_ie;
> > > u16 wpa_len = 0, rsn_len = 0;
> > > u8 *p;
> > >
> > > @@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
> > > if (!buf)
> > > return start;
>
> Arnd added this return. I think it should be -ENOMEM, though?

Will fix, thanks.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-15 08:34:58

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 15/57] staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header

On Thu, 15 Apr 2021, Fabio Aiuto wrote:

> On Wed, Apr 14, 2021 at 07:10:47PM +0100, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > from drivers/staging/rtl8188eu/core/rtw_security.c:10:
> > drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1'
> > drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1'
> > drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1'
> > drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2'
> > drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2'
> > drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2'
> > drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> >
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> > index 9587d89a6b24e..60b724729900e 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > @@ -1921,7 +1921,7 @@ const u8 rcons[] = {
> > /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
> > };
> >
> > -/**
> > +/*
> > * Expand the cipher key into the encryption key schedule.
> > *
> > * @return the number of rounds for the given cipher key size.
>
> Hi,
>
> did you mean 'demote' in subject line?

I did. Did I spell it incorrectly?

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-15 08:35:09

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

On Thu, 15 Apr 2021, Uwe Kleine-König wrote:

> Hello Lee,
>
> nitpick: You move range_ni_E_ao_ext to the header. However that header
> doesn't use range_ni_E_ao_ext, so the subject is technically wrong.

It's implicitly used by the users of the header.

But I know what you mean.

I'll see if I can make the subject line a little more clear.

> On Wed, Apr 14, 2021 at 07:11:27PM +0100, Lee Jones wrote:
> > ... and mark it as __maybe_unused since not all users of the
> > header file reference it.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]
> >
> > Cc: Ian Abbott <[email protected]>
> > Cc: H Hartley Sweeten <[email protected]>
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: Thierry Reding <[email protected]>
> > Cc: "Uwe Kleine-König" <[email protected]>
> > Cc: Lee Jones <[email protected]>
> > Cc: "David A. Schleef" <[email protected]>
> > Cc: Mori Hess <[email protected]>
> > Cc: Truxton Fulton <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/staging/comedi/drivers/ni_mio_common.c | 9 ---------
> > drivers/staging/comedi/drivers/ni_stc.h | 9 ++++++++-
> > 2 files changed, 8 insertions(+), 10 deletions(-)

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-15 08:40:37

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH 15/57] staging: rtl8723bs: core: rtw_security: Demote non-conformant kernel-doc header

On Thu, Apr 15, 2021 at 09:31:34AM +0100, Lee Jones wrote:
> On Thu, 15 Apr 2021, Fabio Aiuto wrote:
>
> > On Wed, Apr 14, 2021 at 07:10:47PM +0100, Lee Jones wrote:
> > > Fixes the following W=1 kernel build warning(s):
> > >
> > > from drivers/staging/rtl8188eu/core/rtw_security.c:10:
> > > drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'p1k' not described in 'phase1'
> > > drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'tk' not described in 'phase1'
> > > drivers/staging/rtl8188eu/core/rtw_security.c:478: warning: Function parameter or member 'ta' not described in 'phase1'
> > > drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'rc4key' not described in 'phase2'
> > > drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'tk' not described in 'phase2'
> > > drivers/staging/rtl8188eu/core/rtw_security.c:517: warning: Function parameter or member 'p1k' not described in 'phase2'
> > > drivers/staging/rtl8723bs/core/rtw_security.c:1937: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
> > >
> > > Cc: Greg Kroah-Hartman <[email protected]>
> > > Cc: [email protected]
> > > Signed-off-by: Lee Jones <[email protected]>
> > > ---
> > > drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/rtl8723bs/core/rtw_security.c b/drivers/staging/rtl8723bs/core/rtw_security.c
> > > index 9587d89a6b24e..60b724729900e 100644
> > > --- a/drivers/staging/rtl8723bs/core/rtw_security.c
> > > +++ b/drivers/staging/rtl8723bs/core/rtw_security.c
> > > @@ -1921,7 +1921,7 @@ const u8 rcons[] = {
> > > /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
> > > };
> > >
> > > -/**
> > > +/*
> > > * Expand the cipher key into the encryption key schedule.
> > > *
> > > * @return the number of rounds for the given cipher key size.
> >
> > Hi,
> >
> > did you mean 'demote' in subject line?
>
> I did. Did I spell it incorrectly?
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog

that's good, sorry for noise.

thank you,

fabio

2021-04-15 09:20:40

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH 57/57] staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'

On Wed, Apr 14, 2021 at 07:11:29PM +0100, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Fabio Aiuto <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> index f6d734dd1a24f..60d3d6d1ba678 100644
> --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> @@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> {
> u8 u1bTmp;
> u8 bMacPwrCtrlOn;
> - u8 ret = _FAIL;
>
> /* Run LPS WL RFOFF flow */
> - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
>
> /* ==== Reset digital sequence ====== */
>
> @@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> /* ==== Reset digital sequence end ====== */
>
> bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
> - ret = false;
> rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
> - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> }
>
> static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
> --
> 2.27.0
>

perhaps it's better to check the return value and return it
to the caller if something goes wrong,

https://lore.kernel.org/linux-staging/[email protected]/

thank you,

fabio

2021-04-15 09:34:25

by Ian Abbott

[permalink] [raw]
Subject: Re: [PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale'

On 14/04/2021 19:11, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/staging/comedi/drivers/jr3_pci.c: In function ‘jr3_pci_poll_subdevice’:
> drivers/staging/comedi/drivers/jr3_pci.c:507:22: warning: variable ‘min_full_scale’ set but not used [-Wunused-but-set-variable]
>
> Cc: Ian Abbott <[email protected]>
> Cc: H Hartley Sweeten <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: "Alexander A. Klimov" <[email protected]>
> Cc: Anders Blomdell <[email protected]>
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/staging/comedi/drivers/jr3_pci.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
> index 7a02c4fa3cda8..afa2f8d5c8c0c 100644
> --- a/drivers/staging/comedi/drivers/jr3_pci.c
> +++ b/drivers/staging/comedi/drivers/jr3_pci.c
> @@ -504,10 +504,9 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
> result = poll_delay_min_max(20, 100);
> } else {
> /* Set full scale */
> - struct six_axis_t min_full_scale;
> struct six_axis_t max_full_scale;
>
> - min_full_scale = get_min_full_scales(sensor);
> + get_min_full_scales(sensor);
> max_full_scale = get_max_full_scales(sensor);
> set_full_scales(sensor, max_full_scale);
>
>

get_min_full_scales() could be removed altogether. It was only being
called originally so the driver could printk the values, but those
printks have since been removed.

--
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || http://www.mev.co.uk )=-

2021-04-15 09:40:37

by Ian Abbott

[permalink] [raw]
Subject: Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

On 14/04/2021 19:11, Lee Jones wrote:
> ... and mark it as __maybe_unused since not all users of the
> header file reference it.
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]
>
> Cc: Ian Abbott <[email protected]>
> Cc: H Hartley Sweeten <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Thierry Reding <[email protected]>
> Cc: "Uwe Kleine-König" <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: "David A. Schleef" <[email protected]>
> Cc: Mori Hess <[email protected]>
> Cc: Truxton Fulton <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>
> ---
> drivers/staging/comedi/drivers/ni_mio_common.c | 9 ---------
> drivers/staging/comedi/drivers/ni_stc.h | 9 ++++++++-
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
> index 4f80a4991f953..37615b4e2c10d 100644
> --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> @@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x = {
> }
> };
>
> -static const struct comedi_lrange range_ni_E_ao_ext = {
> - 4, {
> - BIP_RANGE(10),
> - UNI_RANGE(10),
> - RANGE_ext(-1, 1),
> - RANGE_ext(0, 1)
> - }
> -};
> -
> static const struct comedi_lrange *const ni_range_lkup[] = {
> [ai_gain_16] = &range_ni_E_ai,
> [ai_gain_8] = &range_ni_E_ai_limited,
> diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
> index fbc0b753a0f59..0822e65f709dd 100644
> --- a/drivers/staging/comedi/drivers/ni_stc.h
> +++ b/drivers/staging/comedi/drivers/ni_stc.h
> @@ -1137,6 +1137,13 @@ struct ni_private {
> u8 rgout0_usage;
> };
>
> -static const struct comedi_lrange range_ni_E_ao_ext;
> +static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext = {
> + 4, {
> + BIP_RANGE(10),
> + UNI_RANGE(10),
> + RANGE_ext(-1, 1),
> + RANGE_ext(0, 1)
> + }
> +};
>
> #endif /* _COMEDI_NI_STC_H */
>

I think it is better where it is for now with its fellow struct
comedi_lrange variables, but feel free to mark it as __maybe_unused.

(Really, the #include "ni_mio_common.c" mess needs sorting out sometime.)

--
-=( Ian Abbott <[email protected]> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || http://www.mev.co.uk )=-

2021-04-15 09:54:44

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 48/57] staging: comedi: drivers: jr3_pci: Remove set but unused variable 'min_full_scale'

On Thu, 15 Apr 2021, Ian Abbott wrote:

> On 14/04/2021 19:11, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/staging/comedi/drivers/jr3_pci.c: In function ‘jr3_pci_poll_subdevice’:
> > drivers/staging/comedi/drivers/jr3_pci.c:507:22: warning: variable ‘min_full_scale’ set but not used [-Wunused-but-set-variable]
> >
> > Cc: Ian Abbott <[email protected]>
> > Cc: H Hartley Sweeten <[email protected]>
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: "Alexander A. Klimov" <[email protected]>
> > Cc: Anders Blomdell <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/staging/comedi/drivers/jr3_pci.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
> > index 7a02c4fa3cda8..afa2f8d5c8c0c 100644
> > --- a/drivers/staging/comedi/drivers/jr3_pci.c
> > +++ b/drivers/staging/comedi/drivers/jr3_pci.c
> > @@ -504,10 +504,9 @@ jr3_pci_poll_subdevice(struct comedi_subdevice *s)
> > result = poll_delay_min_max(20, 100);
> > } else {
> > /* Set full scale */
> > - struct six_axis_t min_full_scale;
> > struct six_axis_t max_full_scale;
> > - min_full_scale = get_min_full_scales(sensor);
> > + get_min_full_scales(sensor);
> > max_full_scale = get_max_full_scales(sensor);
> > set_full_scales(sensor, max_full_scale);
> >
>
> get_min_full_scales() could be removed altogether. It was only being called
> originally so the driver could printk the values, but those printks have
> since been removed.

Even better. Thanks Ian.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-15 09:55:16

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 57/57] staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'

On Thu, 15 Apr 2021, Fabio Aiuto wrote:

> On Wed, Apr 14, 2021 at 07:11:29PM +0100, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function ‘CardDisableRTL8723BSdio’:
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c:881:5: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
> >
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: Fabio Aiuto <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > index f6d734dd1a24f..60d3d6d1ba678 100644
> > --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
> > @@ -878,10 +878,9 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> > {
> > u8 u1bTmp;
> > u8 bMacPwrCtrlOn;
> > - u8 ret = _FAIL;
> >
> > /* Run LPS WL RFOFF flow */
> > - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> > + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);
> >
> > /* ==== Reset digital sequence ====== */
> >
> > @@ -909,9 +908,8 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
> > /* ==== Reset digital sequence end ====== */
> >
> > bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
> > - ret = false;
> > rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
> > - ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> > + HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
> > }
> >
> > static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
>
> perhaps it's better to check the return value and return it
> to the caller if something goes wrong,

No problem. Will fix.

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-15 09:55:50

by Lee Jones

[permalink] [raw]
Subject: Re: [PATCH 55/57] staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to where it is used

On Thu, 15 Apr 2021, Ian Abbott wrote:

> On 14/04/2021 19:11, Lee Jones wrote:
> > ... and mark it as __maybe_unused since not all users of the
> > header file reference it.
> >
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/staging/comedi/drivers/ni_mio_common.c:163:35: warning: ‘range_ni_E_ao_ext’ defined but not used [-Wunused-const-variable=]
> >
> > Cc: Ian Abbott <[email protected]>
> > Cc: H Hartley Sweeten <[email protected]>
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: Thierry Reding <[email protected]>
> > Cc: "Uwe Kleine-König" <[email protected]>
> > Cc: Lee Jones <[email protected]>
> > Cc: "David A. Schleef" <[email protected]>
> > Cc: Mori Hess <[email protected]>
> > Cc: Truxton Fulton <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Signed-off-by: Lee Jones <[email protected]>
> > ---
> > drivers/staging/comedi/drivers/ni_mio_common.c | 9 ---------
> > drivers/staging/comedi/drivers/ni_stc.h | 9 ++++++++-
> > 2 files changed, 8 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
> > index 4f80a4991f953..37615b4e2c10d 100644
> > --- a/drivers/staging/comedi/drivers/ni_mio_common.c
> > +++ b/drivers/staging/comedi/drivers/ni_mio_common.c
> > @@ -160,15 +160,6 @@ static const struct comedi_lrange range_ni_M_ai_628x = {
> > }
> > };
> > -static const struct comedi_lrange range_ni_E_ao_ext = {
> > - 4, {
> > - BIP_RANGE(10),
> > - UNI_RANGE(10),
> > - RANGE_ext(-1, 1),
> > - RANGE_ext(0, 1)
> > - }
> > -};
> > -
> > static const struct comedi_lrange *const ni_range_lkup[] = {
> > [ai_gain_16] = &range_ni_E_ai,
> > [ai_gain_8] = &range_ni_E_ai_limited,
> > diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
> > index fbc0b753a0f59..0822e65f709dd 100644
> > --- a/drivers/staging/comedi/drivers/ni_stc.h
> > +++ b/drivers/staging/comedi/drivers/ni_stc.h
> > @@ -1137,6 +1137,13 @@ struct ni_private {
> > u8 rgout0_usage;
> > };
> > -static const struct comedi_lrange range_ni_E_ao_ext;
> > +static const struct comedi_lrange __maybe_unused range_ni_E_ao_ext = {
> > + 4, {
> > + BIP_RANGE(10),
> > + UNI_RANGE(10),
> > + RANGE_ext(-1, 1),
> > + RANGE_ext(0, 1)
> > + }
> > +};
> > #endif /* _COMEDI_NI_STC_H */
> >
>
> I think it is better where it is for now with its fellow struct
> comedi_lrange variables, but feel free to mark it as __maybe_unused.

Can do. Will fix.

> (Really, the #include "ni_mio_common.c" mess needs sorting out sometime.)

--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

2021-04-16 07:30:38

by Fabio Aiuto

[permalink] [raw]
Subject: Re: [PATCH 00/57] Rid W=1 warnings from Staging

On Wed, Apr 14, 2021 at 07:10:32PM +0100, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
>
> Lee Jones (57):
> staging: r8192U_core: Remove two unused variables 'ret' and
> 'reset_status'
> staging: android: ashmem: Supply description for 'new_range'
> staging: comedi_8254: Fix descriptions for 'i8254' and 'iobase'
> staging: r8192U_core: Do not use kernel-doc formatting for !kernel-doc
> headers
> staging: r819xU_phy: Remove some local variables from the stack
> staging: r819xU_cmdpkt: Remove functionless method
> 'cmpk_handle_query_config_rx'
> staging: wlan-ng: cfg80211: Move large struct onto the heap
> staging: rtw_ioctl_set: Move 'channel_table' to the only place it's
> used
> staging: rtl8188eu: core: rtw_ieee80211: Fix incorrectly documented
> function
> staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables
> staging: rtl8723bs: core: rtw_mlme_ext: Deal with a bunch of unused
> variables
> staging: rtl8712: rtl871x_mp_ioctl: Remove a bunch of unused tables
> staging: rtl8723bs: core: rtw_recv: Mark debug variable as
> __maybe_unused
> staging: rtl8188eu: core: rtw_security: Fix some formatting and
> misdocumentation
> staging: rtl8723bs: core: rtw_security: Demote non-conformant
> kernel-doc header
> staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta'
> staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly
> staging: octeon: ethernet-tx: Fix formatting issue in function header
> staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable
> 'start_seq'
> staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the
> heap
> staging: iio: frequency: ad9834: Provide missing description for
> 'devid'
> staging: nvec: Fix a bunch of kernel-doc issues
> staging: ks7010: ks_hostif: Remove a bunch of unused variables
> staging: fwserial: Demote a whole host of kernel-doc abuses
> staging: sm750fb: sm750_accel: Provide description for 'accel' and fix
> function naming
> staging: most: net: Fix some kernel-doc formatting issues
> staging: vt6655: upc: Suppress set but not used warning in macro
> staging: rtl8192u: ieee80211_softmac: Move a large data struct onto
> the heap
> staging: most: dim2: Provide missing descriptions and fix doc-rot
> staging: rtl8723bs: core: rtw_ieee80211: Remove seemingly pointless
> copy
> staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is
> set
> staging: rtl8723bs: core: rtw_mlme_ext: 'evt_seq' is only used if
> CHECK_EVENT_SEQ is set
> staging: most: i2c: Fix a little doc-rot
> staging: most: dim2: hal: Fix one kernel-doc header and demote two
> non-conforming ones
> staging: most: dim2: hal: Demote non-conformant kernel-doc headers
> staging: axis-fifo: axis-fifo: Fix some formatting issues
> staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers
> into the heap
> staging: fbtft: fb_ili9320: Remove unused variable 'ret'
> staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named
> function
> staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and
> dead code
> staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc
> headers
> staging: rtl8188eu: os_dep: rtw_android: Demote kernel-doc abuse
> staging: rtl8723bs: hal: rtl8723b_hal_init: Remove unused variable and
> dead code
> staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed
> functions
> staging: rtl8723bs: hal: sdio_halinit: 'start' is only used if debug
> is enabled
> staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused
> and remove another
> staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug
> is enabled
> staging: comedi: drivers: jr3_pci: Remove set but unused variable
> 'min_full_scale'
> staging: comedi: drivers: ni_tio: Fix slightly broken kernel-doc and
> demote others
> staging: comedi: drivers: ni_routes: Demote non-conforming kernel-doc
> headers
> staging: axis-fifo: axis-fifo: Fix function naming in the
> documentation
> staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable
> 'func_start'
> staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer
> onto the heap
> staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug
> variables as __maybe_unused
> staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to
> where it is used
> staging: comedi: drivers: comedi_isadma: Fix misspelling of
> 'dma_chan1'
> staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'
>
> drivers/staging/android/ashmem.c | 1 +
> drivers/staging/axis-fifo/axis-fifo.c | 18 +--
> drivers/staging/comedi/drivers/comedi_8254.c | 3 +-
> .../staging/comedi/drivers/comedi_isadma.c | 2 +-
> drivers/staging/comedi/drivers/jr3_pci.c | 3 +-
> .../staging/comedi/drivers/ni_mio_common.c | 9 --
> drivers/staging/comedi/drivers/ni_routes.c | 6 +-
> drivers/staging/comedi/drivers/ni_stc.h | 9 +-
> drivers/staging/comedi/drivers/ni_tio.c | 12 +-
> drivers/staging/fbtft/fb_ili9320.c | 3 +-
> drivers/staging/fwserial/fwserial.c | 46 +++----
> drivers/staging/iio/frequency/ad9834.c | 5 +-
> drivers/staging/ks7010/ks_hostif.c | 14 +-
> drivers/staging/most/dim2/dim2.c | 23 ++--
> drivers/staging/most/dim2/hal.c | 10 +-
> drivers/staging/most/i2c/i2c.c | 12 +-
> drivers/staging/most/net/net.c | 6 +-
> drivers/staging/nvec/nvec.c | 7 +-
> drivers/staging/octeon/ethernet-tx.c | 1 -
> drivers/staging/qlge/qlge_main.c | 4 +-
> .../staging/rtl8188eu/core/rtw_ieee80211.c | 2 +-
> .../staging/rtl8188eu/core/rtw_ioctl_set.c | 8 ++
> drivers/staging/rtl8188eu/core/rtw_security.c | 10 +-
> .../staging/rtl8188eu/include/rtw_mlme_ext.h | 8 --
> .../staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +-
> drivers/staging/rtl8188eu/os_dep/mon.c | 6 +-
> .../staging/rtl8188eu/os_dep/rtw_android.c | 2 +-
> .../rtl8192u/ieee80211/ieee80211_softmac.c | 9 +-
> drivers/staging/rtl8192u/r8192U_core.c | 11 +-
> drivers/staging/rtl8192u/r819xU_cmdpkt.c | 41 ------
> drivers/staging/rtl8192u/r819xU_phy.c | 48 +++++--
> drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 29 ++--
> drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 127 ------------------
> .../staging/rtl8723bs/core/rtw_ieee80211.c | 6 +-
> drivers/staging/rtl8723bs/core/rtw_mlme.c | 17 +--
> drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 19 +--
> drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
> drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 10 +-
> .../staging/rtl8723bs/core/rtw_wlan_util.c | 4 +-
> .../staging/rtl8723bs/hal/odm_NoiseMonitor.c | 9 +-
> .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 +--
> .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 10 +-
> drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 +-
> drivers/staging/rtl8723bs/hal/sdio_ops.c | 7 +-
> .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
> drivers/staging/sm750fb/sm750_accel.c | 4 +-
> drivers/staging/vt6655/upc.h | 2 +-
> drivers/staging/wlan-ng/cfg80211.c | 30 +++--
> 49 files changed, 256 insertions(+), 404 deletions(-)
>
> Cc: [email protected]
> Cc: "Alexander A. Klimov" <[email protected]>
> Cc: Allen Pais <[email protected]>
> Cc: Anders Blomdell <[email protected]>
> Cc: Andrea Merello <[email protected]>
> Cc: Andres Klode <[email protected]>
> Cc: Andrey Shvetsov <[email protected]>
> Cc: "Arve Hjønnevåg" <[email protected]>
> Cc: Christian Brauner <[email protected]>
> Cc: Comedi <[email protected]>
> Cc: "David A. Schleef" <[email protected]>
> Cc: [email protected]
> Cc: Fabio Aiuto <[email protected]>
> Cc: Florian Schilhabel <[email protected]>
> Cc: Forest Bond <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> Cc: H Hartley Sweeten <[email protected]>
> Cc: Hridya Valsaraju <[email protected]>
> Cc: Ian Abbott <[email protected]>
> Cc: Ilya Petrov <[email protected]>
> Cc: Jacob Feder <[email protected]>
> Cc: Jerry chuang <[email protected]>
> Cc: Joel Fernandes <[email protected]>
> Cc: "John B. Wyatt IV" <[email protected]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: "J.P. Mellor" <[email protected]>
> Cc: karthik alapati <[email protected]>
> Cc: Kees Cook <[email protected]>
> Cc: Kernel Team <[email protected]>
> Cc: [email protected]
> Cc: Larry Finger <[email protected]>
> Cc: Lars-Peter Clausen <[email protected]>
> Cc: Lee Jones <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: Marc Dietrich <[email protected]>
> Cc: Marco Cesati <[email protected]>
> Cc: Martijn Coenen <[email protected]>
> Cc: Michael Hennerich <[email protected]>
> Cc: Michael Straube <[email protected]>
> Cc: Mori Hess <[email protected]>
> Cc: "Nícolas F. R. A. Prado" <[email protected]>
> Cc: Peter Hurley <[email protected]>
> Cc: Philipp Zabel <[email protected]>
> Cc: Pierre-Hugues Husson <[email protected]>
> Cc: Robert Love <[email protected]>
> Cc: Romain Perier <[email protected]>
> Cc: Ross Schmidt <[email protected]>
> Cc: "Spencer E. Olson" <[email protected]>
> Cc: [email protected]
> Cc: Sudip Mukherjee <[email protected]>
> Cc: Sumera Priyadarsini <[email protected]>
> Cc: Suren Baghdasaryan <[email protected]>
> Cc: Teddy Wang <[email protected]>
> Cc: Thierry Reding <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Todd Kjos <[email protected]>
> Cc: Truxton Fulton <[email protected]>
> Cc: "Uwe Kleine-König" <[email protected]>
> Cc: [email protected]
> Cc: WLAN FAE <[email protected]>
> Cc: Zhansaya Bagdauletkyzy <[email protected]>
> --
> 2.27.0
>

Hi,

what about splitting this series in smaller per driver series?

thank you,

fabio

2021-04-16 07:34:35

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 00/57] Rid W=1 warnings from Staging

On Fri, Apr 16, 2021 at 09:27:51AM +0200, Fabio Aiuto wrote:
> On Wed, Apr 14, 2021 at 07:10:32PM +0100, Lee Jones wrote:
> > This set is part of a larger effort attempting to clean-up W=1
> > kernel builds, which are currently overwhelmingly riddled with
> > niggly little warnings.
> >
> > Lee Jones (57):
> > staging: r8192U_core: Remove two unused variables 'ret' and
> > 'reset_status'
> > staging: android: ashmem: Supply description for 'new_range'
> > staging: comedi_8254: Fix descriptions for 'i8254' and 'iobase'
> > staging: r8192U_core: Do not use kernel-doc formatting for !kernel-doc
> > headers
> > staging: r819xU_phy: Remove some local variables from the stack
> > staging: r819xU_cmdpkt: Remove functionless method
> > 'cmpk_handle_query_config_rx'
> > staging: wlan-ng: cfg80211: Move large struct onto the heap
> > staging: rtw_ioctl_set: Move 'channel_table' to the only place it's
> > used
> > staging: rtl8188eu: core: rtw_ieee80211: Fix incorrectly documented
> > function
> > staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables
> > staging: rtl8723bs: core: rtw_mlme_ext: Deal with a bunch of unused
> > variables
> > staging: rtl8712: rtl871x_mp_ioctl: Remove a bunch of unused tables
> > staging: rtl8723bs: core: rtw_recv: Mark debug variable as
> > __maybe_unused
> > staging: rtl8188eu: core: rtw_security: Fix some formatting and
> > misdocumentation
> > staging: rtl8723bs: core: rtw_security: Demote non-conformant
> > kernel-doc header
> > staging: rtl8723bs: core: rtw_sta_mgt: Remove unused variable 'psta'
> > staging: rtl8723bs: core: rtw_sta_mgt: Return error value directly
> > staging: octeon: ethernet-tx: Fix formatting issue in function header
> > staging: rtl8723bs: core: rtw_wlan_util: Remove unused variable
> > 'start_seq'
> > staging: rtl8712: rtl871x_mp_ioctl: Move a large data struct onto the
> > heap
> > staging: iio: frequency: ad9834: Provide missing description for
> > 'devid'
> > staging: nvec: Fix a bunch of kernel-doc issues
> > staging: ks7010: ks_hostif: Remove a bunch of unused variables
> > staging: fwserial: Demote a whole host of kernel-doc abuses
> > staging: sm750fb: sm750_accel: Provide description for 'accel' and fix
> > function naming
> > staging: most: net: Fix some kernel-doc formatting issues
> > staging: vt6655: upc: Suppress set but not used warning in macro
> > staging: rtl8192u: ieee80211_softmac: Move a large data struct onto
> > the heap
> > staging: most: dim2: Provide missing descriptions and fix doc-rot
> > staging: rtl8723bs: core: rtw_ieee80211: Remove seemingly pointless
> > copy
> > staging: rtl8723bs: core: rtw_mlme: 'retry' is only used if REJOIN is
> > set
> > staging: rtl8723bs: core: rtw_mlme_ext: 'evt_seq' is only used if
> > CHECK_EVENT_SEQ is set
> > staging: most: i2c: Fix a little doc-rot
> > staging: most: dim2: hal: Fix one kernel-doc header and demote two
> > non-conforming ones
> > staging: most: dim2: hal: Demote non-conformant kernel-doc headers
> > staging: axis-fifo: axis-fifo: Fix some formatting issues
> > staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers
> > into the heap
> > staging: fbtft: fb_ili9320: Remove unused variable 'ret'
> > staging: rtl8723bs: core: rtw_ieee80211: Fix incorrectly named
> > function
> > staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable and
> > dead code
> > staging: rtl8188eu: os_dep: mon: Demote non-conforming kernel-doc
> > headers
> > staging: rtl8188eu: os_dep: rtw_android: Demote kernel-doc abuse
> > staging: rtl8723bs: hal: rtl8723b_hal_init: Remove unused variable and
> > dead code
> > staging: rtl8723bs: hal: rtl8723b_phycfg: Fix a bunch of misnamed
> > functions
> > staging: rtl8723bs: hal: sdio_halinit: 'start' is only used if debug
> > is enabled
> > staging: rtl8723bs: hal: sdio_ops: Mark used 'err' as __maybe_unused
> > and remove another
> > staging: rtl8723bs: os_dep: ioctl_cfg80211: 'ack' is used when debug
> > is enabled
> > staging: comedi: drivers: jr3_pci: Remove set but unused variable
> > 'min_full_scale'
> > staging: comedi: drivers: ni_tio: Fix slightly broken kernel-doc and
> > demote others
> > staging: comedi: drivers: ni_routes: Demote non-conforming kernel-doc
> > headers
> > staging: axis-fifo: axis-fifo: Fix function naming in the
> > documentation
> > staging: rtl8723bs: hal: odm_NoiseMonitor: Remove unused variable
> > 'func_start'
> > staging: rtl8723bs: core: rtw_mlme_ext: Move very large data buffer
> > onto the heap
> > staging: rtl8723bs: hal: rtl8723b_hal_init: Mark a bunch of debug
> > variables as __maybe_unused
> > staging: comedi: drivers: ni_mio_common: Move 'range_ni_E_ao_ext' to
> > where it is used
> > staging: comedi: drivers: comedi_isadma: Fix misspelling of
> > 'dma_chan1'
> > staging: rtl8723bs: hal: sdio_halinit: Remove unused variable 'ret'
> >
> > drivers/staging/android/ashmem.c | 1 +
> > drivers/staging/axis-fifo/axis-fifo.c | 18 +--
> > drivers/staging/comedi/drivers/comedi_8254.c | 3 +-
> > .../staging/comedi/drivers/comedi_isadma.c | 2 +-
> > drivers/staging/comedi/drivers/jr3_pci.c | 3 +-
> > .../staging/comedi/drivers/ni_mio_common.c | 9 --
> > drivers/staging/comedi/drivers/ni_routes.c | 6 +-
> > drivers/staging/comedi/drivers/ni_stc.h | 9 +-
> > drivers/staging/comedi/drivers/ni_tio.c | 12 +-
> > drivers/staging/fbtft/fb_ili9320.c | 3 +-
> > drivers/staging/fwserial/fwserial.c | 46 +++----
> > drivers/staging/iio/frequency/ad9834.c | 5 +-
> > drivers/staging/ks7010/ks_hostif.c | 14 +-
> > drivers/staging/most/dim2/dim2.c | 23 ++--
> > drivers/staging/most/dim2/hal.c | 10 +-
> > drivers/staging/most/i2c/i2c.c | 12 +-
> > drivers/staging/most/net/net.c | 6 +-
> > drivers/staging/nvec/nvec.c | 7 +-
> > drivers/staging/octeon/ethernet-tx.c | 1 -
> > drivers/staging/qlge/qlge_main.c | 4 +-
> > .../staging/rtl8188eu/core/rtw_ieee80211.c | 2 +-
> > .../staging/rtl8188eu/core/rtw_ioctl_set.c | 8 ++
> > drivers/staging/rtl8188eu/core/rtw_security.c | 10 +-
> > .../staging/rtl8188eu/include/rtw_mlme_ext.h | 8 --
> > .../staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +-
> > drivers/staging/rtl8188eu/os_dep/mon.c | 6 +-
> > .../staging/rtl8188eu/os_dep/rtw_android.c | 2 +-
> > .../rtl8192u/ieee80211/ieee80211_softmac.c | 9 +-
> > drivers/staging/rtl8192u/r8192U_core.c | 11 +-
> > drivers/staging/rtl8192u/r819xU_cmdpkt.c | 41 ------
> > drivers/staging/rtl8192u/r819xU_phy.c | 48 +++++--
> > drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 29 ++--
> > drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 127 ------------------
> > .../staging/rtl8723bs/core/rtw_ieee80211.c | 6 +-
> > drivers/staging/rtl8723bs/core/rtw_mlme.c | 17 +--
> > drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 19 +--
> > drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
> > drivers/staging/rtl8723bs/core/rtw_security.c | 2 +-
> > drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 10 +-
> > .../staging/rtl8723bs/core/rtw_wlan_util.c | 4 +-
> > .../staging/rtl8723bs/hal/odm_NoiseMonitor.c | 9 +-
> > .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 21 +--
> > .../staging/rtl8723bs/hal/rtl8723b_phycfg.c | 10 +-
> > drivers/staging/rtl8723bs/hal/sdio_halinit.c | 8 +-
> > drivers/staging/rtl8723bs/hal/sdio_ops.c | 7 +-
> > .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2 +-
> > drivers/staging/sm750fb/sm750_accel.c | 4 +-
> > drivers/staging/vt6655/upc.h | 2 +-
> > drivers/staging/wlan-ng/cfg80211.c | 30 +++--
> > 49 files changed, 256 insertions(+), 404 deletions(-)
> >
> > Cc: [email protected]
> > Cc: "Alexander A. Klimov" <[email protected]>
> > Cc: Allen Pais <[email protected]>
> > Cc: Anders Blomdell <[email protected]>
> > Cc: Andrea Merello <[email protected]>
> > Cc: Andres Klode <[email protected]>
> > Cc: Andrey Shvetsov <[email protected]>
> > Cc: "Arve Hj?nnev?g" <[email protected]>
> > Cc: Christian Brauner <[email protected]>
> > Cc: Comedi <[email protected]>
> > Cc: "David A. Schleef" <[email protected]>
> > Cc: [email protected]
> > Cc: Fabio Aiuto <[email protected]>
> > Cc: Florian Schilhabel <[email protected]>
> > Cc: Forest Bond <[email protected]>
> > Cc: Greg Kroah-Hartman <[email protected]>
> > Cc: [email protected]
> > Cc: H Hartley Sweeten <[email protected]>
> > Cc: Hridya Valsaraju <[email protected]>
> > Cc: Ian Abbott <[email protected]>
> > Cc: Ilya Petrov <[email protected]>
> > Cc: Jacob Feder <[email protected]>
> > Cc: Jerry chuang <[email protected]>
> > Cc: Joel Fernandes <[email protected]>
> > Cc: "John B. Wyatt IV" <[email protected]>
> > Cc: Jonathan Cameron <[email protected]>
> > Cc: "J.P. Mellor" <[email protected]>
> > Cc: karthik alapati <[email protected]>
> > Cc: Kees Cook <[email protected]>
> > Cc: Kernel Team <[email protected]>
> > Cc: [email protected]
> > Cc: Larry Finger <[email protected]>
> > Cc: Lars-Peter Clausen <[email protected]>
> > Cc: Lee Jones <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: Marc Dietrich <[email protected]>
> > Cc: Marco Cesati <[email protected]>
> > Cc: Martijn Coenen <[email protected]>
> > Cc: Michael Hennerich <[email protected]>
> > Cc: Michael Straube <[email protected]>
> > Cc: Mori Hess <[email protected]>
> > Cc: "N?colas F. R. A. Prado" <[email protected]>
> > Cc: Peter Hurley <[email protected]>
> > Cc: Philipp Zabel <[email protected]>
> > Cc: Pierre-Hugues Husson <[email protected]>
> > Cc: Robert Love <[email protected]>
> > Cc: Romain Perier <[email protected]>
> > Cc: Ross Schmidt <[email protected]>
> > Cc: "Spencer E. Olson" <[email protected]>
> > Cc: [email protected]
> > Cc: Sudip Mukherjee <[email protected]>
> > Cc: Sumera Priyadarsini <[email protected]>
> > Cc: Suren Baghdasaryan <[email protected]>
> > Cc: Teddy Wang <[email protected]>
> > Cc: Thierry Reding <[email protected]>
> > Cc: Thomas Gleixner <[email protected]>
> > Cc: Todd Kjos <[email protected]>
> > Cc: Truxton Fulton <[email protected]>
> > Cc: "Uwe Kleine-K?nig" <[email protected]>
> > Cc: [email protected]
> > Cc: WLAN FAE <[email protected]>
> > Cc: Zhansaya Bagdauletkyzy <[email protected]>
> > --
> > 2.27.0
> >
>
> Hi,
>
> what about splitting this series in smaller per driver series?

No real need to, I can handle patch series this big easily.

thanks,

greg k-h

2021-04-16 20:41:42

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH 21/57] staging: iio: frequency: ad9834: Provide missing description for 'devid'

On Wed, 14 Apr 2021 19:10:53 +0100
Lee Jones <[email protected]> wrote:

> Also demote kernel-doc abuses
>
> Fixes the following W=1 kernel build warning(s):
>
> drivers/staging/iio/frequency/ad9834.c:87: warning: Function parameter or member 'devid' not described in 'ad9834_state'
> drivers/staging/iio/frequency/ad9834.c:93: warning: cannot understand function prototype: 'enum ad9834_supported_device_ids '
> drivers/staging/iio/frequency/ad9834.c:320: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
>
> Cc: Lars-Peter Clausen <[email protected]>
> Cc: Michael Hennerich <[email protected]>
> Cc: Jonathan Cameron <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Lee Jones <[email protected]>

I was leaving the staging stuff in IIO related to W=1 as good material
for newbies, but I guess if you are blanket cleaning it up then fair
enough.

Sounds like Greg will take the whole series so,

Acked-by: Jonathan Cameron <[email protected]>

> ---
> drivers/staging/iio/frequency/ad9834.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
> index 60a3ae5587b90..94b131ef8a22c 100644
> --- a/drivers/staging/iio/frequency/ad9834.c
> +++ b/drivers/staging/iio/frequency/ad9834.c
> @@ -58,6 +58,7 @@
> * @spi: spi_device
> * @mclk: external master clock
> * @control: cached control word
> + * @devid: device id
> * @xfer: default spi transfer
> * @msg: default spi message
> * @freq_xfer: tuning word spi transfer
> @@ -86,7 +87,7 @@ struct ad9834_state {
> __be16 freq_data[2];
> };
>
> -/**
> +/*
> * ad9834_supported_device_ids:
> */
>
> @@ -316,7 +317,7 @@ ssize_t ad9834_show_out1_wavetype_available(struct device *dev,
> static IIO_DEVICE_ATTR(out_altvoltage0_out1_wavetype_available, 0444,
> ad9834_show_out1_wavetype_available, NULL, 0);
>
> -/**
> +/*
> * see dds.h for further information
> */
>

2021-04-19 18:37:45

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH 37/57] staging: rtl8188eu: os_dep: ioctl_linux: Move 2 large data buffers into the heap

On Thu, Apr 15, 2021 at 7:29 AM Dan Carpenter <[email protected]> wrote:
>
> On Thu, Apr 15, 2021 at 08:20:16AM +0300, Dan Carpenter wrote:
> > On Wed, Apr 14, 2021 at 07:11:09PM +0100, Lee Jones wrote:
> > > ---
> > > drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 12 +++++++++++-
> > > 1 file changed, 11 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > index c95ae4d6a3b6b..cc14f00947781 100644
> > > --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
> > > @@ -224,7 +224,7 @@ static char *translate_scan(struct adapter *padapter,
> > > /* parsing WPA/WPA2 IE */
> > > {
> > > u8 *buf;
> > > - u8 wpa_ie[255], rsn_ie[255];
> > > + u8 *wpa_ie, *rsn_ie;
> > > u16 wpa_len = 0, rsn_len = 0;
> > > u8 *p;
> > >
> > > @@ -232,6 +232,14 @@ static char *translate_scan(struct adapter *padapter,
> > > if (!buf)
> > > return start;
>
> Arnd, added this return... I don't understand why we aren't returning
> -ENOMEM here.

I don't remember my patch, but I see that the function returns a pointer
that gets dereferenced afterwards. Changing this is probably a good idea
(the caller does return an error code), but it requires a few extra changes.

If there is a larger rework, I'd suggest using a single kzalloc to get all
three arrays at once to get simpler error handling.

Arnd

2021-04-27 09:33:40

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 00/57] Rid W=1 warnings from Staging

On Wed, Apr 14, 2021 at 07:10:32PM +0100, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
>
> Lee Jones (57):

44 of these applied to my tree, I'll keep them in my "testing" branch
for now until -rc1 comes out. Feel free to rebase your series on that
and fix up the remaining ones and resend.

Note, the comedi drivers have moved to drivers/comedi/ so those patches
need to be sent as a different series, if you still want to make those
changes based on the review comments.

thanks,

greg k-h