* [PATCH] staging: goldfish: fix checkpatch checks
@ 2015-11-17 16:44 Christian Colic
2015-11-17 17:06 ` Sudip Mukherjee
0 siblings, 1 reply; 2+ messages in thread
From: Christian Colic @ 2015-11-17 16:44 UTC (permalink / raw)
To: gregkh, dan.carpenter; +Cc: devel, linux-kernel
Fix checkpatch checks: spaces around + at "reg_base+addr2" and
rewrite comparisons with NULL to "!data->reg_base"
Signed-off-by: Christian Colic <colic.christian@gmail.com>
---
drivers/staging/goldfish/goldfish_audio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/goldfish/goldfish_audio.c b/drivers/staging/goldfish/goldfish_audio.c
index b0927e4..364fdcd 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
@@ -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.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: goldfish: fix checkpatch checks
2015-11-17 16:44 [PATCH] staging: goldfish: fix checkpatch checks Christian Colic
@ 2015-11-17 17:06 ` Sudip Mukherjee
0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2015-11-17 17:06 UTC (permalink / raw)
To: Christian Colic; +Cc: gregkh, dan.carpenter, devel, linux-kernel
On Tue, Nov 17, 2015 at 05:44:55PM +0100, Christian Colic wrote:
> Fix checkpatch checks: spaces around + at "reg_base+addr2" and
> rewrite comparisons with NULL to "!data->reg_base"
That becomes multiple changes in a single patch. It should be in
separate patches.
regards
sudip
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-17 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 16:44 [PATCH] staging: goldfish: fix checkpatch checks Christian Colic
2015-11-17 17:06 ` Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox