Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"
On Fri, Dec 11, 2015 at 04:39:26PM -0500, Benjamin Young wrote: > Fixed coding style for null comparisons in goldfish_audio.c to be more > consistant > with the rest of the kernel coding style > > Signed-off-by: Benjamin Young > --- > 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(>dev, "platform_get_resource failed\n"); > return -ENODEV; > } > data->reg_base = devm_ioremap(>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(>dev, > COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL); > - if (data->buffer_virt == NULL) { > + if (!data->buffer_virt) { > dev_err(>dev, "allocate buffer failed\n"); > return -ENOMEM; > } Same here, someone beat you to it.
Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"
On Fri, Dec 11, 2015 at 04:39:26PM -0500, Benjamin Young wrote: > Fixed coding style for null comparisons in goldfish_audio.c to be more > consistant > with the rest of the kernel coding style > > Signed-off-by: Benjamin Young> --- > 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(>dev, "platform_get_resource failed\n"); > return -ENODEV; > } > data->reg_base = devm_ioremap(>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(>dev, > COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL); > - if (data->buffer_virt == NULL) { > + if (!data->buffer_virt) { > dev_err(>dev, "allocate buffer failed\n"); > return -ENOMEM; > } Same here, someone beat you to it.
[PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"
Fixed coding style for null comparisons in goldfish_audio.c to be more consistant with the rest of the kernel coding style Signed-off-by: Benjamin Young --- 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(>dev, "platform_get_resource failed\n"); return -ENODEV; } data->reg_base = devm_ioremap(>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(>dev, COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL); - if (data->buffer_virt == NULL) { + if (!data->buffer_virt) { dev_err(>dev, "allocate buffer failed\n"); return -ENOMEM; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
On Fri, Dec 11, 2015 at 12:14:17PM +0530, Sudip Mukherjee wrote: > On Thu, Dec 10, 2015 at 06:31:09PM -0500, Benjamin Young wrote: > > From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 > > From: Benjamin Young > > Date: Thu, 10 Dec 2015 17:31:00 -0500 > > Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred > > around > > that '+' > > Regarding all the three patches: The above header information should not > be here. > > Regarding this patch: This is a repeat of the previous patch with the > subject of the next patch. > > regards > sudip Sorry about the duplicate emails with one having the wrong subject line. My fingers betrayed me and hit Enter before I was done editing As for the header information, i will remove it and send out the patches Thank you again for being so pacient, since i am a noobie to kernel development Thanks, Benjamin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r"
Fixed coding style for null comparisons in goldfish_audio.c to be more consistant with the rest of the kernel coding style Signed-off-by: Benjamin Young--- 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(>dev, "platform_get_resource failed\n"); return -ENODEV; } data->reg_base = devm_ioremap(>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(>dev, COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL); - if (data->buffer_virt == NULL) { + if (!data->buffer_virt) { dev_err(>dev, "allocate buffer failed\n"); return -ENOMEM; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
On Fri, Dec 11, 2015 at 12:14:17PM +0530, Sudip Mukherjee wrote: > On Thu, Dec 10, 2015 at 06:31:09PM -0500, Benjamin Young wrote: > > From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 > > From: Benjamin Young> > Date: Thu, 10 Dec 2015 17:31:00 -0500 > > Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred > > around > > that '+' > > Regarding all the three patches: The above header information should not > be here. > > Regarding this patch: This is a repeat of the previous patch with the > subject of the next patch. > > regards > sudip Sorry about the duplicate emails with one having the wrong subject line. My fingers betrayed me and hit Enter before I was done editing As for the header information, i will remove it and send out the patches Thank you again for being so pacient, since i am a noobie to kernel development Thanks, Benjamin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
On Thu, Dec 10, 2015 at 06:31:09PM -0500, Benjamin Young wrote: > From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 > From: Benjamin Young > Date: Thu, 10 Dec 2015 17:31:00 -0500 > Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred around > that '+' Regarding all the three patches: The above header information should not be here. Regarding this patch: This is a repeat of the previous patch with the subject of the next patch. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
>From f279a9e98b35301690abb39271367ecb0f611aff Mon Sep 17 00:00:00 2001 From: Benjamin Young Date: Thu, 10 Dec 2015 17:35:33 -0500 Subject: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r" Fixed coding style for null comparisons in goldfish_audio.c to be more consistant with the rest of the kernel coding style Signed-off-by: Benjamin Young --- 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(>dev, "platform_get_resource failed\n"); return -ENODEV; } data->reg_base = devm_ioremap(>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(>dev, COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL); - if (data->buffer_virt == NULL) { + if (!data->buffer_virt) { dev_err(>dev, "allocate buffer failed\n"); return -ENOMEM; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
>From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 From: Benjamin Young Date: Thu, 10 Dec 2015 17:31:00 -0500 Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred around that '+' Helped improve coding style to make arithemethic easier to read Signed-off-by: Benjamin Young --- 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.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
>From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 From: Benjamin YoungDate: Thu, 10 Dec 2015 17:31:00 -0500 Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred around that '+' Helped improve coding style to make arithemethic easier to read Signed-off-by: Benjamin Young --- 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.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
>From f279a9e98b35301690abb39271367ecb0f611aff Mon Sep 17 00:00:00 2001 From: Benjamin Young <youngc...@gmail.com> Date: Thu, 10 Dec 2015 17:35:33 -0500 Subject: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could be written "!r" Fixed coding style for null comparisons in goldfish_audio.c to be more consistant with the rest of the kernel coding style Signed-off-by: Benjamin Young <youngc...@gmail.com> --- 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(>dev, "platform_get_resource failed\n"); return -ENODEV; } data->reg_base = devm_ioremap(>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(>dev, COMBINED_BUFFER_SIZE, _addr, GFP_KERNEL); - if (data->buffer_virt == NULL) { + if (!data->buffer_virt) { dev_err(>dev, "allocate buffer failed\n"); return -ENOMEM; } -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] staging: goldfish: Coding Style Fix Comparison to NULL could
On Thu, Dec 10, 2015 at 06:31:09PM -0500, Benjamin Young wrote: > From 4b8ce6b3bd7effdfff2c95fbeb4a20cb93d5e9e5 Mon Sep 17 00:00:00 2001 > From: Benjamin Young> Date: Thu, 10 Dec 2015 17:31:00 -0500 > Subject: [PATCH] staging: goldfish: Coding Style Fix - spaces preferred around > that '+' Regarding all the three patches: The above header information should not be here. Regarding this patch: This is a repeat of the previous patch with the subject of the next patch. regards sudip -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/