Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1383562 > unrolled thread

[PATCH] irqdomain: fix compare_const_fl.cocci warnings

Started byJulia Lawall <julia.lawall@lip6.fr>
First post2016-04-20 18:50 +0200
Last post2016-04-22 21:20 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-04-20 18:50 +0200
    Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings Marc Zyngier <marc.zyngier@arm.com> - 2016-04-20 19:20 +0200
    Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings Thomas Gleixner <tglx@linutronix.de> - 2016-04-22 19:50 +0200
      Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-04-22 21:00 +0200
    Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings Jon Hunter <jonathanh@nvidia.com> - 2016-04-22 20:30 +0200
      Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall <julia.lawall@lip6.fr> - 2016-04-22 21:10 +0200
        Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings Jon Hunter <jonathanh@nvidia.com> - 2016-04-22 21:20 +0200

#1383562 — [PATCH] irqdomain: fix compare_const_fl.cocci warnings

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-04-20 18:50 +0200
Subject[PATCH] irqdomain: fix compare_const_fl.cocci warnings
Message-ID<rq3ua-2ta-17@gated-at.bofh.it>
 Move constants to the right of binary operators.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

Not a big deal, but the transformed code looks better to me.

 irqdomain.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -618,7 +618,7 @@ unsigned int irq_create_fwspec_mapping(s
 		 * If the trigger type has not been set yet, then set
 		 * it now and return the interrupt number.
 		 */
-		if (IRQ_TYPE_NONE == irq_get_trigger_type(virq)) {
+		if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) {
 			irq_set_irq_type(virq, type);
 			return virq;
 		}

[toc] | [next] | [standalone]


#1383575

FromMarc Zyngier <marc.zyngier@arm.com>
Date2016-04-20 19:20 +0200
Message-ID<rq3Xd-2Z1-13@gated-at.bofh.it>
In reply to#1383562
On Wed, 20 Apr 2016 18:49:42 +0200
Julia Lawall <julia.lawall@lip6.fr> wrote:

>  Move constants to the right of binary operators.
> 
> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny.

[toc] | [prev] | [next] | [standalone]


#1385403

FromThomas Gleixner <tglx@linutronix.de>
Date2016-04-22 19:50 +0200
Message-ID<rqNnj-5Tz-5@gated-at.bofh.it>
In reply to#1383562
On Wed, 20 Apr 2016, Julia Lawall wrote:

>  Move constants to the right of binary operators.
> 
> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>

This SOB chain looks wrong. Who is the author?

Thanks,

	tglx

[toc] | [prev] | [next] | [standalone]


#1385440

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-04-22 21:00 +0200
Message-ID<rqOt4-6HO-23@gated-at.bofh.it>
In reply to#1385403

On Fri, 22 Apr 2016, Thomas Gleixner wrote:

> On Wed, 20 Apr 2016, Julia Lawall wrote:
> 
> >  Move constants to the right of binary operators.
> > 
> > Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> > 
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> 
> This SOB chain looks wrong. Who is the author?

The script?

julia

[toc] | [prev] | [next] | [standalone]


#1385422

FromJon Hunter <jonathanh@nvidia.com>
Date2016-04-22 20:30 +0200
Message-ID<rqO02-6t9-13@gated-at.bofh.it>
In reply to#1383562
On 20/04/16 17:49, Julia Lawall wrote:
>  Move constants to the right of binary operators.
> 
> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> 
> Not a big deal, but the transformed code looks better to me.
> 
>  irqdomain.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -618,7 +618,7 @@ unsigned int irq_create_fwspec_mapping(s
>  		 * If the trigger type has not been set yet, then set
>  		 * it now and return the interrupt number.
>  		 */
> -		if (IRQ_TYPE_NONE == irq_get_trigger_type(virq)) {
> +		if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) {
>  			irq_set_irq_type(virq, type);
>  			return virq;
>  		}

What branch is this from? Looks very familiar and related to some
changes I have been working on, but in my latest version I already have
this as shown above [0].

Cheers
Jon

[0] http://marc.info/?l=linux-tegra&m=146115064322071&w=2

[toc] | [prev] | [next] | [standalone]


#1385448

FromJulia Lawall <julia.lawall@lip6.fr>
Date2016-04-22 21:10 +0200
Message-ID<rqOCK-75k-13@gated-at.bofh.it>
In reply to#1385422

On Fri, 22 Apr 2016, Jon Hunter wrote:

> 
> On 20/04/16 17:49, Julia Lawall wrote:
> >  Move constants to the right of binary operators.
> > 
> > Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
> > 
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> > ---
> > 
> > Not a big deal, but the transformed code looks better to me.
> > 
> >  irqdomain.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > --- a/kernel/irq/irqdomain.c
> > +++ b/kernel/irq/irqdomain.c
> > @@ -618,7 +618,7 @@ unsigned int irq_create_fwspec_mapping(s
> >  		 * If the trigger type has not been set yet, then set
> >  		 * it now and return the interrupt number.
> >  		 */
> > -		if (IRQ_TYPE_NONE == irq_get_trigger_type(virq)) {
> > +		if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) {
> >  			irq_set_irq_type(virq, type);
> >  			return virq;
> >  		}
> 
> What branch is this from? Looks very familiar and related to some
> changes I have been working on, but in my latest version I already have
> this as shown above [0].

Sorry, I didn't save that information.  If it's done, it's done.  Sorry 
for the noise.

julia

> Cheers
> Jon
> 
> [0] http://marc.info/?l=linux-tegra&m=146115064322071&w=2
> 
> 

[toc] | [prev] | [next] | [standalone]


#1385453

FromJon Hunter <jonathanh@nvidia.com>
Date2016-04-22 21:20 +0200
Message-ID<rqOMq-78L-9@gated-at.bofh.it>
In reply to#1385448
On 22/04/16 20:00, Julia Lawall wrote:
> On Fri, 22 Apr 2016, Jon Hunter wrote:
> 
>>
>> On 20/04/16 17:49, Julia Lawall wrote:
>>>  Move constants to the right of binary operators.
>>>
>>> Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
>>>
>>> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
>>> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
>>> ---
>>>
>>> Not a big deal, but the transformed code looks better to me.
>>>
>>>  irqdomain.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> --- a/kernel/irq/irqdomain.c
>>> +++ b/kernel/irq/irqdomain.c
>>> @@ -618,7 +618,7 @@ unsigned int irq_create_fwspec_mapping(s
>>>  		 * If the trigger type has not been set yet, then set
>>>  		 * it now and return the interrupt number.
>>>  		 */
>>> -		if (IRQ_TYPE_NONE == irq_get_trigger_type(virq)) {
>>> +		if (irq_get_trigger_type(virq) == IRQ_TYPE_NONE) {
>>>  			irq_set_irq_type(virq, type);
>>>  			return virq;
>>>  		}
>>
>> What branch is this from? Looks very familiar and related to some
>> changes I have been working on, but in my latest version I already have
>> this as shown above [0].
> 
> Sorry, I didn't save that information.  If it's done, it's done.  Sorry 
> for the noise.

No problem. I am wondering if this was based off an earlier branch on my
github tree (as I know that kbuild is trawling these) and I have never
posted a patch publicly with the above.

Cheers
Jon

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web