staging: vt6655: Convert macro vt6655_mac_reg_bits_off to function

Convert macro vt6655_mac_reg_bits_off to function.
checkpatch.pl does not accept multiline macros.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/422950c8e1349fba2f97b0b95ba13f361cde05d9.1657657918.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Philipp Hortmann 2022-07-13 07:02:03 +02:00 committed by Greg Kroah-Hartman
parent 77072b0f4b
commit 64a5c7bf56
2 changed files with 9 additions and 7 deletions

View file

@ -54,6 +54,14 @@ void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, cons
iowrite16(reg_value | (bit_mask), iobase + reg_offset); iowrite16(reg_value | (bit_mask), iobase + reg_offset);
} }
void vt6655_mac_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask)
{
unsigned char reg_value;
reg_value = ioread8(iobase + reg_offset);
iowrite8(reg_value & ~(bit_mask), iobase + reg_offset);
}
/* /*
* Description: * Description:
* Test if all test bits off * Test if all test bits off

View file

@ -537,13 +537,6 @@
/*--------------------- Export Macros ------------------------------*/ /*--------------------- Export Macros ------------------------------*/
#define vt6655_mac_reg_bits_off(iobase, reg_offset, bit_mask) \
do { \
unsigned char reg_value; \
reg_value = ioread8(iobase + reg_offset); \
iowrite8(reg_value & ~(bit_mask), iobase + reg_offset); \
} while (0)
#define vt6655_mac_word_reg_bits_off(iobase, reg_offset, bit_mask) \ #define vt6655_mac_word_reg_bits_off(iobase, reg_offset, bit_mask) \
do { \ do { \
unsigned short reg_value; \ unsigned short reg_value; \
@ -654,6 +647,7 @@ do { \
void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask); void vt6655_mac_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask);
void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask); void vt6655_mac_word_reg_bits_on(void __iomem *iobase, const u8 reg_offset, const u16 bit_mask);
void vt6655_mac_reg_bits_off(void __iomem *iobase, const u8 reg_offset, const u8 bit_mask);
bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs, bool MACbIsRegBitsOff(struct vnt_private *priv, unsigned char byRegOfs,
unsigned char byTestBits); unsigned char byTestBits);