From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 13/23] staging: r8188eu: make rtw_chk_hi_queue_cmd a void function
Date: Mon, 23 Jan 2023 21:53:32 +0100 [thread overview]
Message-ID: <20230123205342.229589-14-martin@kaiser.cx> (raw)
In-Reply-To: <20230123205342.229589-1-martin@kaiser.cx>
Both callers of rtw_chk_hi_queue_cmd do not check the return value.
Convert rtw_chk_hi_queue_cmd to a void function.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_cmd.c | 16 +++++-----------
drivers/staging/r8188eu/include/rtw_cmd.h | 2 +-
2 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_cmd.c b/drivers/staging/r8188eu/core/rtw_cmd.c
index eb79435da355..d57360a68fb3 100644
--- a/drivers/staging/r8188eu/core/rtw_cmd.c
+++ b/drivers/staging/r8188eu/core/rtw_cmd.c
@@ -1197,24 +1197,20 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
}
}
-u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
+void rtw_chk_hi_queue_cmd(struct adapter *padapter)
{
struct cmd_obj *ph2c;
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
- u8 res = _SUCCESS;
ph2c = kzalloc(sizeof(*ph2c), GFP_ATOMIC);
- if (!ph2c) {
- res = _FAIL;
- goto exit;
- }
+ if (!ph2c)
+ return;
pdrvextra_cmd_parm = kzalloc(sizeof(*pdrvextra_cmd_parm), GFP_ATOMIC);
if (!pdrvextra_cmd_parm) {
kfree(ph2c);
- res = _FAIL;
- goto exit;
+ return;
}
pdrvextra_cmd_parm->ec_id = CHECK_HIQ_WK_CID;
@@ -1223,9 +1219,7 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
- res = rtw_enqueue_cmd(pcmdpriv, ph2c);
-exit:
- return res;
+ rtw_enqueue_cmd(pcmdpriv, ph2c);
}
u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)
diff --git a/drivers/staging/r8188eu/include/rtw_cmd.h b/drivers/staging/r8188eu/include/rtw_cmd.h
index 9df7d4bf441d..e8eecd52d1d8 100644
--- a/drivers/staging/r8188eu/include/rtw_cmd.h
+++ b/drivers/staging/r8188eu/include/rtw_cmd.h
@@ -743,7 +743,7 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter *padapter, u16 minRptTime);
u8 rtw_antenna_select_cmd(struct adapter *padapter, u8 antenna, u8 enqueue);
u8 rtw_ps_cmd(struct adapter *padapter);
-u8 rtw_chk_hi_queue_cmd(struct adapter *padapter);
+void rtw_chk_hi_queue_cmd(struct adapter *padapter);
u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan);
--
2.30.2
next prev parent reply other threads:[~2023-01-23 20:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 20:53 [PATCH 00/23] staging: r8188eu: some more xmit cleanups Martin Kaiser
2023-01-23 20:53 ` [PATCH 01/23] staging: r8188eu: we use a constant number of hw_xmit entries Martin Kaiser
2023-01-23 20:53 ` [PATCH 02/23] staging: r8188eu: pass struct adapter to usb_write Martin Kaiser
2023-01-23 20:53 ` [PATCH 03/23] staging: r8188eu: remove struct intf_hdl Martin Kaiser
2023-01-23 20:53 ` [PATCH 04/23] staging: r8188eu: remove struct intf_priv Martin Kaiser
2023-01-23 20:53 ` [PATCH 05/23] staging: r8188eu: simplify the sta loop in rtw_dequeue_xframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 06/23] staging: r8188eu: simplify the code to initialise inx Martin Kaiser
2023-01-23 20:53 ` [PATCH 07/23] staging: r8188eu: remove an obsolete comment Martin Kaiser
2023-01-23 20:53 ` [PATCH 08/23] staging: r8188eu: remove unused function parameter Martin Kaiser
2023-01-23 20:53 ` [PATCH 09/23] staging: r8188eu: remove dead assignment Martin Kaiser
2023-01-23 20:53 ` [PATCH 10/23] staging: r8188eu: use list_empty Martin Kaiser
2023-01-23 20:53 ` [PATCH 11/23] staging: r8188eu: simplify dequeue_one_xmitframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 12/23] staging: r8188eu: remove redundant parameter Martin Kaiser
2023-01-23 20:53 ` Martin Kaiser [this message]
2023-01-23 20:53 ` [PATCH 14/23] staging: r8188eu: decrement qcnt in rtw_dequeue_xframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 15/23] staging: r8188eu: simplify dequeue_one_xmitframe Martin Kaiser
2023-01-23 20:53 ` [PATCH 16/23] staging: r8188eu: use list_head for xmitframe list Martin Kaiser
2023-01-23 20:53 ` [PATCH 17/23] staging: r8188eu: merge dequeue_one_xmitframe into its caller Martin Kaiser
2023-01-23 20:53 ` [PATCH 18/23] staging: r8188eu: use lists for hwxmits Martin Kaiser
2023-01-23 20:53 ` [PATCH 19/23] staging: r8188eu: fix rtw_xmitframe_enqueue error handling Martin Kaiser
2023-01-23 20:53 ` [PATCH 20/23] staging: r8188eu: remove rtw_xmitframe_enqueue Martin Kaiser
2023-01-23 20:53 ` [PATCH 21/23] staging: r8188eu: struct agg_pkt_info is unused Martin Kaiser
2023-01-23 20:53 ` [PATCH 22/23] staging: r8188eu: apsd_setting " Martin Kaiser
2023-01-23 20:53 ` [PATCH 23/23] staging: r8188eu: merge rtw_free_hwxmits into its only caller Martin Kaiser
2023-01-24 19:01 ` [PATCH 00/23] staging: r8188eu: some more xmit cleanups Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230123205342.229589-14-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®