[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com>
Date: Mon, 4 Jul 2022 20:20:57 +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 5/6] staging: vt6655: Convert macro
vt6655_mac_write_bssid_addr to function
Convert macro vt6655_mac_write_bssid_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 | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index fdb653071918..025a53b493d3 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -122,6 +122,8 @@ static int vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent);
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 int device_init_rd0_ring(struct vnt_private *priv);
static int device_init_rd1_ring(struct vnt_private *priv);
static int device_init_td0_ring(struct vnt_private *priv);
@@ -186,17 +188,17 @@ device_set_options(struct vnt_private *priv)
pr_debug(" byBBType= %d\n", (int)priv->byBBType);
}
-#define vt6655_mac_write_bssid_addr(iobase, mac_addr) \
-do { \
- iowrite8(1, iobase + MAC_REG_PAGE1SEL); \
- iowrite8(mac_addr[0], iobase + MAC_REG_BSSID0); \
- iowrite8(mac_addr[1], iobase + MAC_REG_BSSID0 + 1); \
- iowrite8(mac_addr[2], iobase + MAC_REG_BSSID0 + 2); \
- iowrite8(mac_addr[3], iobase + MAC_REG_BSSID0 + 3); \
- iowrite8(mac_addr[4], iobase + MAC_REG_BSSID0 + 4); \
- iowrite8(mac_addr[5], iobase + MAC_REG_BSSID0 + 5); \
- iowrite8(0, iobase + MAC_REG_PAGE1SEL); \
-} while (0)
+static void vt6655_mac_write_bssid_addr(void __iomem *iobase, const u8 *mac_addr)
+{
+ iowrite8(1, iobase + MAC_REG_PAGE1SEL);
+ iowrite8(mac_addr[0], iobase + MAC_REG_BSSID0);
+ iowrite8(mac_addr[1], iobase + MAC_REG_BSSID0 + 1);
+ iowrite8(mac_addr[2], iobase + MAC_REG_BSSID0 + 2);
+ iowrite8(mac_addr[3], iobase + MAC_REG_BSSID0 + 3);
+ iowrite8(mac_addr[4], iobase + MAC_REG_BSSID0 + 4);
+ iowrite8(mac_addr[5], iobase + MAC_REG_BSSID0 + 5);
+ iowrite8(0, iobase + MAC_REG_PAGE1SEL);
+}
#define vt6655_mac_read_ether_addr(iobase, mac_addr) \
do { \
--
2.36.1
Powered by blists - more mailing lists