linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups
@ 2016-01-07 17:38 Shraddha Barke
  2016-01-07 17:38 ` [PATCH v2 1/2] Staging: goldfish: Add space around + Shraddha Barke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Shraddha Barke @ 2016-01-07 17:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Cox, linux-kernel, devel, Jin Qian
  Cc: Dan Carpenter, Shraddha Barke

These patches remove the last few checkpatch warnings in staging/goldfish directory

Shraddha Barke (2):
  Staging: goldfish: Add space around +
  Staging: goldfish: Remove explicit NULL comparison

 drivers/staging/goldfish/goldfish_audio.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

-- 
2.1.4

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

* [PATCH v2 1/2] Staging: goldfish: Add space around +
  2016-01-07 17:38 [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Shraddha Barke
@ 2016-01-07 17:38 ` Shraddha Barke
  2016-01-07 17:38 ` [PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison Shraddha Barke
  2016-02-08  2:30 ` [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Shraddha Barke @ 2016-01-07 17:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Cox, linux-kernel, devel, Jin Qian
  Cc: Dan Carpenter, Shraddha Barke

Fix checkpatch warning of adding space around + in accordance with
kernel coding style.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
Changes in v2-
 No change. Added lkml and other maintainers.

 drivers/staging/goldfish/goldfish_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index b0927e4..f1e1838 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -63,7 +63,7 @@ struct goldfish_audio {
 #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.1.4

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

* [PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison
  2016-01-07 17:38 [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Shraddha Barke
  2016-01-07 17:38 ` [PATCH v2 1/2] Staging: goldfish: Add space around + Shraddha Barke
@ 2016-01-07 17:38 ` Shraddha Barke
  2016-02-08  2:30 ` [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Shraddha Barke @ 2016-01-07 17:38 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Cox, linux-kernel, devel, Jin Qian
  Cc: Dan Carpenter, Shraddha Barke

Remove explicit NULL comparison and write it in its simpler form.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
Changes in v2-
 No change.Added lkml and other maintainers.

 drivers/staging/goldfish/goldfish_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index f1e1838..364fdcd 100644
--- a/drivers/staging/goldfish/goldfish_audio.c
+++ b/drivers/staging/goldfish/goldfish_audio.c
@@ -280,12 +280,12 @@ static int goldfish_audio_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, data);
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (r == NULL) {
+	if (!r) {
 		dev_err(&pdev->dev, "platform_get_resource failed\n");
 		return -ENODEV;
 	}
 	data->reg_base = devm_ioremap(&pdev->dev, r->start, PAGE_SIZE);
-	if (data->reg_base == NULL)
+	if (!data->reg_base)
 		return -ENOMEM;
 
 	data->irq = platform_get_irq(pdev, 0);
@@ -295,7 +295,7 @@ static int goldfish_audio_probe(struct platform_device *pdev)
 	}
 	data->buffer_virt = dmam_alloc_coherent(&pdev->dev,
 				COMBINED_BUFFER_SIZE, &buf_addr, GFP_KERNEL);
-	if (data->buffer_virt == NULL) {
+	if (!data->buffer_virt) {
 		dev_err(&pdev->dev, "allocate buffer failed\n");
 		return -ENOMEM;
 	}
-- 
2.1.4

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

* Re: [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups
  2016-01-07 17:38 [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Shraddha Barke
  2016-01-07 17:38 ` [PATCH v2 1/2] Staging: goldfish: Add space around + Shraddha Barke
  2016-01-07 17:38 ` [PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison Shraddha Barke
@ 2016-02-08  2:30 ` Greg Kroah-Hartman
  2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2016-02-08  2:30 UTC (permalink / raw)
  To: Shraddha Barke; +Cc: Alan Cox, linux-kernel, devel, Jin Qian, Dan Carpenter

On Thu, Jan 07, 2016 at 11:08:36PM +0530, Shraddha Barke wrote:
> These patches remove the last few checkpatch warnings in staging/goldfish directory
> 
> Shraddha Barke (2):
>   Staging: goldfish: Add space around +
>   Staging: goldfish: Remove explicit NULL comparison
> 
>  drivers/staging/goldfish/goldfish_audio.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

Someone else did these changes before you did, sorry.

greg k-h

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

end of thread, other threads:[~2016-02-08  2:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 17:38 [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Shraddha Barke
2016-01-07 17:38 ` [PATCH v2 1/2] Staging: goldfish: Add space around + Shraddha Barke
2016-01-07 17:38 ` [PATCH v2 2/2] Staging: goldfish: Remove explicit NULL comparison Shraddha Barke
2016-02-08  2:30 ` [PATCH v2 0/2] Staging: goldfish: Checkpatch cleanups Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).