[PATCH] staging: goldfish: Add parenthesis around macros arguments
From: aviyae
Date: Wed Mar 29 2017 - 17:14:39 EST
Fix style issues by adding parenthesis around macros
arguments
Signed-off-by: Aviya Erenfeld <aviyae42@xxxxxxxxx>
---
drivers/staging/goldfish/goldfish_audio.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index bd55995..2bb1f27 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -61,10 +61,11 @@ struct goldfish_audio {
#define COMBINED_BUFFER_SIZE ((2 * READ_BUFFER_SIZE) + \
(2 * WRITE_BUFFER_SIZE))
-#define AUDIO_READ(data, addr) (readl(data->reg_base + addr))
-#define AUDIO_WRITE(data, addr, x) (writel(x, data->reg_base + addr))
+#define AUDIO_READ(data, addr) (readl((data)->reg_base + (addr)))
+#define AUDIO_WRITE(data, addr, x) (writel(x, (data)->reg_base + (addr)))
#define AUDIO_WRITE64(data, addr, addr2, x) \
- (gf_write_dma_addr((x), data->reg_base + addr, data->reg_base + addr2))
+ (gf_write_dma_addr((x), (data)->reg_base + (addr), \
+ (data)->reg_base + (addr2)))
/*
* temporary variable used between goldfish_audio_probe() and
--
2.7.4