* [PATCH 0/6] staging: vt6655: Convert two macros to static functions
@ 2022-07-04 18:20 Philipp Hortmann
2022-07-04 18:20 ` [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr Philipp Hortmann
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:20 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
Convert two multiline macros used only once to static functions.
checkpatch.pl does not accept multiline macros.
Tested with vt6655 on mini PCI Module
Transferred this patch over wlan connection of vt6655
Philipp Hortmann (6):
staging: vt6655: Rename pbyEtherAddr to mac_addr
staging: vt6655: Rename MACvWriteBSSIDAddress
staging: vt6655: Rename MACvReadEtherAddress
staging: vt6655: Move two macros to file where those are used
staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function
staging: vt6655: Convert macro vt6655_mac_read_ether_addr to function
drivers/staging/vt6655/device_main.c | 31 ++++++++++++++++++++++++++--
drivers/staging/vt6655/mac.h | 24 ---------------------
2 files changed, 29 insertions(+), 26 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr
2022-07-04 18:20 [PATCH 0/6] staging: vt6655: Convert two macros to static functions Philipp Hortmann
@ 2022-07-04 18:20 ` Philipp Hortmann
2022-07-04 19:05 ` Joe Perches
2022-07-04 18:20 ` [PATCH 2/6] staging: vt6655: Rename MACvWriteBSSIDAddress Philipp Hortmann
` (4 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:20 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
Fix name of a variable in two macros that use CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/vt6655/mac.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index 102e575c965d..541c6ed6a62f 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -565,27 +565,27 @@ do { \
iowrite16(wData & ~(wBits), iobase + byRegOfs); \
} while (0)
-#define MACvWriteBSSIDAddress(iobase, pbyEtherAddr) \
+#define MACvWriteBSSIDAddress(iobase, mac_addr) \
do { \
iowrite8(1, iobase + MAC_REG_PAGE1SEL); \
- iowrite8(pbyEtherAddr[0], iobase + MAC_REG_BSSID0); \
- iowrite8(pbyEtherAddr[1], iobase + MAC_REG_BSSID0 + 1); \
- iowrite8(pbyEtherAddr[2], iobase + MAC_REG_BSSID0 + 2); \
- iowrite8(pbyEtherAddr[3], iobase + MAC_REG_BSSID0 + 3); \
- iowrite8(pbyEtherAddr[4], iobase + MAC_REG_BSSID0 + 4); \
- iowrite8(pbyEtherAddr[5], iobase + MAC_REG_BSSID0 + 5); \
+ 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)
-#define MACvReadEtherAddress(iobase, pbyEtherAddr) \
+#define MACvReadEtherAddress(iobase, mac_addr) \
do { \
iowrite8(1, iobase + MAC_REG_PAGE1SEL); \
- pbyEtherAddr[0] = ioread8(iobase + MAC_REG_PAR0); \
- pbyEtherAddr[1] = ioread8(iobase + MAC_REG_PAR0 + 1); \
- pbyEtherAddr[2] = ioread8(iobase + MAC_REG_PAR0 + 2); \
- pbyEtherAddr[3] = ioread8(iobase + MAC_REG_PAR0 + 3); \
- pbyEtherAddr[4] = ioread8(iobase + MAC_REG_PAR0 + 4); \
- pbyEtherAddr[5] = ioread8(iobase + MAC_REG_PAR0 + 5); \
+ 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)
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/6] staging: vt6655: Rename MACvWriteBSSIDAddress
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 18:20 ` Philipp Hortmann
2022-07-04 18:20 ` [PATCH 3/6] staging: vt6655: Rename MACvReadEtherAddress Philipp Hortmann
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:20 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/vt6655/device_main.c | 2 +-
drivers/staging/vt6655/mac.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 204994692c90..6cf21883d1fe 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1405,7 +1405,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
spin_lock_irqsave(&priv->lock, flags);
- MACvWriteBSSIDAddress(priv->port_offset, conf->bssid);
+ vt6655_mac_write_bssid_addr(priv->port_offset, conf->bssid);
spin_unlock_irqrestore(&priv->lock, flags);
}
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index 541c6ed6a62f..cfebd126e42f 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -565,7 +565,7 @@ do { \
iowrite16(wData & ~(wBits), iobase + byRegOfs); \
} while (0)
-#define MACvWriteBSSIDAddress(iobase, mac_addr) \
+#define vt6655_mac_write_bssid_addr(iobase, mac_addr) \
do { \
iowrite8(1, iobase + MAC_REG_PAGE1SEL); \
iowrite8(mac_addr[0], iobase + MAC_REG_BSSID0); \
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/6] staging: vt6655: Rename MACvReadEtherAddress
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 18:20 ` [PATCH 2/6] staging: vt6655: Rename MACvWriteBSSIDAddress Philipp Hortmann
@ 2022-07-04 18:20 ` Philipp Hortmann
2022-07-04 18:20 ` [PATCH 4/6] staging: vt6655: Move two macros to file where those are used Philipp Hortmann
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:20 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
Fix name of a macro that uses CamelCase which is not
accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/vt6655/device_main.c | 2 +-
drivers/staging/vt6655/mac.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 6cf21883d1fe..b9c57c661729 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1722,7 +1722,7 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
}
/* initial to reload eeprom */
MACvInitialize(priv);
- MACvReadEtherAddress(priv->port_offset, priv->abyCurrentNetAddr);
+ vt6655_mac_read_ether_addr(priv->port_offset, priv->abyCurrentNetAddr);
/* Get RFType */
priv->byRFType = SROMbyReadEmbedded(priv->port_offset, EEP_OFS_RFTYPE);
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index cfebd126e42f..ba5575d63db0 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -577,7 +577,7 @@ do { \
iowrite8(0, iobase + MAC_REG_PAGE1SEL); \
} while (0)
-#define MACvReadEtherAddress(iobase, mac_addr) \
+#define vt6655_mac_read_ether_addr(iobase, mac_addr) \
do { \
iowrite8(1, iobase + MAC_REG_PAGE1SEL); \
mac_addr[0] = ioread8(iobase + MAC_REG_PAR0); \
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/6] staging: vt6655: Move two macros to file where those are used
2022-07-04 18:20 [PATCH 0/6] staging: vt6655: Convert two macros to static functions Philipp Hortmann
` (2 preceding siblings ...)
2022-07-04 18:20 ` [PATCH 3/6] staging: vt6655: Rename MACvReadEtherAddress Philipp Hortmann
@ 2022-07-04 18:20 ` Philipp Hortmann
2022-07-04 18:20 ` [PATCH 5/6] staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function Philipp Hortmann
2022-07-04 18:21 ` [PATCH 6/6] staging: vt6655: Convert macro vt6655_mac_read_ether_addr " Philipp Hortmann
5 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:20 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
Move two multiline macros to file of only useage to
convert them later to static functions.
checkpatch.pl does not accept multiline macros.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/vt6655/device_main.c | 24 ++++++++++++++++++++++++
drivers/staging/vt6655/mac.h | 24 ------------------------
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index b9c57c661729..fdb653071918 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -186,6 +186,30 @@ 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)
+
+#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)
+
/*
* Initialisation of MAC & BBP registers
*/
diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
index ba5575d63db0..5c14a76ed799 100644
--- a/drivers/staging/vt6655/mac.h
+++ b/drivers/staging/vt6655/mac.h
@@ -565,30 +565,6 @@ do { \
iowrite16(wData & ~(wBits), iobase + byRegOfs); \
} while (0)
-#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)
-
-#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)
-
#define MACvReceive0(iobase) \
do { \
unsigned long dwData; \
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/6] staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function
2022-07-04 18:20 [PATCH 0/6] staging: vt6655: Convert two macros to static functions Philipp Hortmann
` (3 preceding siblings ...)
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
2022-07-04 18:21 ` [PATCH 6/6] staging: vt6655: Convert macro vt6655_mac_read_ether_addr " Philipp Hortmann
5 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:20 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 6/6] staging: vt6655: Convert macro vt6655_mac_read_ether_addr to function
2022-07-04 18:20 [PATCH 0/6] staging: vt6655: Convert two macros to static functions Philipp Hortmann
` (4 preceding siblings ...)
2022-07-04 18:20 ` [PATCH 5/6] staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function Philipp Hortmann
@ 2022-07-04 18:21 ` Philipp Hortmann
5 siblings, 0 replies; 8+ messages in thread
From: Philipp Hortmann @ 2022-07-04 18:21 UTC (permalink / raw)
To: Forest Bond, Greg Kroah-Hartman, linux-staging, linux-kernel
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@gmail.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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr
2022-07-04 18:20 ` [PATCH 1/6] staging: vt6655: Rename pbyEtherAddr to mac_addr Philipp Hortmann
@ 2022-07-04 19:05 ` Joe Perches
0 siblings, 0 replies; 8+ messages in thread
From: Joe Perches @ 2022-07-04 19:05 UTC (permalink / raw)
To: Philipp Hortmann, Forest Bond, Greg Kroah-Hartman, linux-staging,
linux-kernel
On Mon, 2022-07-04 at 20:20 +0200, Philipp Hortmann wrote:
> Fix name of a variable in two macros that use CamelCase which is not
> accepted by checkpatch.pl
These might be nicer as functions with for loops
> diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h
maybe something like:
static inline void MACvWriteBSSIDAddress(void __iomem *iobase, u8 *addr)
{
int i;
for (i = 0; i < ETH_ALEN; i++)
iowrite8(*addr++, iobase + MAC_REG_BSSID0 + i);
}
static inline void MACvReadEtherAddress(void __iomem *iobase, u8 *addr)
{
int i;
iowrite8(1, iobase + MAC_REG_PAGE1SEL);
for (i = 0; i < ETH_ALEN; i++)
*addr++ = ioread8(iobase + MAC_REG_PAR0 + i);
iowrite8(0, iobase + MAC_REG_PAGE1SEL);
}
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-07-04 19:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 5/6] staging: vt6655: Convert macro vt6655_mac_write_bssid_addr to function Philipp Hortmann
2022-07-04 18:21 ` [PATCH 6/6] staging: vt6655: Convert macro vt6655_mac_read_ether_addr " Philipp Hortmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.