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@xxxxxxxxx> --- 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