[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e2524187d9d3a6140fe4a5a35926db14dddfe98.1656835310.git.philipp.g.hortmann@gmail.com>
Date: Mon, 4 Jul 2022 20:21:08 +0200
From: Philipp Hortmann <philipp.g.hortmann@...il.com>
To: Forest Bond <forest@...ttletooquiet.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: [PATCH 6/6] staging: vt6655: Convert macro
vt6655_mac_read_ether_addr to function
Convert macro vt6655_mac_read_ether_addr to static function.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@...il.com>
---
drivers/staging/vt6655/device_main.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 025a53b493d3..298963cbca1d 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -123,6 +123,7 @@ static void device_free_info(struct vnt_private *priv);
static void device_print_info(struct vnt_private *priv);
static void vt6655_mac_write_bssid_addr(void __iomem *iobase, const u8 *mac_addr);
+static void vt6655_mac_read_ether_addr(void __iomem *iobase, u8 *mac_addr);
static int device_init_rd0_ring(struct vnt_private *priv);
static int device_init_rd1_ring(struct vnt_private *priv);
@@ -200,17 +201,17 @@ static void vt6655_mac_write_bssid_addr(void __iomem *iobase, const u8 *mac_addr
iowrite8(0, iobase + MAC_REG_PAGE1SEL);
}
-#define vt6655_mac_read_ether_addr(iobase, mac_addr) \
-do { \
- iowrite8(1, iobase + MAC_REG_PAGE1SEL); \
- mac_addr[0] = ioread8(iobase + MAC_REG_PAR0); \
- mac_addr[1] = ioread8(iobase + MAC_REG_PAR0 + 1); \
- mac_addr[2] = ioread8(iobase + MAC_REG_PAR0 + 2); \
- mac_addr[3] = ioread8(iobase + MAC_REG_PAR0 + 3); \
- mac_addr[4] = ioread8(iobase + MAC_REG_PAR0 + 4); \
- mac_addr[5] = ioread8(iobase + MAC_REG_PAR0 + 5); \
- iowrite8(0, iobase + MAC_REG_PAGE1SEL); \
-} while (0)
+static void vt6655_mac_read_ether_addr(void __iomem *iobase, u8 *mac_addr)
+{
+ iowrite8(1, iobase + MAC_REG_PAGE1SEL);
+ mac_addr[0] = ioread8(iobase + MAC_REG_PAR0);
+ mac_addr[1] = ioread8(iobase + MAC_REG_PAR0 + 1);
+ mac_addr[2] = ioread8(iobase + MAC_REG_PAR0 + 2);
+ mac_addr[3] = ioread8(iobase + MAC_REG_PAR0 + 3);
+ mac_addr[4] = ioread8(iobase + MAC_REG_PAR0 + 4);
+ mac_addr[5] = ioread8(iobase + MAC_REG_PAR0 + 5);
+ iowrite8(0, iobase + MAC_REG_PAGE1SEL);
+}
/*
* Initialisation of MAC & BBP registers
--
2.36.1
Powered by blists - more mailing lists