Interrupt flags mismatch check in __setup_irq()

From: Shevchenko, Andriy
Date: Wed Aug 01 2018 - 16:05:13 EST


Recently I have experienced some nasty issue

genirq: Flags mismatch irq 18. 00002000 (intel_mrfld_pwrbtn) vs.
00002000 (bcove_irq_chip_pwrbtn)

but it is not a merit of my message here.

While trying to understand the logic behind real code and what is wished
(based on a comment) I have got differences.

Thus, I wrote small python script [1] to understand better.
I assume it has few false-positives, but I also believe that logic and
comment are not in alignment and we might need to fix logic, comment, or

Can you check that script and tell me if there is (in __setup_irq()
check) an issue or not?


P.S. Small explanation, the functions are mapped to the following logic:

codebase() - repeats what we have in kernel
comment() - my understanding how it's supposed to work
algo() - abstraction of algorithm, so, can be extended thru the RULES

It prints out in case when codebase() != comment() for the same pair of

Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo