Skip to contentSkip to conversation

Staging: goldfish: Checkpatch cleanups

PATCH In review Shraddha Barke 2 participants 4 messages Jan 7, 2016 – Feb 8, 2016 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover Staging: goldfish: Checkpatch cleanups

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(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/2 Staging: goldfish: Add space around +

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

---
Changes in v2-
No change. Added lkml and other maintainers.

 drivers/staging/goldfish/goldfish_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/goldfish/goldfish_audio.c +1 -1
index b0927e4..f1e1838 100644
@@ -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
Signature · 1 line
2.1.4
#2 lore raw

PATCH v2 2/2 Staging: goldfish: Remove explicit NULL comparison

In reply to Shraddha Barke

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

---
Changes in v2-
No change.Added lkml and other maintainers.

 drivers/staging/goldfish/goldfish_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/goldfish/goldfish_audio.c +3 -3
index f1e1838..364fdcd 100644
@@ -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;
 	}
Signature · 1 line
2.1.4
#3 lore raw
In reply to Shraddha Barke
Quoted 8 lines · 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(-)

Someone else did these changes before you did, sorry.

greg k-h