diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2022-09-11 13:45:29 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-11 14:58:44 +0300 |
commit | aef69630f2c71de6079db4b91fdf7bc100824f63 (patch) | |
tree | 37ebc036af459c3f4ae02a1a46b3787b9dbfe541 /drivers/staging/vt6655 | |
parent | 98bbc153131c7621b26a82b65a9a48a06b8013bd (diff) | |
download | linux-aef69630f2c71de6079db4b91fdf7bc100824f63.tar.xz |
staging: vt6655: Cleanup and rename function MACvSetLoopbackMode
Rename function MACvSetLoopbackMode to vt6655_mac_set_loopback_mode and
byLoopbackMode to loopback_mode to avoid CamelCase which is not accepted
by checkpatch.pl. Remove unnecessary declaration of function and made
function static. Change declaration of loopback_mode to shorten code and
remove unnecessary line break.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/02ce61620e13eb7fd24833e59a288f52bf5b9730.1662890990.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6655')
-rw-r--r-- | drivers/staging/vt6655/mac.c | 17 | ||||
-rw-r--r-- | drivers/staging/vt6655/mac.h | 2 |
2 files changed, 8 insertions, 11 deletions
diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c index d056df1220d3..567bc38ecfa9 100644 --- a/drivers/staging/vt6655/mac.c +++ b/drivers/staging/vt6655/mac.c @@ -13,7 +13,7 @@ * vt6655_mac_is_reg_bits_off - Test if All test Bits Off * vt6655_mac_set_short_retry_limit - Set 802.11 Short Retry limit * MACvSetLongRetryLimit - Set 802.11 Long Retry limit - * MACvSetLoopbackMode - Set MAC Loopback Mode + * vt6655_mac_set_loopback_mode - Set MAC Loopback Mode * MACvSaveContext - Save Context of MAC Registers * MACvRestoreContext - Restore Context of MAC Registers * MACbSoftwareReset - Software Reset MAC @@ -152,21 +152,20 @@ void MACvSetLongRetryLimit(struct vnt_private *priv, * Parameters: * In: * io_base - Base Address for MAC - * byLoopbackMode - Loopback Mode + * loopback_mode - Loopback Mode * Out: * none * * Return Value: none * */ -void MACvSetLoopbackMode(struct vnt_private *priv, unsigned char byLoopbackMode) +static void vt6655_mac_set_loopback_mode(struct vnt_private *priv, u8 loopback_mode) { void __iomem *io_base = priv->port_offset; - byLoopbackMode <<= 6; + loopback_mode <<= 6; /* set TCR */ - iowrite8((ioread8(io_base + MAC_REG_TEST) & 0x3f) | byLoopbackMode, - io_base + MAC_REG_TEST); + iowrite8((ioread8(io_base + MAC_REG_TEST) & 0x3f) | loopback_mode, io_base + MAC_REG_TEST); } /* @@ -476,13 +475,13 @@ bool MACbShutdown(struct vnt_private *priv) void __iomem *io_base = priv->port_offset; /* disable MAC IMR */ iowrite32(0, io_base + MAC_REG_IMR); - MACvSetLoopbackMode(priv, MAC_LB_INTERNAL); + vt6655_mac_set_loopback_mode(priv, MAC_LB_INTERNAL); /* stop the adapter */ if (!MACbSafeStop(priv)) { - MACvSetLoopbackMode(priv, MAC_LB_NONE); + vt6655_mac_set_loopback_mode(priv, MAC_LB_NONE); return false; } - MACvSetLoopbackMode(priv, MAC_LB_NONE); + vt6655_mac_set_loopback_mode(priv, MAC_LB_NONE); return true; } diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index a70e75ff78cd..f7d00a251677 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -553,8 +553,6 @@ void vt6655_mac_set_short_retry_limit(struct vnt_private *priv, unsigned char re void MACvSetLongRetryLimit(struct vnt_private *priv, unsigned char byRetryLimit); -void MACvSetLoopbackMode(struct vnt_private *priv, unsigned char byLoopbackMode); - void MACvSaveContext(struct vnt_private *priv, unsigned char *cxt_buf); void MACvRestoreContext(struct vnt_private *priv, unsigned char *cxt_buf); |