linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: tps65217: Drop call to irq_set_parent()
@ 2016-10-14 21:18 Guenter Roeck
  2016-10-26 12:35 ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2016-10-14 21:18 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Lee Jones, linux-omap, linux-kernel, Guenter Roeck,
	Marcin Niestroj, Arnd Bergmann, Thomas Gleixner

The call to irq_set_parent() causes the following build error if tps65217
is built as module.

ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined!

The problem was introduced with commit 6556bdacf646f ("mfd: tps65217: Add
support for IRQs").

The author states: "I have added irq_set_parent() similarly as in
drivers/base/regmap/regmap-irq.c. But to be honest I am not sure what it
really does in case of tps65217."

So let's drop it.

Fixes: 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
index 9a4d8684dd32..2a57b444859c 100644
--- a/drivers/mfd/tps65217.c
+++ b/drivers/mfd/tps65217.c
@@ -170,7 +170,6 @@ static int tps65217_irq_map(struct irq_domain *h, unsigned int virq,
 	irq_set_chip_data(virq, tps);
 	irq_set_chip_and_handler(virq, &tps65217_irq_chip, handle_edge_irq);
 	irq_set_nested_thread(virq, 1);
-	irq_set_parent(virq, tps->irq);
 	irq_set_noprobe(virq);
 
 	return 0;
-- 
2.5.0

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

* Re: [PATCH] mfd: tps65217: Drop call to irq_set_parent()
  2016-10-14 21:18 [PATCH] mfd: tps65217: Drop call to irq_set_parent() Guenter Roeck
@ 2016-10-26 12:35 ` Lee Jones
  2016-10-26 12:38   ` Thomas Gleixner
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2016-10-26 12:35 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Tony Lindgren, linux-omap, linux-kernel, Marcin Niestroj,
	Arnd Bergmann, Thomas Gleixner

On Fri, 14 Oct 2016, Guenter Roeck wrote:

> The call to irq_set_parent() causes the following build error if tps65217
> is built as module.
> 
> ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
> 
> The problem was introduced with commit 6556bdacf646f ("mfd: tps65217: Add
> support for IRQs").
> 
> The author states: "I have added irq_set_parent() similarly as in
> drivers/base/regmap/regmap-irq.c. But to be honest I am not sure what it
> really does in case of tps65217."
> 
> So let's drop it.
> 
> Fixes: 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
> Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/mfd/tps65217.c | 1 -
>  1 file changed, 1 deletion(-)

This has been fixed now.

3118dac501bc ("kernel/irq: Export irq_set_parent()")

> diff --git a/drivers/mfd/tps65217.c b/drivers/mfd/tps65217.c
> index 9a4d8684dd32..2a57b444859c 100644
> --- a/drivers/mfd/tps65217.c
> +++ b/drivers/mfd/tps65217.c
> @@ -170,7 +170,6 @@ static int tps65217_irq_map(struct irq_domain *h, unsigned int virq,
>  	irq_set_chip_data(virq, tps);
>  	irq_set_chip_and_handler(virq, &tps65217_irq_chip, handle_edge_irq);
>  	irq_set_nested_thread(virq, 1);
> -	irq_set_parent(virq, tps->irq);
>  	irq_set_noprobe(virq);
>  
>  	return 0;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: tps65217: Drop call to irq_set_parent()
  2016-10-26 12:35 ` Lee Jones
@ 2016-10-26 12:38   ` Thomas Gleixner
  2016-10-26 12:58     ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2016-10-26 12:38 UTC (permalink / raw)
  To: Lee Jones
  Cc: Guenter Roeck, Tony Lindgren, linux-omap, linux-kernel,
	Marcin Niestroj, Arnd Bergmann

On Wed, 26 Oct 2016, Lee Jones wrote:
> On Fri, 14 Oct 2016, Guenter Roeck wrote:
> 
> > The call to irq_set_parent() causes the following build error if tps65217
> > is built as module.
> > 
> > ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
> > 
> > The problem was introduced with commit 6556bdacf646f ("mfd: tps65217: Add
> > support for IRQs").
> > 
> > The author states: "I have added irq_set_parent() similarly as in
> > drivers/base/regmap/regmap-irq.c. But to be honest I am not sure what it
> > really does in case of tps65217."
> > 
> > So let's drop it.
> > 
> > Fixes: 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
> > Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> >  drivers/mfd/tps65217.c | 1 -
> >  1 file changed, 1 deletion(-)
> 
> This has been fixed now.

It was not fixed. The export was a work around as everyone was bitching
about the build robots failing forever.
 
So if the irq_set_parent() call is not required for functionality of the
driver then it should not be there in the first place.

Thanks,

	tglx

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

* Re: [PATCH] mfd: tps65217: Drop call to irq_set_parent()
  2016-10-26 12:38   ` Thomas Gleixner
@ 2016-10-26 12:58     ` Lee Jones
  2016-10-26 13:24       ` Guenter Roeck
  0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2016-10-26 12:58 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Guenter Roeck, Tony Lindgren, linux-omap, linux-kernel,
	Marcin Niestroj, Arnd Bergmann

On Wed, 26 Oct 2016, Thomas Gleixner wrote:

> On Wed, 26 Oct 2016, Lee Jones wrote:
> > On Fri, 14 Oct 2016, Guenter Roeck wrote:
> > 
> > > The call to irq_set_parent() causes the following build error if tps65217
> > > is built as module.
> > > 
> > > ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
> > > 
> > > The problem was introduced with commit 6556bdacf646f ("mfd: tps65217: Add
> > > support for IRQs").
> > > 
> > > The author states: "I have added irq_set_parent() similarly as in
> > > drivers/base/regmap/regmap-irq.c. But to be honest I am not sure what it
> > > really does in case of tps65217."
> > > 
> > > So let's drop it.
> > > 
> > > Fixes: 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
> > > Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
> > > Cc: Arnd Bergmann <arnd@arndb.de>
> > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > > ---
> > >  drivers/mfd/tps65217.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > 
> > This has been fixed now.
> 
> It was not fixed. The export was a work around as everyone was bitching
> about the build robots failing forever.
>  
> So if the irq_set_parent() call is not required for functionality of the
> driver then it should not be there in the first place.

Ah, I thought this was just another one of the many hacks I received
in response to the auto-builder's complains.  I've just been NACKing
them out of habit.

However, if is it true that we can simply just remove the call to
irq_set_parent(), then I'm happy to apply the patch.

Even happier with an Ack from you!

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] mfd: tps65217: Drop call to irq_set_parent()
  2016-10-26 12:58     ` Lee Jones
@ 2016-10-26 13:24       ` Guenter Roeck
  2016-11-09 15:08         ` Lee Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2016-10-26 13:24 UTC (permalink / raw)
  To: Lee Jones, Thomas Gleixner
  Cc: Tony Lindgren, linux-omap, linux-kernel, Marcin Niestroj, Arnd Bergmann

On 10/26/2016 05:58 AM, Lee Jones wrote:
> On Wed, 26 Oct 2016, Thomas Gleixner wrote:
>
>> On Wed, 26 Oct 2016, Lee Jones wrote:
>>> On Fri, 14 Oct 2016, Guenter Roeck wrote:
>>>
>>>> The call to irq_set_parent() causes the following build error if tps65217
>>>> is built as module.
>>>>
>>>> ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
>>>>
>>>> The problem was introduced with commit 6556bdacf646f ("mfd: tps65217: Add
>>>> support for IRQs").
>>>>
>>>> The author states: "I have added irq_set_parent() similarly as in
>>>> drivers/base/regmap/regmap-irq.c. But to be honest I am not sure what it
>>>> really does in case of tps65217."
>>>>
>>>> So let's drop it.
>>>>
>>>> Fixes: 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
>>>> Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
>>>> Cc: Arnd Bergmann <arnd@arndb.de>
>>>> Cc: Thomas Gleixner <tglx@linutronix.de>
>>>> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
>>>> ---
>>>>  drivers/mfd/tps65217.c | 1 -
>>>>  1 file changed, 1 deletion(-)
>>>
>>> This has been fixed now.
>>
>> It was not fixed. The export was a work around as everyone was bitching
>> about the build robots failing forever.
>>
>> So if the irq_set_parent() call is not required for functionality of the
>> driver then it should not be there in the first place.
>
> Ah, I thought this was just another one of the many hacks I received
> in response to the auto-builder's complains.  I've just been NACKing
> them out of habit.
>

Well, it was, in a way. However, with the driver author being silent,
and with irq_set_parent() not that well documented, I considered it
a better solution than blindly exporting the function.

Having said that, I do suspect that its use might possibly be warranted
in this case, since the driver uses edge triggered interrupts and calls
handle_nested_irq(). But then many other drivers do the same and don't
call irq_set_parent(), so who knows. The use case for irq_set_parent()
isn't exactly well explained.

FWIW, since everyone seems to be bitching about auto-builders: You may not
care, but problems like this end up hiding other problems, can make
bisecting a pain, and can end up costing a lot of time in the future.
I have worked for companies where the common attitude was "who cares about
any builds but ours". Sounds great, until one needs to enable one more
configuration option and everything falls apart.

If you don't care about a driver being buildable as module, make it boolean.
Please.

Thanks,
Guenter

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

* Re: [PATCH] mfd: tps65217: Drop call to irq_set_parent()
  2016-10-26 13:24       ` Guenter Roeck
@ 2016-11-09 15:08         ` Lee Jones
  0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2016-11-09 15:08 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Thomas Gleixner, Tony Lindgren, linux-omap, linux-kernel,
	Marcin Niestroj, Arnd Bergmann

On Wed, 26 Oct 2016, Guenter Roeck wrote:

> On 10/26/2016 05:58 AM, Lee Jones wrote:
> > On Wed, 26 Oct 2016, Thomas Gleixner wrote:
> > 
> > > On Wed, 26 Oct 2016, Lee Jones wrote:
> > > > On Fri, 14 Oct 2016, Guenter Roeck wrote:
> > > > 
> > > > > The call to irq_set_parent() causes the following build error if tps65217
> > > > > is built as module.
> > > > > 
> > > > > ERROR: ".irq_set_parent" [drivers/mfd/tps65217.ko] undefined!
> > > > > 
> > > > > The problem was introduced with commit 6556bdacf646f ("mfd: tps65217: Add
> > > > > support for IRQs").
> > > > > 
> > > > > The author states: "I have added irq_set_parent() similarly as in
> > > > > drivers/base/regmap/regmap-irq.c. But to be honest I am not sure what it
> > > > > really does in case of tps65217."
> > > > > 
> > > > > So let's drop it.
> > > > > 
> > > > > Fixes: 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
> > > > > Cc: Marcin Niestroj <m.niestroj@grinn-global.com>
> > > > > Cc: Arnd Bergmann <arnd@arndb.de>
> > > > > Cc: Thomas Gleixner <tglx@linutronix.de>
> > > > > Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> > > > > ---
> > > > >  drivers/mfd/tps65217.c | 1 -
> > > > >  1 file changed, 1 deletion(-)
> > > > 
> > > > This has been fixed now.
> > > 
> > > It was not fixed. The export was a work around as everyone was bitching
> > > about the build robots failing forever.
> > > 
> > > So if the irq_set_parent() call is not required for functionality of the
> > > driver then it should not be there in the first place.
> > 
> > Ah, I thought this was just another one of the many hacks I received
> > in response to the auto-builder's complains.  I've just been NACKing
> > them out of habit.
> > 
> 
> Well, it was, in a way. However, with the driver author being silent,
> and with irq_set_parent() not that well documented, I considered it
> a better solution than blindly exporting the function.
> 
> Having said that, I do suspect that its use might possibly be warranted
> in this case, since the driver uses edge triggered interrupts and calls
> handle_nested_irq(). But then many other drivers do the same and don't
> call irq_set_parent(), so who knows. The use case for irq_set_parent()
> isn't exactly well explained.

Final call; am I taking this patch or not?

> FWIW, since everyone seems to be bitching about auto-builders: You may not
> care, but problems like this end up hiding other problems, can make
> bisecting a pain, and can end up costing a lot of time in the future.
> I have worked for companies where the common attitude was "who cares about
> any builds but ours". Sounds great, until one needs to enable one more
> configuration option and everything falls apart.
> 
> If you don't care about a driver being buildable as module, make it boolean.
> Please.
> 
> Thanks,
> Guenter
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2016-11-09 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 21:18 [PATCH] mfd: tps65217: Drop call to irq_set_parent() Guenter Roeck
2016-10-26 12:35 ` Lee Jones
2016-10-26 12:38   ` Thomas Gleixner
2016-10-26 12:58     ` Lee Jones
2016-10-26 13:24       ` Guenter Roeck
2016-11-09 15:08         ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).