Skip to contentSkip to conversation

irq:manage.c Fix warning: variable 'old_name' set but not used

PATCH In review Justin P. Mattock 1 participant 2 messages Jul 12, 2010 – Jul 31, 2010 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irq:manage.c Fix warning: variable 'old_name' set but not used

Not sure if this is the right approach with this.. The below fixes a warning message generated by GCC
CC kernel/irq/manage.o
kernel/irq/manage.c: In function '__setup_irq':
kernel/irq/manage.c:652:14: warning: variable 'old_name' set but not used

---
 kernel/irq/manage.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
kernel/irq/manage.c +3 -0
index e149748..99d2f39 100644
@@ -733,6 +733,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
 		if (!((old->flags & new->flags) & IRQF_SHARED) ||
 		    ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
 			old_name = old->name;
+			if(old_name) {
+				printk(KERN_ERR "IRQ mismatch: %d %s\n", IRQF_SHARED, old_name);
+			}	
 			goto mismatch;
 		}
 
Signature · 1 line
1.7.1.rc1.21.gf3bd6
#1 lore raw

haven't heard anything on this.. is this in the vicinity of being a right solution?

Quoted 26 lines

Not sure if this is the right approach with this.. The below fixes a warning message generated by GCC
CC kernel/irq/manage.o
kernel/irq/manage.c: In function '__setup_irq':
kernel/irq/manage.c:652:14: warning: variable 'old_name' set but not used

---
  kernel/irq/manage.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
kernel/irq/manage.c +3 -0
index e149748..99d2f39 100644
@@ -733,6 +733,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
  		if (!((old->flags&  new->flags)&  IRQF_SHARED) ||
  		    ((old->flags ^ new->flags)&  IRQF_TRIGGER_MASK)) {
  			old_name = old->name;
+			if(old_name) {
+				printk(KERN_ERR "IRQ mismatch: %d %s\n", IRQF_SHARED, old_name);
+			}	
  			goto mismatch;
  		}