Skip to contentSkip to conversation

mfd: tps65217: Drop call to irq_set_parent()

PATCH In review Guenter Roeck 3 participants 6 messages Oct 14, 2016 – Nov 9, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: tps65217: Drop call to irq_set_parent()

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 <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)
drivers/mfd/tps65217.c +0 -1
index 9a4d8684dd32..2a57b444859c 100644
@@ -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;
Signature · 1 line
2.5.0
#1 lore raw
Quoted 14 lines · Guenter Roeck

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.

Quoted 8 lines
Fixes 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
Cc Marcin Niestroj <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)

This has been fixed now.

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

Quoted 12 lines
drivers/mfd/tps65217.c +0 -1
index 9a4d8684dd32..2a57b444859c 100644
@@ -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;
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#2 lore raw
Quoted 25 lines · Lee Jones
Quoted 14 lines · Guenter Roeck

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.

Quoted 8 lines
Fixes 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
Cc Marcin Niestroj <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 1 line

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

#3 lore raw
Quoted 26 lines · Thomas Gleixner
Quoted 25 lines · Lee Jones
Quoted 22 lines · Guenter Roeck

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 <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 7 lines
Quoted 1 line

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!

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#4 lore raw
Quoted 33 lines · Lee Jones
Quoted 31 lines · Thomas Gleixner
Quoted 25 lines · Lee Jones
Quoted 14 lines · Guenter Roeck

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.

Quoted 8 lines
Fixes 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
Cc Marcin Niestroj <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 1 line

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.

Quoted 7 lines
Quoted 2 lines

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

#5 lore raw
Quoted 46 lines · Guenter Roeck
Quoted 33 lines · Lee Jones
Quoted 31 lines · Thomas Gleixner
Quoted 25 lines · Lee Jones
Quoted 14 lines · Guenter Roeck

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.

Quoted 8 lines
Fixes 6556bdacf646f ("mfd: tps65217: Add support for IRQs")
Cc Marcin Niestroj <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Thomas Gleixner <[email protected]>
---
 drivers/mfd/tps65217.c | 1 -
 1 file changed, 1 deletion(-)
Quoted 1 line

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.

Quoted 7 lines
Quoted 2 lines

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.

Quoted 5 lines

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?

Quoted 13 lines

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

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