diff mbox

[1/1] irqchip: exynos-combiner: Fix checkpatch warnings

Message ID 1363165944-7480-1-git-send-email-sachin.kamat@linaro.org
State Deferred
Headers show

Commit Message

Sachin Kamat March 13, 2013, 9:12 a.m. UTC
Fixes the following warnings:
WARNING: line over 80 characters
WARNING: Prefer pr_warn(... to pr_warning(...

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/irqchip/exynos-combiner.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Comments

Sachin Kamat April 1, 2013, 10:16 a.m. UTC | #1
On 13 March 2013 14:42, Sachin Kamat <sachin.kamat@linaro.org> wrote:

> Fixes the following warnings:
> WARNING: line over 80 characters
> WARNING: Prefer pr_warn(... to pr_warning(...
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/irqchip/exynos-combiner.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/exynos-combiner.c
> b/drivers/irqchip/exynos-combiner.c
> index e8501db..66b1bf5 100644
> --- a/drivers/irqchip/exynos-combiner.c
> +++ b/drivers/irqchip/exynos-combiner.c
> @@ -229,13 +229,15 @@ void __init combiner_init(void __iomem
> *combiner_base,
>         irq_base = irq_alloc_descs(COMBINER_IRQ(0, 0), 1, nr_irq, 0);
>         if (IS_ERR_VALUE(irq_base)) {
>                 irq_base = COMBINER_IRQ(0, 0);
> -               pr_warning("%s: irq desc alloc failed. Continuing with %d
> as linux irq base\n", __func__, irq_base);
> +               pr_warn("%s: irq desc alloc failed. "
> +                       "Continuing with %d as linux irq base\n",
> +                       __func__, irq_base);
>         }
>
>         combiner_irq_domain = irq_domain_add_legacy(np, nr_irq, irq_base,
> 0,
>                                 &combiner_irq_domain_ops, &combiner_data);
>         if (WARN_ON(!combiner_irq_domain)) {
> -               pr_warning("%s: irq domain init failed\n", __func__);
> +               pr_warn("%s: irq domain init failed\n", __func__);
>                 return;
>         }
>
> --
> 1.7.4.1
>
> Ping..
Sachin Kamat April 9, 2013, 3:03 a.m. UTC | #2
Hi Kukjin,

On 13 March 2013 14:42, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> Fixes the following warnings:
> WARNING: line over 80 characters
> WARNING: Prefer pr_warn(... to pr_warning(...
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/irqchip/exynos-combiner.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
> index e8501db..66b1bf5 100644
> --- a/drivers/irqchip/exynos-combiner.c
> +++ b/drivers/irqchip/exynos-combiner.c
> @@ -229,13 +229,15 @@ void __init combiner_init(void __iomem *combiner_base,
>         irq_base = irq_alloc_descs(COMBINER_IRQ(0, 0), 1, nr_irq, 0);
>         if (IS_ERR_VALUE(irq_base)) {
>                 irq_base = COMBINER_IRQ(0, 0);
> -               pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
> +               pr_warn("%s: irq desc alloc failed. "
> +                       "Continuing with %d as linux irq base\n",
> +                       __func__, irq_base);
>         }
>
>         combiner_irq_domain = irq_domain_add_legacy(np, nr_irq, irq_base, 0,
>                                 &combiner_irq_domain_ops, &combiner_data);
>         if (WARN_ON(!combiner_irq_domain)) {
> -               pr_warning("%s: irq domain init failed\n", __func__);
> +               pr_warn("%s: irq domain init failed\n", __func__);
>                 return;
>         }
>
> --
> 1.7.4.1
>

ChanHo said you would be picking this patch. Please check.
Joe Perches April 9, 2013, 3:09 a.m. UTC | #3
On Tue, 2013-04-09 at 08:33 +0530, Sachin Kamat wrote:
> On 13 March 2013 14:42, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> > Fixes the following warnings:
> > WARNING: line over 80 characters
> > WARNING: Prefer pr_warn(... to pr_warning(...
> > diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
[]
> > @@ -229,13 +229,15 @@ void __init combiner_init(void __iomem *combiner_base,
[]
> > -               pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
> > +               pr_warn("%s: irq desc alloc failed. "
> > +                       "Continuing with %d as linux irq base\n",
> > +                       __func__, irq_base);

Please don't split formats.
See Documentation/CodingStyle Chapter 2

		pr_warn("%s: irq desc alloc failed. Continuing with %d as linux irq base\n",
			__func__, irq_base);
Sachin Kamat April 9, 2013, 3:36 a.m. UTC | #4
On 9 April 2013 08:39, Joe Perches <joe@perches.com> wrote:
> On Tue, 2013-04-09 at 08:33 +0530, Sachin Kamat wrote:
>> On 13 March 2013 14:42, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> > Fixes the following warnings:
>> > WARNING: line over 80 characters
>> > WARNING: Prefer pr_warn(... to pr_warning(...
>> > diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
> []
>> > @@ -229,13 +229,15 @@ void __init combiner_init(void __iomem *combiner_base,
> []
>> > -               pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
>> > +               pr_warn("%s: irq desc alloc failed. "
>> > +                       "Continuing with %d as linux irq base\n",
>> > +                       __func__, irq_base);
>
> Please don't split formats.
> See Documentation/CodingStyle Chapter 2
>
>                 pr_warn("%s: irq desc alloc failed. Continuing with %d as linux irq base\n",
>                         __func__, irq_base);
>
>

Thanks for pointing out. If I didn't split it, it would have exceeded
the 80 column limit. Since there were 2 different sentences, I thought
grepping should not be a problem if split at sentence boundaries.
Joe Perches April 9, 2013, 3:45 a.m. UTC | #5
On Tue, 2013-04-09 at 09:06 +0530, Sachin Kamat wrote:
> On 9 April 2013 08:39, Joe Perches <joe@perches.com> wrote:
> > On Tue, 2013-04-09 at 08:33 +0530, Sachin Kamat wrote:
> >> On 13 March 2013 14:42, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> >> > Fixes the following warnings:
> >> > WARNING: line over 80 characters
> >> > WARNING: Prefer pr_warn(... to pr_warning(...
> >> > diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
> > []
> >> > @@ -229,13 +229,15 @@ void __init combiner_init(void __iomem *combiner_base,
> > []
> >> > -               pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
> >> > +               pr_warn("%s: irq desc alloc failed. "
> >> > +                       "Continuing with %d as linux irq base\n",
> >> > +                       __func__, irq_base);
> >
> > Please don't split formats.
> > See Documentation/CodingStyle Chapter 2
> >
> >                 pr_warn("%s: irq desc alloc failed. Continuing with %d as linux irq base\n",
> >                         __func__, irq_base);
> >
> >
> 
> Thanks for pointing out. If I didn't split it, it would have exceeded
> the 80 column limit.

So?

> Since there were 2 different sentences, I thought
> grepping should not be a problem if split at sentence boundaries.

I think it's OK to split at \n but not necessarily
at a sentence boundary/period.
Sachin Kamat April 9, 2013, 3:50 a.m. UTC | #6
On 9 April 2013 09:15, Joe Perches <joe@perches.com> wrote:
> On Tue, 2013-04-09 at 09:06 +0530, Sachin Kamat wrote:
>> On 9 April 2013 08:39, Joe Perches <joe@perches.com> wrote:
>> > On Tue, 2013-04-09 at 08:33 +0530, Sachin Kamat wrote:
>> >> On 13 March 2013 14:42, Sachin Kamat <sachin.kamat@linaro.org> wrote:
>> >> > Fixes the following warnings:
>> >> > WARNING: line over 80 characters
>> >> > WARNING: Prefer pr_warn(... to pr_warning(...
>> >> > diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
>> > []
>> >> > @@ -229,13 +229,15 @@ void __init combiner_init(void __iomem *combiner_base,
>> > []
>> >> > -               pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
>> >> > +               pr_warn("%s: irq desc alloc failed. "
>> >> > +                       "Continuing with %d as linux irq base\n",
>> >> > +                       __func__, irq_base);
>> >
>> > Please don't split formats.
>> > See Documentation/CodingStyle Chapter 2
>> >
>> >                 pr_warn("%s: irq desc alloc failed. Continuing with %d as linux irq base\n",
>> >                         __func__, irq_base);
>> >
>> >
>>
>> Thanks for pointing out. If I didn't split it, it would have exceeded
>> the 80 column limit.
>
> So?

Removing one would have introduced another :)

>
>> Since there were 2 different sentences, I thought
>> grepping should not be a problem if split at sentence boundaries.
>
> I think it's OK to split at \n but not necessarily
> at a sentence boundary/period.

OK, I will use the format suggested by you and re-submit.
Thanks for reviewing.
diff mbox

Patch

diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c
index e8501db..66b1bf5 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -229,13 +229,15 @@  void __init combiner_init(void __iomem *combiner_base,
 	irq_base = irq_alloc_descs(COMBINER_IRQ(0, 0), 1, nr_irq, 0);
 	if (IS_ERR_VALUE(irq_base)) {
 		irq_base = COMBINER_IRQ(0, 0);
-		pr_warning("%s: irq desc alloc failed. Continuing with %d as linux irq base\n", __func__, irq_base);
+		pr_warn("%s: irq desc alloc failed. "
+			"Continuing with %d as linux irq base\n",
+			__func__, irq_base);
 	}
 
 	combiner_irq_domain = irq_domain_add_legacy(np, nr_irq, irq_base, 0,
 				&combiner_irq_domain_ops, &combiner_data);
 	if (WARN_ON(!combiner_irq_domain)) {
-		pr_warning("%s: irq domain init failed\n", __func__);
+		pr_warn("%s: irq domain init failed\n", __func__);
 		return;
 	}