mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 2/5] staging: r8188eu: make numNQ a u8
Date: Mon,  8 Aug 2022 22:14:02 +0200	[thread overview]
Message-ID: <20220808201405.68966-3-martin@kaiser.cx> (raw)
In-Reply-To: <20220808201405.68966-1-martin@kaiser.cx>

The numNQ variable in _InitQueueReservedPage is defined as u32. It is
either set to 0 or to 0x1C. Change its type to u8 and remove the code that
casts the u32 value to u8.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/staging/r8188eu/hal/usb_halinit.c       | 7 +++----
 drivers/staging/r8188eu/include/rtl8188e_spec.h | 2 --
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/r8188eu/hal/usb_halinit.c b/drivers/staging/r8188eu/hal/usb_halinit.c
index b63f5bb21017..18465e5ce9cc 100644
--- a/drivers/staging/r8188eu/hal/usb_halinit.c
+++ b/drivers/staging/r8188eu/hal/usb_halinit.c
@@ -156,10 +156,9 @@ static void _InitQueueReservedPage(struct adapter *Adapter)
 	struct registry_priv	*pregistrypriv = &Adapter->registrypriv;
 	u32 numHQ	= 0;
 	u32 numLQ	= 0;
-	u32 numNQ	= 0;
+	u8 numNQ = 0;
 	u32 numPubQ;
 	u32 value32;
-	u8 value8;
 
 	if (pregistrypriv->wifi_spec) {
 		if (haldata->OutEpQueueSel & TX_SELE_HQ)
@@ -171,8 +170,8 @@ static void _InitQueueReservedPage(struct adapter *Adapter)
 		/*  NOTE: This step shall be proceed before writing REG_RQPN. */
 		if (haldata->OutEpQueueSel & TX_SELE_NQ)
 			numNQ = 0x1C;
-		value8 = (u8)_NPQ(numNQ);
-		rtw_write8(Adapter, REG_RQPN_NPQ, value8);
+
+		rtw_write8(Adapter, REG_RQPN_NPQ, numNQ);
 
 		numPubQ = 0xA8 - numHQ - numLQ - numNQ;
 
diff --git a/drivers/staging/r8188eu/include/rtl8188e_spec.h b/drivers/staging/r8188eu/include/rtl8188e_spec.h
index 9e7b1f89037c..d9a85fd13230 100644
--- a/drivers/staging/r8188eu/include/rtl8188e_spec.h
+++ b/drivers/staging/r8188eu/include/rtl8188e_spec.h
@@ -928,8 +928,6 @@ Current IOREG MAP
 #define _HPQ(x)				((x) & 0xFF)
 #define _LPQ(x)				(((x) & 0xFF) << 8)
 #define _PUBQ(x)			(((x) & 0xFF) << 16)
-/*  NOTE: in RQPN_NPQ register */
-#define _NPQ(x)				((x) & 0xFF)
 
 #define HPQ_PUBLIC_DIS			BIT(24)
 #define LPQ_PUBLIC_DIS			BIT(25)
-- 
2.30.2


  parent reply	other threads:[~2022-08-08 20:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 20:14 [PATCH 0/5] staging: r8188eu: clean up _InitQueueReservedPage Martin Kaiser
2022-08-08 20:14 ` [PATCH 1/5] staging: r8188eu: remove a temporary variable Martin Kaiser
2022-08-08 20:14 ` Martin Kaiser [this message]
2022-08-08 20:14 ` [PATCH 3/5] staging: r8188eu: change all num...Q variables to u8 Martin Kaiser
2022-08-08 20:14 ` [PATCH 4/5] staging: r8188eu: remove two unused defines Martin Kaiser
2022-08-08 20:14 ` [PATCH 5/5] staging: r8188eu: the high prio queue is always selected Martin Kaiser
2022-08-08 21:40 ` [PATCH 0/5] staging: r8188eu: clean up _InitQueueReservedPage 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=20220808201405.68966-3-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®