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: ac100@lists.launchpad.net Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de> Cc: Allen Pais <apais@linux.microsoft.com> Cc: Anders Blomdell <anders.blomdell@control.lth.se> Cc: Andrea Merello <andrea.merello@gmail.com> Cc: Andres Klode <jak@jak-linux.org> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: "Arve Hjønnevåg" <arve@android.com> Cc: Christian Brauner <christian@brauner.io> Cc: Comedi <comedi@comedi.org> Cc: "David A. Schleef" <ds@schleef.org> Cc: dri-devel@lists.freedesktop.org Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: Forest Bond <forest@alittletooquiet.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Herman.Bruyninckx@mech.kuleuven.ac.be Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Hridya Valsaraju <hridya@google.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Ilya Petrov <ilya.muromec@gmail.com> Cc: Jacob Feder <jacobsfeder@gmail.com> Cc: Jerry chuang <wlanfae@realtek.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: "John B. Wyatt IV" <jbwyatt4@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: "J.P. Mellor" <jpmellor@rose-hulman.edu> Cc: karthik alapati <mail@karthek.com> Cc: Kees Cook <keescook@chromium.org> Cc: Kernel Team <ac100@lists.lauchpad.net> Cc: Klaas.Gadeyne@mech.kuleuven.ac.be Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Lee Jones <lee.jones@linaro.org> Cc: linux-fbdev@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-pwm@vger.kernel.org Cc: linux-staging@lists.linux.dev Cc: linux-tegra@vger.kernel.org Cc: Marc Dietrich <marvin24@gmx.de> Cc: Marco Cesati <marcocesati@gmail.com> Cc: Martijn Coenen <maco@android.com> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Michael Straube <straube.linux@gmail.com> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Pierre-Hugues Husson <phhusson@free.fr> Cc: Robert Love <rlove@google.com> Cc: Romain Perier <romain.perier@gmail.com> Cc: Ross Schmidt <ross.schm.dev@gmail.com> Cc: "Spencer E. Olson" <olsonse@umich.edu> Cc: Stanley@BB.SD3 Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Sumera Priyadarsini <sylphrenadin@gmail.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Todd Kjos <tkjos@android.com> Cc: Truxton Fulton <trux@truxton.com> Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> Cc: Wim.Meeussen@mech.kuleuven.ac.be Cc: WLAN FAE <wlanfae@realtek.com> Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> -- 2.27.0
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/r8192U_core.c: In function ‘rtl8192_hard_data_xmit’: drivers/staging/rtl8192u/r8192U_core.c:905:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Andrea Merello <andrea.merello@gmail.com> Cc: Jerry chuang <wlanfae@realtek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8192u/r8192U_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index f48186a89fa14..643769e32e433 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -902,7 +902,6 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate) { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); - int ret; unsigned long flags; struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); u8 queue_index = tcb_desc->queue_index; @@ -915,7 +914,7 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, *(struct net_device **)(skb->cb) = dev; tcb_desc->bTxEnableFwCalcDur = 1; skb_push(skb, priv->ieee80211->tx_headroom); - ret = rtl8192_tx(dev, skb); + rtl8192_tx(dev, skb); spin_unlock_irqrestore(&priv->tx_lock, flags); } @@ -2972,12 +2971,10 @@ static RESET_TYPE RxCheckStuck(struct net_device *dev) return RESET_TYPE_NORESET; } -/** +/* * This function is called by Checkforhang to check whether we should * ask OS to reset driver * - * \param pAdapter The adapter context for this miniport - * * Note:NIC with USB interface sholud not call this function because we * cannot scan descriptor to judge whether there is tx stuck. * Note: This function may be required to be rewrite for Vista OS. -- 2.27.0
Fixes the following W=1 kernel build warning(s): drivers/staging/android/ashmem.c:189: warning: Function parameter or member 'new_range' not described in 'range_alloc' Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Arve Hjønnevåg" <arve@android.com> Cc: Todd Kjos <tkjos@android.com> Cc: Martijn Coenen <maco@android.com> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Christian Brauner <christian@brauner.io> Cc: Hridya Valsaraju <hridya@google.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Robert Love <rlove@google.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/android/ashmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index d66a64e42273a..8ee4320a5dc6d 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c @@ -179,6 +179,7 @@ static inline void lru_del(struct ashmem_range *range) * @purged: Initial purge status (ASMEM_NOT_PURGED or ASHMEM_WAS_PURGED) * @start: The starting page (inclusive) * @end: The ending page (inclusive) + * @new_range: The placeholder for the new range * * This function is protected by ashmem_mutex. */ -- 2.27.0
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 <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "David A. Schleef" <ds@schleef.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Andrea Merello <andrea.merello@gmail.com> Cc: Jerry chuang <wlanfae@realtek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/r819xU_phy.c: In function ‘rtl8192_phy_SwChnlStepByStep’: drivers/staging/rtl8192u/r819xU_phy.c:1328:1: warning: the frame size of 1096 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Michael Straube <straube.linux@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8192u/r819xU_phy.c | 48 ++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8192u/r819xU_phy.c b/drivers/staging/rtl8192u/r819xU_phy.c index eef751d2b12e6..37b82553412e3 100644 --- a/drivers/staging/rtl8192u/r819xU_phy.c +++ b/drivers/staging/rtl8192u/r819xU_phy.c @@ -1185,14 +1185,32 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8 *stage, u8 *step, u32 *delay) { struct r8192_priv *priv = ieee80211_priv(dev); - struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT]; + struct sw_chnl_cmd *PreCommonCmd; u32 PreCommonCmdCnt; - struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT]; + struct sw_chnl_cmd *PostCommonCmd; u32 PostCommonCmdCnt; - struct sw_chnl_cmd RfDependCmd[MAX_RFDEPENDCMD_CNT]; + struct sw_chnl_cmd *RfDependCmd; u32 RfDependCmdCnt; struct sw_chnl_cmd *CurrentCmd = NULL; u8 e_rfpath; + bool ret; + + PreCommonCmd = kzalloc(sizeof(*PreCommonCmd) * MAX_PRECMD_CNT, GFP_KERNEL); + if (!PreCommonCmd) + return false; + + PostCommonCmd = kzalloc(sizeof(*PostCommonCmd) * MAX_POSTCMD_CNT, GFP_KERNEL); + if (!PostCommonCmd) { + kfree(PreCommonCmd); + return false; + } + + RfDependCmd = kzalloc(sizeof(*RfDependCmd) * MAX_RFDEPENDCMD_CNT, GFP_KERNEL); + if (!RfDependCmd) { + kfree(PreCommonCmd); + kfree(PostCommonCmd); + return false; + } RT_TRACE(COMP_CH, "%s() stage: %d, step: %d, channel: %d\n", __func__, *stage, *step, channel); @@ -1201,7 +1219,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, /* return true to tell upper caller function this channel * setting is finished! Or it will in while loop. */ - return true; + ret = true; + goto out; } /* FIXME: need to check whether channel is legal or not here */ @@ -1227,7 +1246,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, RT_TRACE(COMP_ERR, "illegal channel for Zebra 8225: %d\n", channel); - return true; + ret = true; + goto out; } rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++, MAX_RFDEPENDCMD_CNT, @@ -1246,7 +1266,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, RT_TRACE(COMP_ERR, "illegal channel for Zebra 8256: %d\n", channel); - return true; + ret = true; + goto out; } rtl8192_phy_SetSwChnlCmdArray(RfDependCmd, RfDependCmdCnt++, MAX_RFDEPENDCMD_CNT, @@ -1262,7 +1283,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, default: RT_TRACE(COMP_ERR, "Unknown RFChipID: %d\n", priv->rf_chip); - return true; + ret = true; + goto out; } do { @@ -1281,7 +1303,8 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, if (CurrentCmd->cmd_id == CMD_ID_END) { if ((*stage) == 2) { (*delay) = CurrentCmd->ms_delay; - return true; + ret = true; + goto out; } (*stage)++; (*step) = 0; @@ -1324,7 +1347,14 @@ static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, (*delay) = CurrentCmd->ms_delay; (*step)++; - return false; + ret = false; + +out: + kfree(PreCommonCmd); + kfree(PostCommonCmd); + kfree(RfDependCmd); + + return ret; } /****************************************************************************** -- 2.27.0
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 <gregkh@linuxfoundation.org> Cc: Michael Straube <straube.linux@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Sumera Priyadarsini <sylphrenadin@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): In file included from drivers/staging/rtl8188eu/include/drv_types.h:41, from drivers/staging/rtl8188eu/core/rtw_ap.c:12: drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=] In file included from drivers/staging/rtl8188eu/include/drv_types.h:41, from drivers/staging/rtl8188eu/core/rtw_cmd.c:10: drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=] In file included from drivers/staging/rtl8188eu/include/drv_types.h:41, from drivers/staging/rtl8188eu/include/rtw_debug.h:11, from drivers/staging/rtl8188eu/core/rtw_debug.c:9: drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=] In file included from drivers/staging/rtl8188eu/include/drv_types.h:41, from drivers/staging/rtl8188eu/core/rtw_efuse.c:10: drivers/staging/rtl8188eu/include/rtw_mlme_ext.h:177:3: warning: ‘channel_table’ defined but not used [-Wunused-const-variable=] In file included from drivers/staging/rtl8188eu/include/drv_types.h:41, Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 8 ++++++++ drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index 1ef32ff900a98..c569001f6b839 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c @@ -13,6 +13,14 @@ extern void indicate_wx_scan_complete_event(struct adapter *padapter); +static const struct { + int channel_plan; + char *name; +} channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" }, + { RT_CHANNEL_DOMAIN_ETSI, "EU" }, + { RT_CHANNEL_DOMAIN_MKK, "JP" }, + { RT_CHANNEL_DOMAIN_CHINA, "CN"} }; + u8 rtw_do_join(struct adapter *padapter) { struct list_head *plist, *phead; diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h index 77eb5e3ef172b..03d55eb7dc16b 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h @@ -171,14 +171,6 @@ struct rt_channel_plan_map { unsigned char Index2G; }; -static const struct { - int channel_plan; - char *name; -} channel_table[] = { { RT_CHANNEL_DOMAIN_FCC, "US" }, - { RT_CHANNEL_DOMAIN_ETSI, "EU" }, - { RT_CHANNEL_DOMAIN_MKK, "JP" }, - { RT_CHANNEL_DOMAIN_CHINA, "CN"} }; - enum Associated_AP { atherosAP = 0, broadcomAP = 1, -- 2.27.0
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 <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Ross Schmidt <ross.schm.dev@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8712/rtl871x_mp_ioctl.h:256:34: warning: ‘oid_rtl_seg_81_85’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:249:34: warning: ‘oid_rtl_seg_81_80_80’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:240:34: warning: ‘oid_rtl_seg_81_80_40’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:205:34: warning: ‘oid_rtl_seg_81_80_20’ defined but not used [-Wunused-const-variable=] drivers/staging/rtl8712/rtl871x_mp_ioctl.h:138:34: warning: ‘oid_rtl_seg_81_80_00’ defined but not used [-Wunused-const-variable=] Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: WLAN FAE <wlanfae@realtek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8712/rtl871x_mp_ioctl.h | 127 --------------------- 1 file changed, 127 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.h b/drivers/staging/rtl8712/rtl871x_mp_ioctl.h index 59fa6664d868d..98204493a04c7 100644 --- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.h +++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.h @@ -135,135 +135,8 @@ uint oid_rt_get_power_mode_hdl( struct oid_par_priv *poid_par_priv); #ifdef _RTL871X_MP_IOCTL_C_ /* CAUTION!!! */ /* This ifdef _MUST_ be left in!! */ -static const struct oid_obj_priv oid_rtl_seg_81_80_00[] = { - /* 0x00 OID_RT_PRO_RESET_DUT */ - {1, oid_null_function}, - /* 0x01 */ - {1, oid_rt_pro_set_data_rate_hdl}, - /* 0x02 */ - {1, oid_rt_pro_start_test_hdl}, - /* 0x03 */ - {1, oid_rt_pro_stop_test_hdl}, - /* 0x04 OID_RT_PRO_SET_PREAMBLE */ - {1, oid_null_function}, - /* 0x05 OID_RT_PRO_SET_SCRAMBLER */ - {1, oid_null_function}, - /* 0x06 OID_RT_PRO_SET_FILTER_BB */ - {1, oid_null_function}, - /* 0x07 OID_RT_PRO_SET_MANUAL_DIVERS_BB */ - {1, oid_null_function}, - /* 0x08 */ - {1, oid_rt_pro_set_channel_direct_call_hdl}, - /* 0x09 OID_RT_PRO_SET_SLEEP_MODE_DIRECT_CALL */ - {1, oid_null_function}, - /* 0x0A OID_RT_PRO_SET_WAKE_MODE_DIRECT_CALL */ - {1, oid_null_function}, - /* 0x0B OID_RT_PRO_SET_TX_CONTINUOUS_DIRECT_CALL */ - {1, oid_rt_pro_set_continuous_tx_hdl}, - /* 0x0C OID_RT_PRO_SET_SINGLE_CARRIER_TX_CONTINUOUS */ - {1, oid_rt_pro_set_single_carrier_tx_hdl}, - /* 0x0D OID_RT_PRO_SET_TX_ANTENNA_BB */ - {1, oid_null_function}, - /* 0x0E */ - {1, oid_rt_pro_set_antenna_bb_hdl}, - /* 0x0F OID_RT_PRO_SET_CR_SCRAMBLER */ - {1, oid_null_function}, - /* 0x10 OID_RT_PRO_SET_CR_NEW_FILTER */ - {1, oid_null_function}, - /* 0x11 OID_RT_PRO_SET_TX_POWER_CONTROL */ - {1, oid_rt_pro_set_tx_power_control_hdl}, - /* 0x12 OID_RT_PRO_SET_CR_TX_CONFIG */ - {1, oid_null_function}, - /* 0x13 OID_RT_PRO_GET_TX_POWER_CONTROL */ - {1, oid_null_function}, - /* 0x14 OID_RT_PRO_GET_CR_SIGNAL_QUALITY */ - {1, oid_null_function}, - /* 0x15 OID_RT_PRO_SET_CR_SETPOINT */ - {1, oid_null_function}, - /* 0x16 OID_RT_PRO_SET_INTEGRATOR */ - {1, oid_null_function}, - /* 0x17 OID_RT_PRO_SET_SIGNAL_QUALITY */ - {1, oid_null_function}, - /* 0x18 OID_RT_PRO_GET_INTEGRATOR */ - {1, oid_null_function}, - /* 0x19 OID_RT_PRO_GET_SIGNAL_QUALITY */ - {1, oid_null_function}, - /* 0x1A OID_RT_PRO_QUERY_EEPROM_TYPE */ - {1, oid_null_function}, - /* 0x1B OID_RT_PRO_WRITE_MAC_ADDRESS */ - {1, oid_null_function}, - /* 0x1C OID_RT_PRO_READ_MAC_ADDRESS */ - {1, oid_null_function}, - /* 0x1D OID_RT_PRO_WRITE_CIS_DATA */ - {1, oid_null_function}, - /* 0x1E OID_RT_PRO_READ_CIS_DATA */ - {1, oid_null_function}, - /* 0x1F OID_RT_PRO_WRITE_POWER_CONTROL */ - {1, oid_null_function} -}; - -static const struct oid_obj_priv oid_rtl_seg_81_80_20[] = { - /* 0x20 OID_RT_PRO_READ_POWER_CONTROL */ - {1, oid_null_function}, - /* 0x21 OID_RT_PRO_WRITE_EEPROM */ - {1, oid_null_function}, - /* 0x22 OID_RT_PRO_READ_EEPROM */ - {1, oid_null_function}, - /* 0x23 */ - {1, oid_rt_pro_reset_tx_packet_sent_hdl}, - /* 0x24 */ - {1, oid_rt_pro_query_tx_packet_sent_hdl}, - /* 0x25 */ - {1, oid_rt_pro_reset_rx_packet_received_hdl}, - /* 0x26 */ - {1, oid_rt_pro_query_rx_packet_received_hdl}, - /* 0x27 */ - {1, oid_rt_pro_query_rx_packet_crc32_error_hdl}, - /* 0x28 OID_RT_PRO_QUERY_CURRENT_ADDRESS */ - {1, oid_null_function}, - /* 0x29 OID_RT_PRO_QUERY_PERMANENT_ADDRESS */ - {1, oid_null_function}, - /* 0x2A OID_RT_PRO_SET_PHILIPS_RF_PARAMETERS */ - {1, oid_null_function}, - /* 0x2B OID_RT_PRO_SET_CARRIER_SUPPRESSION_TX */ - {1, oid_rt_pro_set_carrier_suppression_tx_hdl}, - /* 0x2C OID_RT_PRO_RECEIVE_PACKET */ - {1, oid_null_function}, - /* 0x2D OID_RT_PRO_WRITE_EEPROM_BYTE */ - {1, oid_null_function}, - /* 0x2E OID_RT_PRO_READ_EEPROM_BYTE */ - {1, oid_null_function}, - /* 0x2F */ - {1, oid_rt_pro_set_modulation_hdl} -}; - -static const struct oid_obj_priv oid_rtl_seg_81_80_40[] = { - {1, oid_null_function}, /* 0x40 */ - {1, oid_null_function}, /* 0x41 */ - {1, oid_null_function}, /* 0x42 */ - {1, oid_rt_pro_set_single_tone_tx_hdl}, /* 0x43 */ - {1, oid_null_function}, /* 0x44 */ - {1, oid_null_function} /* 0x45 */ -}; - -static const struct oid_obj_priv oid_rtl_seg_81_80_80[] = { - {1, oid_null_function}, /* 0x80 OID_RT_DRIVER_OPTION */ - {1, oid_null_function}, /* 0x81 OID_RT_RF_OFF */ - {1, oid_null_function} /* 0x82 OID_RT_AUTH_STATUS */ - -}; - -static const struct oid_obj_priv oid_rtl_seg_81_85[] = { - /* 0x00 OID_RT_WIRELESS_MODE */ - {1, oid_rt_wireless_mode_hdl} -}; #else /* _RTL871X_MP_IOCTL_C_ */ -extern struct oid_obj_priv oid_rtl_seg_81_80_00[32]; -extern struct oid_obj_priv oid_rtl_seg_81_80_20[16]; -extern struct oid_obj_priv oid_rtl_seg_81_80_40[6]; -extern struct oid_obj_priv oid_rtl_seg_81_80_80[3]; -extern struct oid_obj_priv oid_rtl_seg_81_85[1]; extern struct oid_obj_priv oid_rtl_seg_81_87[5]; extern struct oid_obj_priv oid_rtl_seg_87_11_00[32]; extern struct oid_obj_priv oid_rtl_seg_87_11_20[5]; -- 2.27.0
Fixes the following W=1 kernel build warning(s): from drivers/staging/rtl8188eu/core/rtw_recv.c:12: drivers/staging/rtl8723bs/core/rtw_recv.c: In function ‘rtw_signal_stat_timer_hdl’: drivers/staging/rtl8723bs/core/rtw_recv.c:2341:6: warning: variable ‘num_signal_qual’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c index 668a703dee7fd..f15cd7e395211 100644 --- a/drivers/staging/rtl8723bs/core/rtw_recv.c +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c @@ -2123,7 +2123,7 @@ static void rtw_signal_stat_timer_hdl(struct timer_list *t) u8 avg_signal_strength = 0; u8 avg_signal_qual = 0; u32 num_signal_strength = 0; - u32 num_signal_qual = 0; + u32 __maybe_unused num_signal_qual = 0; u8 _alpha = 5; /* this value is based on converging_constant = 5000 and sampling_interval = 1000 */ if (adapter->recvpriv.is_signal_dbg) { -- 2.27.0
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 <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Michael Straube <straube.linux@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_sta_mgt.c: In function ‘kfree_all_stainfo’: drivers/staging/rtl8723bs/core/rtw_sta_mgt.c:128:19: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ross Schmidt <ross.schm.dev@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8723bs/core/rtw_sta_mgt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c index 85663182b388a..7b631a6b258a1 100644 --- a/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8723bs/core/rtw_sta_mgt.c @@ -119,7 +119,6 @@ void kfree_all_stainfo(struct sta_priv *pstapriv); void kfree_all_stainfo(struct sta_priv *pstapriv) { struct list_head *plist, *phead; - struct sta_info *psta = NULL; spin_lock_bh(&pstapriv->sta_hash_lock); @@ -127,7 +126,6 @@ void kfree_all_stainfo(struct sta_priv *pstapriv) plist = get_next(phead); while (phead != plist) { - psta = container_of(plist, struct sta_info, list); plist = get_next(plist); } -- 2.27.0
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 <gregkh@linuxfoundation.org> Cc: Ross Schmidt <ross.schm.dev@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): drivers/staging/octeon/ethernet-tx.c:507: warning: bad line: Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kees Cook <keescook@chromium.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/octeon/ethernet-tx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index 9c71ad5af7b98..1ad94c5060b52 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -504,7 +504,6 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev) * cvm_oct_xmit_pow - transmit a packet to the POW * @skb: Packet to send * @dev: Device info structure - * Returns Always returns zero */ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) -- 2.27.0
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_wlan_util.c: In function ‘process_addba_req’: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1774:11: warning: variable ‘start_seq’ set but not used [-Wunused-but-set-variable] from drivers/staging/rtl8188eu/core/rtw_wlan_util.c:12: Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c index c1b893451788b..3bd62567dec50 100644 --- a/drivers/staging/rtl8723bs/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723bs/core/rtw_wlan_util.c @@ -1711,7 +1711,7 @@ int update_sta_support_rate(struct adapter *padapter, u8 *pvar_ie, uint var_ie_l void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr) { struct sta_info *psta; - u16 tid, start_seq, param; + u16 tid, param; struct recv_reorder_ctrl *preorder_ctrl; struct sta_priv *pstapriv = &padapter->stapriv; struct ADDBA_request *preq = (struct ADDBA_request *)paddba_req; @@ -1721,8 +1721,6 @@ void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr) psta = rtw_get_stainfo(pstapriv, addr); if (psta) { - start_seq = le16_to_cpu(preq->BA_starting_seqctrl) >> 4; - param = le16_to_cpu(preq->BA_para_set); tid = (param>>2)&0x0f; -- 2.27.0
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8712/rtl871x_mp_ioctl.c: In function ‘mp_start_test’: drivers/staging/rtl8712/rtl871x_mp_ioctl.c:204:1: warning: the frame size of 1136 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com> Cc: Michael Straube <straube.linux@gmail.com> Cc: WLAN FAE <wlanfae@realtek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8712/rtl871x_mp_ioctl.c | 29 +++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c index 31414a960c9ed..adbeb46770d7a 100644 --- a/drivers/staging/rtl8712/rtl871x_mp_ioctl.c +++ b/drivers/staging/rtl8712/rtl871x_mp_ioctl.c @@ -149,26 +149,30 @@ static int mp_start_test(struct _adapter *padapter) struct mp_priv *pmppriv = &padapter->mppriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct wlan_network *tgt_network = &pmlmepriv->cur_network; - struct wlan_bssid_ex bssid; + struct wlan_bssid_ex *bssid; struct sta_info *psta; unsigned long length; unsigned long irqL; int res = 0; + bssid = kzalloc(sizeof(*bssid), GFP_KERNEL); + if (!bssid) + return -ENOMEM; + /* 3 1. initialize a new struct wlan_bssid_ex */ - memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); - bssid.Ssid.SsidLength = 16; - memcpy(bssid.Ssid.Ssid, (unsigned char *)"mp_pseudo_adhoc", - bssid.Ssid.SsidLength); - bssid.InfrastructureMode = Ndis802_11IBSS; - bssid.NetworkTypeInUse = Ndis802_11DS; - bssid.IELength = 0; - length = r8712_get_wlan_bssid_ex_sz(&bssid); + memcpy(bssid->MacAddress, pmppriv->network_macaddr, ETH_ALEN); + bssid->Ssid.SsidLength = 16; + memcpy(bssid->Ssid.Ssid, (unsigned char *)"mp_pseudo_adhoc", + bssid->Ssid.SsidLength); + bssid->InfrastructureMode = Ndis802_11IBSS; + bssid->NetworkTypeInUse = Ndis802_11DS; + bssid->IELength = 0; + length = r8712_get_wlan_bssid_ex_sz(bssid); if (length % 4) { /*round up to multiple of 4 bytes.*/ - bssid.Length = ((length >> 2) + 1) << 2; + bssid->Length = ((length >> 2) + 1) << 2; } else { - bssid.Length = length; + bssid->Length = length; } spin_lock_irqsave(&pmlmepriv->lock, irqL); if (check_fwstate(pmlmepriv, WIFI_MP_STATE)) @@ -185,7 +189,7 @@ static int mp_start_test(struct _adapter *padapter) tgt_network->network.MacAddress); if (psta) r8712_free_stainfo(padapter, psta); - psta = r8712_alloc_stainfo(&padapter->stapriv, bssid.MacAddress); + psta = r8712_alloc_stainfo(&padapter->stapriv, bssid->MacAddress); if (!psta) { res = -ENOMEM; goto end_of_mp_start_test; @@ -200,6 +204,7 @@ static int mp_start_test(struct _adapter *padapter) set_fwstate(pmlmepriv, _FW_LINKED); end_of_mp_start_test: spin_unlock_irqrestore(&pmlmepriv->lock, irqL); + kfree(bssid); return res; } -- 2.27.0
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 <lars@metafoo.de> Cc: Michael Hennerich <Michael.Hennerich@analog.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-iio@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): drivers/staging/nvec/nvec.c:109: warning: Function parameter or member 'events' not described in 'nvec_register_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'nb' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'event_type' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:136: warning: Function parameter or member 'data' not described in 'nvec_status_notifier' drivers/staging/nvec/nvec.c:358: warning: Function parameter or member 'ev' not described in 'nvec_event_mask' drivers/staging/nvec/nvec.c:358: warning: Function parameter or member 'mask' not described in 'nvec_event_mask' Cc: Marc Dietrich <marvin24@gmx.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Kernel Team <ac100@lists.lauchpad.net> Cc: Pierre-Hugues Husson <phhusson@free.fr> Cc: Ilya Petrov <ilya.muromec@gmail.com> Cc: Andres Klode <jak@jak-linux.org> Cc: ac100@lists.launchpad.net Cc: linux-tegra@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/nvec/nvec.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index a80996b2f5ce4..990d15c31a13d 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -99,6 +99,7 @@ static const struct mfd_cell nvec_devices[] = { * nvec_register_notifier - Register a notifier with nvec * @nvec: A &struct nvec_chip * @nb: The notifier block to register + * @events: Unused * * Registers a notifier with @nvec. The notifier will be added to an atomic * notifier chain that is called for all received messages except those that @@ -125,7 +126,7 @@ int nvec_unregister_notifier(struct nvec_chip *nvec, struct notifier_block *nb) } EXPORT_SYMBOL_GPL(nvec_unregister_notifier); -/** +/* * nvec_status_notifier - The final notifier * * Prints a message about control events not handled in the notifier @@ -343,8 +344,8 @@ static void nvec_toggle_global_events(struct nvec_chip *nvec, bool state) /** * nvec_event_mask - fill the command string with event bitfield - * ev: points to event command string - * mask: bit to insert into the event mask + * @ev: points to event command string + * @mask: bit to insert into the event mask * * Configure event command expects a 32 bit bitfield which describes * which events to enable. The bitfield has the following structure -- 2.27.0
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
Fixes the following W=1 kernel build warning(s): drivers/staging/sm750fb/sm750_accel.c:155: warning: Function parameter or member 'accel' not described in 'sm750_hw_copyarea' drivers/staging/sm750fb/sm750_accel.c:155: warning: expecting prototype for sm750_hm_copyarea(). Prototype was for sm750_hw_copyarea() instead drivers/staging/sm750fb/sm750_accel.c:321: warning: Function parameter or member 'accel' not described in 'sm750_hw_imageblit' Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/sm750fb/sm750_accel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750_accel.c b/drivers/staging/sm750fb/sm750_accel.c index 8faa601c700b2..24b9077a634a6 100644 --- a/drivers/staging/sm750fb/sm750_accel.c +++ b/drivers/staging/sm750fb/sm750_accel.c @@ -131,7 +131,8 @@ int sm750_hw_fillrect(struct lynx_accel *accel, } /** - * sm750_hm_copyarea + * sm750_hw_copyarea + * @accel: Acceleration device data * @sBase: Address of source: offset in frame buffer * @sPitch: Pitch value of source surface in BYTE * @sx: Starting x coordinate of source surface @@ -298,6 +299,7 @@ static unsigned int deGetTransparency(struct lynx_accel *accel) /** * sm750_hw_imageblit + * @accel: Acceleration device data * @pSrcbuf: pointer to start of source buffer in system memory * @srcDelta: Pitch value (in bytes) of the source buffer, +ive means top down * and -ive mean button up -- 2.27.0
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 <gregkh@linuxfoundation.org> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
The variable is used in the function using the macro. Fixes the following W=1 kernel build warning(s): drivers/staging/vt6655/upc.h:45:16: warning: variable ‘byData’ set but not used [-Wunused-but-set-variable] Cc: Forest Bond <forest@alittletooquiet.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/vt6655/upc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/upc.h b/drivers/staging/vt6655/upc.h index e086ec6e77f73..8608693ae9c3e 100644 --- a/drivers/staging/vt6655/upc.h +++ b/drivers/staging/vt6655/upc.h @@ -42,7 +42,7 @@ #define PCAvDelayByIO(uDelayUnit) \ do { \ - unsigned char byData; \ + unsigned char __maybe_unused byData; \ unsigned long ii; \ \ if (uDelayUnit <= 50) { \ -- 2.27.0
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c: In function ‘ieee80211_rx_frame_softmac’: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2009:1: warning: the frame size of 1152 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Romain Perier <romain.perier@gmail.com> Cc: Allen Pais <apais@linux.microsoft.com> Cc: Andrea Merello <andrea.merello@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index 690b664df8fae..73f63d4510e77 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -1911,8 +1911,11 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) && ieee->state == IEEE80211_ASSOCIATING_AUTHENTICATED && ieee->iw_mode == IW_MODE_INFRA) { - struct ieee80211_network network_resp; - struct ieee80211_network *network = &network_resp; + struct ieee80211_network *network; + + network = kzalloc(sizeof(*network), GFP_KERNEL); + if (!network) + return -ENOMEM; errcode = assoc_parse(ieee, skb, &aid); if (!errcode) { @@ -1923,7 +1926,6 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, /* Let the register setting defaultly with Legacy station */ if (ieee->qos_support) { assoc_resp = (struct ieee80211_assoc_response_frame *)skb->data; - memset(network, 0, sizeof(*network)); if (ieee80211_parse_info_param(ieee, assoc_resp->info_element,\ rx_stats->len - sizeof(*assoc_resp), \ network, rx_stats)) { @@ -1949,6 +1951,7 @@ ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb, else ieee80211_associate_abort(ieee); } + kfree(network); } break; -- 2.27.0
Also demote merely half-complete header. Fixes the following W=1 kernel build warning(s): drivers/staging/most/dim2/dim2.c:69: warning: Function parameter or member 'name' not described in 'hdm_channel' drivers/staging/most/dim2/dim2.c:69: warning: Function parameter or member 'reset_dbr_size' not described in 'hdm_channel' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'dev' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'name' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'clk_speed' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'clk' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'clk_pll' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'bus' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'on_netinfo' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:104: warning: Function parameter or member 'disable_platform' not described in 'dim2_hdm' drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 'most_iface' not described in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 'ch_idx' not described in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Function parameter or member 'ccfg' not described in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 'iface' description in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 'channel' description in 'configure_channel' drivers/staging/most/dim2/dim2.c:440: warning: Excess function parameter 'channel_config' description in 'configure_channel' drivers/staging/most/dim2/dim2.c:558: warning: Function parameter or member 'most_iface' not described in 'enqueue' drivers/staging/most/dim2/dim2.c:558: warning: Function parameter or member 'ch_idx' not described in 'enqueue' drivers/staging/most/dim2/dim2.c:558: warning: Excess function parameter 'iface' description in 'enqueue' drivers/staging/most/dim2/dim2.c:558: warning: Excess function parameter 'channel' description in 'enqueue' drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 'most_iface' not described in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 'ch_idx' not described in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Function parameter or member 'on_netinfo' not described in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Excess function parameter 'iface' description in 'request_netinfo' drivers/staging/most/dim2/dim2.c:591: warning: Excess function parameter 'channel_id' description in 'request_netinfo' drivers/staging/most/dim2/dim2.c:631: warning: Function parameter or member 'most_iface' not described in 'poison_channel' drivers/staging/most/dim2/dim2.c:631: warning: Function parameter or member 'ch_idx' not described in 'poison_channel' drivers/staging/most/dim2/dim2.c:631: warning: Excess function parameter 'iface' description in 'poison_channel' drivers/staging/most/dim2/dim2.c:631: warning: Excess function parameter 'channel_id' description in 'poison_channel' Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/most/dim2/dim2.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c index b34e3c130f53f..093ef9a2b2919 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -50,8 +50,10 @@ static DECLARE_TASKLET_OLD(dim2_tasklet, dim2_tasklet_fn); /** * struct hdm_channel - private structure to keep channel specific data + * @name: channel name * @is_initialized: identifier to know whether the channel is initialized * @ch: HAL specific channel data + * @reset_dbr_size: reset DBR data buffer size * @pending_list: list to keep MBO's before starting transfer * @started_list: list to keep MBO's after starting transfer * @direction: channel direction (TX or RX) @@ -68,7 +70,7 @@ struct hdm_channel { enum most_channel_data_type data_type; }; -/** +/* * struct dim2_hdm - private structure to keep interface specific data * @hch: an array of channel specific data * @most_iface: most interface structure @@ -428,9 +430,9 @@ static void complete_all_mbos(struct list_head *head) /** * configure_channel - initialize a channel - * @iface: interface the channel belongs to - * @channel: channel to be configured - * @channel_config: structure that holds the configuration information + * @most_iface: interface the channel belongs to + * @ch_idx: channel index to be configured + * @ccfg: structure that holds the configuration information * * Receives configuration information from mostcore and initialize * the corresponding channel. Return 0 on success, negative on failure. @@ -546,8 +548,8 @@ static int configure_channel(struct most_interface *most_iface, int ch_idx, /** * enqueue - 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 * * Push the buffer into pending_list and try to transfer one buffer from @@ -579,8 +581,9 @@ static int enqueue(struct most_interface *most_iface, int ch_idx, /** * request_netinfo - triggers retrieving of network info - * @iface: pointer to the interface - * @channel_id: corresponding channel ID + * @most_iface: pointer to the interface + * @ch_idx: corresponding channel ID + * @on_netinfo: call-back used to deliver network status to mostcore * * Send a command to INIC which triggers retrieving of network info by means of * "Message exchange over MDP/MEP". Return 0 on success, negative on failure. @@ -621,8 +624,8 @@ static void request_netinfo(struct most_interface *most_iface, int ch_idx, /** * poison_channel - 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 * * Destroy a channel and complete all the buffers in both started_list & * pending_list. Return 0 on success, negative on failure. -- 2.27.0
Fixes the following W=1 kernel build warning(s): drivers/staging/rtl8723bs/core/rtw_ieee80211.c: In function ‘rtw_ies_remove_ie’: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:259:1: warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c index ae057eefeeb36..d8513acf4911c 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c @@ -239,12 +239,10 @@ int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 o while (1) { target_ie = rtw_get_ie_ex(start, search_len, eid, oui, oui_len, NULL, &target_ielen); if (target_ie && target_ielen) { - u8 buf[MAX_IE_SZ] = {0}; u8 *remain_ies = target_ie + target_ielen; uint remain_len = search_len - (remain_ies - start); - memcpy(buf, remain_ies, remain_len); - memcpy(target_ie, buf, remain_len); + memcpy(target_ie, remain_ies, remain_len); *ies_len = *ies_len - target_ielen; ret = _SUCCESS; -- 2.27.0
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 <gregkh@linuxfoundation.org> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: "John B. Wyatt IV" <jbwyatt4@gmail.com> Cc: Jacob Feder <jacobsfeder@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Marco Cesati <marcocesati@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Marco Cesati <marcocesati@gmail.com> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: Stanley@BB.SD3 Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
... 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 <gregkh@linuxfoundation.org> Cc: karthik alapati <mail@karthek.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: Stanley@BB.SD3 Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
'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 <gregkh@linuxfoundation.org> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de> Cc: Anders Blomdell <anders.blomdell@control.lth.se> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: "J.P. Mellor" <jpmellor@rose-hulman.edu> Cc: Herman.Bruyninckx@mech.kuleuven.ac.be Cc: Wim.Meeussen@mech.kuleuven.ac.be Cc: Klaas.Gadeyne@mech.kuleuven.ac.be Cc: Comedi <comedi@comedi.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de> Cc: "Spencer E. Olson" <olsonse@umich.edu> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Jacob Feder <jacobsfeder@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Marco Cesati <marcocesati@gmail.com> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Marco Cesati <marcocesati@gmail.com> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: Stanley@BB.SD3 Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
... 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 <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> Cc: Lee Jones <lee.jones@linaro.org> Cc: "David A. Schleef" <ds@schleef.org> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Truxton Fulton <trux@truxton.com> Cc: linux-staging@lists.linux.dev Cc: linux-pwm@vger.kernel.org Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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 <gregkh@linuxfoundation.org> Cc: Fabio Aiuto <fabioaiuto83@gmail.com> Cc: Stanley@BB.SD3 Cc: linux-staging@lists.linux.dev Signed-off-by: Lee Jones <lee.jones@linaro.org> --- 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
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
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
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
[-- Attachment #1: Type: text/plain, Size: 3014 bytes --] 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 <abbotti@mev.co.uk> > Cc: H Hartley Sweeten <hsweeten@visionengravers.com> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: Thierry Reding <thierry.reding@gmail.com> > Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> > Cc: Lee Jones <lee.jones@linaro.org> > Cc: "David A. Schleef" <ds@schleef.org> > Cc: Mori Hess <fmhess@users.sourceforge.net> > Cc: Truxton Fulton <trux@truxton.com> > Cc: linux-staging@lists.linux.dev > Cc: linux-pwm@vger.kernel.org > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- > 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/ | [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --]
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 <gregkh@linuxfoundation.org>
> Cc: linux-staging@lists.linux.dev
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> 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
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 <gregkh@linuxfoundation.org>
> > Cc: linux-staging@lists.linux.dev
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > 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
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
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 <abbotti@mev.co.uk> > > Cc: H Hartley Sweeten <hsweeten@visionengravers.com> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Cc: Thierry Reding <thierry.reding@gmail.com> > > Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> > > Cc: Lee Jones <lee.jones@linaro.org> > > Cc: "David A. Schleef" <ds@schleef.org> > > Cc: Mori Hess <fmhess@users.sourceforge.net> > > Cc: Truxton Fulton <trux@truxton.com> > > Cc: linux-staging@lists.linux.dev > > Cc: linux-pwm@vger.kernel.org > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > --- > > 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
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 <gregkh@linuxfoundation.org>
> > > Cc: linux-staging@lists.linux.dev
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > > 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
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 <gregkh@linuxfoundation.org> > Cc: Fabio Aiuto <fabioaiuto83@gmail.com> > Cc: Stanley@BB.SD3 > Cc: linux-staging@lists.linux.dev > Signed-off-by: Lee Jones <lee.jones@linaro.org> > --- > 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/YHQVKPOoGS3auAeQ@kroah.com/ thank you, fabio
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 <abbotti@mev.co.uk>
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de>
> Cc: Anders Blomdell <anders.blomdell@control.lth.se>
> Cc: linux-staging@lists.linux.dev
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> 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 <abbotti@mev.co.uk> || 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. || www.mev.co.uk )=-
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 <abbotti@mev.co.uk>
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: "David A. Schleef" <ds@schleef.org>
> Cc: Mori Hess <fmhess@users.sourceforge.net>
> Cc: Truxton Fulton <trux@truxton.com>
> Cc: linux-staging@lists.linux.dev
> Cc: linux-pwm@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> 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 <abbotti@mev.co.uk> || 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. || www.mev.co.uk )=-
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 <abbotti@mev.co.uk>
> > Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de>
> > Cc: Anders Blomdell <anders.blomdell@control.lth.se>
> > Cc: linux-staging@lists.linux.dev
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > 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
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 <gregkh@linuxfoundation.org>
> > Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
> > Cc: Stanley@BB.SD3
> > Cc: linux-staging@lists.linux.dev
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > 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
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 <abbotti@mev.co.uk> > > Cc: H Hartley Sweeten <hsweeten@visionengravers.com> > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > > Cc: Thierry Reding <thierry.reding@gmail.com> > > Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de> > > Cc: Lee Jones <lee.jones@linaro.org> > > Cc: "David A. Schleef" <ds@schleef.org> > > Cc: Mori Hess <fmhess@users.sourceforge.net> > > Cc: Truxton Fulton <trux@truxton.com> > > Cc: linux-staging@lists.linux.dev > > Cc: linux-pwm@vger.kernel.org > > Signed-off-by: Lee Jones <lee.jones@linaro.org> > > --- > > 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
On Wed, Apr 14, 2021 at 11:11 AM Lee Jones <lee.jones@linaro.org> wrote: > > Fixes the following W=1 kernel build warning(s): > > drivers/staging/android/ashmem.c:189: warning: Function parameter or member 'new_range' not described in 'range_alloc' > > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: "Arve Hjønnevåg" <arve@android.com> > Cc: Todd Kjos <tkjos@android.com> > Cc: Martijn Coenen <maco@android.com> > Cc: Joel Fernandes <joel@joelfernandes.org> > Cc: Christian Brauner <christian@brauner.io> > Cc: Hridya Valsaraju <hridya@google.com> > Cc: Suren Baghdasaryan <surenb@google.com> > Cc: Robert Love <rlove@google.com> > Cc: linux-staging@lists.linux.dev > Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Todd Kjos <tkjos@google.com> > --- > drivers/staging/android/ashmem.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c > index d66a64e42273a..8ee4320a5dc6d 100644 > --- a/drivers/staging/android/ashmem.c > +++ b/drivers/staging/android/ashmem.c > @@ -179,6 +179,7 @@ static inline void lru_del(struct ashmem_range *range) > * @purged: Initial purge status (ASMEM_NOT_PURGED or ASHMEM_WAS_PURGED) > * @start: The starting page (inclusive) > * @end: The ending page (inclusive) > + * @new_range: The placeholder for the new range > * > * This function is protected by ashmem_mutex. > */ > -- > 2.27.0 >
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: ac100@lists.launchpad.net
> Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de>
> Cc: Allen Pais <apais@linux.microsoft.com>
> Cc: Anders Blomdell <anders.blomdell@control.lth.se>
> Cc: Andrea Merello <andrea.merello@gmail.com>
> Cc: Andres Klode <jak@jak-linux.org>
> Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
> Cc: "Arve Hjønnevåg" <arve@android.com>
> Cc: Christian Brauner <christian@brauner.io>
> Cc: Comedi <comedi@comedi.org>
> Cc: "David A. Schleef" <ds@schleef.org>
> Cc: dri-devel@lists.freedesktop.org
> Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
> Cc: Forest Bond <forest@alittletooquiet.net>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Herman.Bruyninckx@mech.kuleuven.ac.be
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Hridya Valsaraju <hridya@google.com>
> Cc: Ian Abbott <abbotti@mev.co.uk>
> Cc: Ilya Petrov <ilya.muromec@gmail.com>
> Cc: Jacob Feder <jacobsfeder@gmail.com>
> Cc: Jerry chuang <wlanfae@realtek.com>
> Cc: Joel Fernandes <joel@joelfernandes.org>
> Cc: "John B. Wyatt IV" <jbwyatt4@gmail.com>
> Cc: Jonathan Cameron <jic23@kernel.org>
> Cc: "J.P. Mellor" <jpmellor@rose-hulman.edu>
> Cc: karthik alapati <mail@karthek.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Kernel Team <ac100@lists.lauchpad.net>
> Cc: Klaas.Gadeyne@mech.kuleuven.ac.be
> Cc: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: linux-fbdev@vger.kernel.org
> Cc: linux-iio@vger.kernel.org
> Cc: linux-pwm@vger.kernel.org
> Cc: linux-staging@lists.linux.dev
> Cc: linux-tegra@vger.kernel.org
> Cc: Marc Dietrich <marvin24@gmx.de>
> Cc: Marco Cesati <marcocesati@gmail.com>
> Cc: Martijn Coenen <maco@android.com>
> Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> Cc: Michael Straube <straube.linux@gmail.com>
> Cc: Mori Hess <fmhess@users.sourceforge.net>
> Cc: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com>
> Cc: Peter Hurley <peter@hurleysoftware.com>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Pierre-Hugues Husson <phhusson@free.fr>
> Cc: Robert Love <rlove@google.com>
> Cc: Romain Perier <romain.perier@gmail.com>
> Cc: Ross Schmidt <ross.schm.dev@gmail.com>
> Cc: "Spencer E. Olson" <olsonse@umich.edu>
> Cc: Stanley@BB.SD3
> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Cc: Sumera Priyadarsini <sylphrenadin@gmail.com>
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: Teddy Wang <teddy.wang@siliconmotion.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Todd Kjos <tkjos@android.com>
> Cc: Truxton Fulton <trux@truxton.com>
> Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
> Cc: Wim.Meeussen@mech.kuleuven.ac.be
> Cc: WLAN FAE <wlanfae@realtek.com>
> Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
> --
> 2.27.0
>
Hi,
what about splitting this series in smaller per driver series?
thank you,
fabio
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: ac100@lists.launchpad.net
> > Cc: "Alexander A. Klimov" <grandmaster@al2klimov.de>
> > Cc: Allen Pais <apais@linux.microsoft.com>
> > Cc: Anders Blomdell <anders.blomdell@control.lth.se>
> > Cc: Andrea Merello <andrea.merello@gmail.com>
> > Cc: Andres Klode <jak@jak-linux.org>
> > Cc: Andrey Shvetsov <andrey.shvetsov@k2l.de>
> > Cc: "Arve Hjønnevåg" <arve@android.com>
> > Cc: Christian Brauner <christian@brauner.io>
> > Cc: Comedi <comedi@comedi.org>
> > Cc: "David A. Schleef" <ds@schleef.org>
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Fabio Aiuto <fabioaiuto83@gmail.com>
> > Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
> > Cc: Forest Bond <forest@alittletooquiet.net>
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Cc: Herman.Bruyninckx@mech.kuleuven.ac.be
> > Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> > Cc: Hridya Valsaraju <hridya@google.com>
> > Cc: Ian Abbott <abbotti@mev.co.uk>
> > Cc: Ilya Petrov <ilya.muromec@gmail.com>
> > Cc: Jacob Feder <jacobsfeder@gmail.com>
> > Cc: Jerry chuang <wlanfae@realtek.com>
> > Cc: Joel Fernandes <joel@joelfernandes.org>
> > Cc: "John B. Wyatt IV" <jbwyatt4@gmail.com>
> > Cc: Jonathan Cameron <jic23@kernel.org>
> > Cc: "J.P. Mellor" <jpmellor@rose-hulman.edu>
> > Cc: karthik alapati <mail@karthek.com>
> > Cc: Kees Cook <keescook@chromium.org>
> > Cc: Kernel Team <ac100@lists.lauchpad.net>
> > Cc: Klaas.Gadeyne@mech.kuleuven.ac.be
> > Cc: Larry Finger <Larry.Finger@lwfinger.net>
> > Cc: Lars-Peter Clausen <lars@metafoo.de>
> > Cc: Lee Jones <lee.jones@linaro.org>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: linux-iio@vger.kernel.org
> > Cc: linux-pwm@vger.kernel.org
> > Cc: linux-staging@lists.linux.dev
> > Cc: linux-tegra@vger.kernel.org
> > Cc: Marc Dietrich <marvin24@gmx.de>
> > Cc: Marco Cesati <marcocesati@gmail.com>
> > Cc: Martijn Coenen <maco@android.com>
> > Cc: Michael Hennerich <Michael.Hennerich@analog.com>
> > Cc: Michael Straube <straube.linux@gmail.com>
> > Cc: Mori Hess <fmhess@users.sourceforge.net>
> > Cc: "Nícolas F. R. A. Prado" <nfraprado@protonmail.com>
> > Cc: Peter Hurley <peter@hurleysoftware.com>
> > Cc: Philipp Zabel <p.zabel@pengutronix.de>
> > Cc: Pierre-Hugues Husson <phhusson@free.fr>
> > Cc: Robert Love <rlove@google.com>
> > Cc: Romain Perier <romain.perier@gmail.com>
> > Cc: Ross Schmidt <ross.schm.dev@gmail.com>
> > Cc: "Spencer E. Olson" <olsonse@umich.edu>
> > Cc: Stanley@BB.SD3
> > Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> > Cc: Sumera Priyadarsini <sylphrenadin@gmail.com>
> > Cc: Suren Baghdasaryan <surenb@google.com>
> > Cc: Teddy Wang <teddy.wang@siliconmotion.com>
> > Cc: Thierry Reding <thierry.reding@gmail.com>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Todd Kjos <tkjos@android.com>
> > Cc: Truxton Fulton <trux@truxton.com>
> > Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
> > Cc: Wim.Meeussen@mech.kuleuven.ac.be
> > Cc: WLAN FAE <wlanfae@realtek.com>
> > Cc: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
> > --
> > 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
On Wed, 14 Apr 2021 19:10:53 +0100 Lee Jones <lee.jones@linaro.org> 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 <lars@metafoo.de> > Cc: Michael Hennerich <Michael.Hennerich@analog.com> > Cc: Jonathan Cameron <jic23@kernel.org> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: linux-iio@vger.kernel.org > Cc: linux-staging@lists.linux.dev > Signed-off-by: Lee Jones <lee.jones@linaro.org> 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 <Jonathan.Cameron@huawei.com> > --- > 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 > */ >
On Thu, Apr 15, 2021 at 7:29 AM Dan Carpenter <dan.carpenter@oracle.com> 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
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