All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: goldfish: Fix coding style issues
@ 2017-03-27  9:53 aviyae
  2017-03-27 10:04 ` Greg KH
  2017-03-27 11:52 ` [PATCH v2] staging: goldfish: Fix style issues in macros aviyae
  0 siblings, 2 replies; 11+ messages in thread
From: aviyae @ 2017-03-27  9:53 UTC (permalink / raw)
  To: gregkh; +Cc: aviyae42, devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 58 bytes --]

fixing some coding style issues in goldfish audio driver


[-- Attachment #2: 0001-staging-goldfish-Fix-coding-style-issues.patch --]
[-- Type: text/x-patch, Size: 1446 bytes --]

>From 8368d1b6404d63da7d502f6cd2ce6b50c7ffa9b9 Mon Sep 17 00:00:00 2001
From: Aviya Erenfeld <aviyae42@gmail.com>
Date: Tue, 21 Mar 2017 00:07:19 +0200
Subject: [PATCH] staging: goldfish: Fix coding style issues

Fix the coding style issues that raised by checkpatch.pl
in that driver.
(For the eudyptula challenge)

Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
---
 drivers/staging/goldfish/goldfish_audio.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index bd55995..f1640ab 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -61,10 +61,12 @@ 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))
+	({typeof(data) _data = (data); \
+	gf_write_dma_addr((x), _data->reg_base + (addr), \
+			  _data->reg_base + (addr2)); })
 
 /*
  *  temporary variable used between goldfish_audio_probe() and
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-04-08 15:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-27  9:53 [PATCH] staging: goldfish: Fix coding style issues aviyae
2017-03-27 10:04 ` Greg KH
2017-03-27 11:52 ` [PATCH v2] staging: goldfish: Fix style issues in macros aviyae
2017-03-27 12:05   ` Frans Klaver
2017-03-27 12:13     ` aviyae
2017-03-27 12:19       ` Frans Klaver
2017-03-27 12:19   ` [PATCH v3] " aviyae
2017-03-29  7:19     ` Greg KH
2017-03-29 21:11     ` [PATCH] staging: goldfish: Add parenthesis around macros arguments aviyae
2017-04-08 15:03       ` Greg KH
2017-04-08 15:03       ` Greg KH

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.