Linux kernel staging patches
 help / color / mirror / Atom feed
From: Hungyu Lin <dennylin0707@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH 4/4] staging: rtl8723bs: make _rtw_enqueue_cmd return 0 on success
Date: Wed, 13 May 2026 21:37:19 +0000	[thread overview]
Message-ID: <20260513213719.12246-5-dennylin0707@gmail.com> (raw)
In-Reply-To: <20260513213719.12246-4-dennylin0707@gmail.com>

Convert the private helper _rtw_enqueue_cmd() to return 0 on
success instead of the legacy _SUCCESS value.

Keep rtw_enqueue_cmd() translating the result back to the
existing return convention for now.

No functional change intended.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index b0596b52a9fd..4205f24a5a06 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -252,7 +252,7 @@ static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
 	unsigned long irqL;
 
 	if (!obj)
-		return _SUCCESS;
+		return 0;
 
 	/* spin_lock_bh(&queue->lock); */
 	spin_lock_irqsave(&queue->lock, irqL);
@@ -262,7 +262,7 @@ static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
 	/* spin_unlock_bh(&queue->lock); */
 	spin_unlock_irqrestore(&queue->lock, irqL);
 
-	return _SUCCESS;
+	return 0;
 }
 
 struct	cmd_obj	*_rtw_dequeue_cmd(struct __queue *queue)
@@ -328,10 +328,12 @@ int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
 
 	res = _rtw_enqueue_cmd(&pcmdpriv->cmd_queue, cmd_obj);
 
-	if (res == _SUCCESS)
+	if (res == 0) {
 		complete(&pcmdpriv->cmd_queue_comp);
+		return _SUCCESS;
+	}
 
-	return res;
+	return _FAIL;
 }
 
 struct	cmd_obj	*rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)
-- 
2.34.1


      reply	other threads:[~2026-05-13 21:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 21:37 [PATCH 0/4] staging: rtl8723bs: cleanup rtw_enqueue_cmd flow Hungyu Lin
2026-05-13 21:37 ` [PATCH 1/4] staging: rtl8723bs: simplify _rtw_enqueue_cmd control flow Hungyu Lin
2026-05-13 21:37   ` [PATCH 2/4] staging: rtl8723bs: make _rtw_enqueue_cmd static Hungyu Lin
2026-05-13 21:37     ` [PATCH 3/4] staging: rtl8723bs: simplify rtw_enqueue_cmd control flow Hungyu Lin
2026-05-13 21:37       ` Hungyu Lin [this message]

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=20260513213719.12246-5-dennylin0707@gmail.com \
    --to=dennylin0707@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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