public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqdomain: fix compare_const_fl.cocci warnings
@ 2016-04-20 16:49 Julia Lawall
  2016-04-20 17:19 ` Marc Zyngier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Julia Lawall @ 2016-04-20 16:49 UTC (permalink / raw)
  To: Jon Hunter, Jiang Liu, Marc Zyngier, Thomas Gleixner,
	linux-kernel, kbuild-all

 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;
 		}

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
  2016-04-20 16:49 [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall
@ 2016-04-20 17:19 ` Marc Zyngier
  2016-04-22 17:42 ` Thomas Gleixner
  2016-04-22 18:21 ` Jon Hunter
  2 siblings, 0 replies; 7+ messages in thread
From: Marc Zyngier @ 2016-04-20 17:19 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jon Hunter, Jiang Liu, Thomas Gleixner, linux-kernel, kbuild-all

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
  2016-04-20 16:49 [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall
  2016-04-20 17:19 ` Marc Zyngier
@ 2016-04-22 17:42 ` Thomas Gleixner
  2016-04-22 18:59   ` Julia Lawall
  2016-04-22 18:21 ` Jon Hunter
  2 siblings, 1 reply; 7+ messages in thread
From: Thomas Gleixner @ 2016-04-22 17:42 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jon Hunter, Jiang Liu, Marc Zyngier, linux-kernel, kbuild-all

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
  2016-04-20 16:49 [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall
  2016-04-20 17:19 ` Marc Zyngier
  2016-04-22 17:42 ` Thomas Gleixner
@ 2016-04-22 18:21 ` Jon Hunter
  2016-04-22 19:00   ` Julia Lawall
  2 siblings, 1 reply; 7+ messages in thread
From: Jon Hunter @ 2016-04-22 18:21 UTC (permalink / raw)
  To: Julia Lawall, Jiang Liu, Marc Zyngier, Thomas Gleixner,
	linux-kernel, kbuild-all


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
  2016-04-22 17:42 ` Thomas Gleixner
@ 2016-04-22 18:59   ` Julia Lawall
  0 siblings, 0 replies; 7+ messages in thread
From: Julia Lawall @ 2016-04-22 18:59 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Jon Hunter, Jiang Liu, Marc Zyngier, linux-kernel, kbuild-all



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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
  2016-04-22 18:21 ` Jon Hunter
@ 2016-04-22 19:00   ` Julia Lawall
  2016-04-22 19:10     ` Jon Hunter
  0 siblings, 1 reply; 7+ messages in thread
From: Julia Lawall @ 2016-04-22 19:00 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Jiang Liu, Marc Zyngier, Thomas Gleixner, linux-kernel,
	kbuild-all



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
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] irqdomain: fix compare_const_fl.cocci warnings
  2016-04-22 19:00   ` Julia Lawall
@ 2016-04-22 19:10     ` Jon Hunter
  0 siblings, 0 replies; 7+ messages in thread
From: Jon Hunter @ 2016-04-22 19:10 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jiang Liu, Marc Zyngier, Thomas Gleixner, linux-kernel,
	kbuild-all


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-04-22 19:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20 16:49 [PATCH] irqdomain: fix compare_const_fl.cocci warnings Julia Lawall
2016-04-20 17:19 ` Marc Zyngier
2016-04-22 17:42 ` Thomas Gleixner
2016-04-22 18:59   ` Julia Lawall
2016-04-22 18:21 ` Jon Hunter
2016-04-22 19:00   ` Julia Lawall
2016-04-22 19:10     ` Jon Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox