mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Forest Bond <forest@alittletooquiet.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 5/6] staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function
Date: Mon, 4 Jul 2022 20:20:57 +0200	[thread overview]
Message-ID: <caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1656835310.git.philipp.g.hortmann@gmail.com>

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@gmail.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


  parent reply	other threads:[~2022-07-04 18:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-04 18:20 [PATCH 0/6] staging: vt6655: Convert two macros to static functions Philipp Hortmann
2022-07-04 18:20 ` [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr Philipp Hortmann
2022-07-04 19:05   ` Joe Perches
2022-07-04 18:20 ` [PATCH 2/6] staging: vt6655: Rename MACvWriteBSSIDAddress Philipp Hortmann
2022-07-04 18:20 ` [PATCH 3/6] staging: vt6655: Rename MACvReadEtherAddress Philipp Hortmann
2022-07-04 18:20 ` [PATCH 4/6] staging: vt6655: Move two macros to file where those are used Philipp Hortmann
2022-07-04 18:20 ` Philipp Hortmann [this message]
2022-07-04 18:21 ` [PATCH 6/6] staging: vt6655: Convert macro vt6655_mac_read_ether_addr to function Philipp Hortmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=caecf7287d92c5d25ba0dfc16a24a6ce4aa67d55.1656835310.git.philipp.g.hortmann@gmail.com \
    --to=philipp.g.hortmann@gmail.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®