Thread (5 messages) flat view 5 messages, 4 authors, 2021-02-17

Re: [PATCH] of: property: fw_devlink: Ignore interrupts property for some configs

From: Enrico Weigelt, metux IT consult <hidden>
Date: 2021-02-16 20:23:25
Also in: lkml

On 15.02.21 23:42, Saravana Kannan wrote:

Hi,
quoted hunk ↗ jump to hunk
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 79b68519fe30..5036a362f52e 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1300,6 +1300,9 @@ static struct device_node *parse_interrupts(struct device_node *np,
  {
  	struct of_phandle_args sup_args;
  
+	if (!IS_ENABLED(CONFIG_OF_IRQ) || IS_ENABLED(CONFIG_PPC))
+		return NULL;
+
  	if (strcmp(prop_name, "interrupts") &&
  	    strcmp(prop_name, "interrupts-extended"))
  		return NULL;
wouldn't it be better to #ifdef-out the whole code in this case ?


--mtx


-- 
---
Hinweis: unverschlüsselte E-Mails können leicht abgehört und manipuliert
werden ! Für eine vertrauliche Kommunikation senden Sie bitte ihren
GPG/PGP-Schlüssel zu.
---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help