Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1612368 > unrolled thread
| Started by | aviyae <aviyae42@gmail.com> |
|---|---|
| First post | 2017-03-29 23:20 +0200 |
| Last post | 2017-04-08 17:10 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH] staging: goldfish: Add parenthesis around macros arguments aviyae <aviyae42@gmail.com> - 2017-03-29 23:20 +0200
Re: [PATCH] staging: goldfish: Add parenthesis around macros arguments Greg KH <gregkh@linuxfoundation.org> - 2017-04-08 17:10 +0200
Re: [PATCH] staging: goldfish: Add parenthesis around macros arguments Greg KH <gregkh@linuxfoundation.org> - 2017-04-08 17:10 +0200
| From | aviyae <aviyae42@gmail.com> |
|---|---|
| Date | 2017-03-29 23:20 +0200 |
| Subject | [PATCH] staging: goldfish: Add parenthesis around macros arguments |
| Message-ID | <tqtaz-4hp-49@gated-at.bofh.it> |
Fix style issues by adding parenthesis around macros
arguments
Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
---
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
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-04-08 17:10 +0200 |
| Subject | Re: [PATCH] staging: goldfish: Add parenthesis around macros arguments |
| Message-ID | <tu09X-6Ro-1@gated-at.bofh.it> |
| In reply to | #1612368 |
On Thu, Mar 30, 2017 at 12:11:05AM +0300, aviyae wrote:
> Fix style issues by adding parenthesis around macros
> arguments
>
> Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
> ---
> 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)))
Your indentation here is odd, please fix up.
And is this really a needed change?
thanks,
greg k-h
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2017-04-08 17:10 +0200 |
| Subject | Re: [PATCH] staging: goldfish: Add parenthesis around macros arguments |
| Message-ID | <tu09X-6Ro-7@gated-at.bofh.it> |
| In reply to | #1612368 |
On Thu, Mar 30, 2017 at 12:11:05AM +0300, aviyae wrote: > Fix style issues by adding parenthesis around macros > arguments > > Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com> Also your From: line does not match this line...
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web