On 22-08-17 13:25, Ian Molton wrote:
Create a macro to make the code a bit more readable, whilst we're stuck
with using struct element offsets as register offsets.
Reviewed-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Ian Molton <ian@xxxxxxxxxxxxxx>
---
.../wireless/broadcom/brcm80211/brcmfmac/sdio.c | 35 +++++++++-------------
1 file changed, 14 insertions(+), 21 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index ce19ccf5d1d6..8f3e99da871a 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -161,6 +161,8 @@ struct rte_console {
#define CORE_BUS_REG(base, field) \
(base + offsetof(struct sdpcmd_regs, field))
+#define __sd_reg(field) \
+ (offsetof(struct sdpcmd_regs, field))
I really dislike __foo() stuff. Please just stick with uppercase for
macros, so SD_REG(). I am fine with dropping the base here.