From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Forest Bond <forest@alittletooquiet.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 7/9] staging: vt6655: Rename function MACbIsRegBitsOff
Date: Sun, 28 Aug 2022 08:54:18 +0200 [thread overview]
Message-ID: <79530d864d4e39e29b899b80f2e2ecf0566366dc.1661666677.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1661666677.git.philipp.g.hortmann@gmail.com>
Remove declaration of MACbIsRegBitsOff as it is not needed. Rename
function MACbIsRegBitsOff to vt6655_mac_is_reg_bits_off, rename
byRegOfs to reg_offset and byTestBits to mask to avoid CamelCase which
is not accepted by checkpatch.pl. Made function static to keep namespace
clean.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/vt6655/mac.c | 15 ++++++++-------
drivers/staging/vt6655/mac.h | 3 ---
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 742391b24afb..7363dfb04ba8 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -10,7 +10,7 @@
* Date: May 21, 1996
*
* Functions:
- * MACbIsRegBitsOff - Test if All test Bits Off
+ * vt6655_mac_is_reg_bits_off - Test if All test Bits Off
* MACbIsIntDisable - Test if MAC interrupt disable
* MACvSetShortRetryLimit - Set 802.11 Short Retry limit
* MACvSetLongRetryLimit - Set 802.11 Long Retry limit
@@ -86,20 +86,21 @@ static void vt6655_mac_clear_stck_ds(void __iomem *iobase)
* Parameters:
* In:
* io_base - Base Address for MAC
- * byRegOfs - Offset of MAC Register
- * byTestBits - Test bits
+ * reg_offset - Offset of MAC Register
+ * mask - Test bits
* Out:
* none
*
* Return Value: true if all test bits Off; otherwise false
*
*/
-bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs,
- unsigned char byTestBits)
+static bool vt6655_mac_is_reg_bits_off(struct vnt_private *priv,
+ unsigned char reg_offset,
+ unsigned char mask)
{
void __iomem *io_base = priv->port_offset;
- return !(ioread8(io_base + byRegOfs) & byTestBits);
+ return !(ioread8(io_base + reg_offset) & mask);
}
/*
@@ -767,7 +768,7 @@ bool MACbPSWakeup(struct vnt_private *priv)
void __iomem *io_base = priv->port_offset;
unsigned int ww;
/* Read PSCTL */
- if (MACbIsRegBitsOff(priv, MAC_REG_PSCTL, PSCTL_PS))
+ if (vt6655_mac_is_reg_bits_off(priv, MAC_REG_PSCTL, PSCTL_PS))
return true;
/* Disable PS */
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index 2af243b9389f..ca1211aacec2 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -549,9 +549,6 @@ void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, cons
void vt6655_mac_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask);
void vt6655_mac_word_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask);
-bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs,
- unsigned char byTestBits);
-
bool MACbIsIntDisable(struct vnt_private *priv);
void MACvSetShortRetryLimit(struct vnt_private *priv,
--
2.37.2
next prev parent reply other threads:[~2022-08-28 6:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-28 6:52 [PATCH 0/9] staging: vt6655: Improve coding style in mac.h Philipp Hortmann
2022-08-28 6:53 ` [PATCH 1/9] staging: vt6655: Remove declaration of s_vCalculateOFDMRParameter Philipp Hortmann
2022-08-28 6:53 ` [PATCH 2/9] staging: vt6655: Convert macro MACvSetBBType to function Philipp Hortmann
2022-08-28 6:53 ` [PATCH 3/9] staging: vt6655: Rename function MACvSetBBType Philipp Hortmann
2022-08-28 6:53 ` [PATCH 4/9] staging: vt6655: Rename macro MACvSelectPage0 Philipp Hortmann
2022-08-28 6:54 ` [PATCH 5/9] staging: vt6655: Rename macro MACvSelectPage1 Philipp Hortmann
2022-08-28 6:54 ` [PATCH 6/9] staging: vt6655: Replace macro MACvSetRFLE_LatchBase Philipp Hortmann
2022-08-28 6:54 ` Philipp Hortmann [this message]
2022-08-28 6:54 ` [PATCH 8/9] staging: vt6655: Delete function MACbIsIntDisable Philipp Hortmann
2022-08-28 6:54 ` [PATCH 9/9] staging: vt6655: Rename function MACvSetShortRetryLimit 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=79530d864d4e39e29b899b80f2e2ecf0566366dc.1661666677.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=forest@alittletooquiet.net \
--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
all inboxes | Powered by JetHome®