From 5df564ca11ce575b7378810faee2fc4c01149f9c Mon Sep 17 00:00:00 2001 From: Philipp Hortmann Date: Mon, 4 Jul 2022 20:20:57 +0200 Subject: [PATCH] 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 Link: https://lore.kernel.org/r/caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman --- 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 fdb6530..025a53b 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.7.4