Skip to contentSkip to conversation

XEN: remove undefined functions

PATCH In review Jaswinder Singh Rajput 2 participants 2 messages Aug 25, 2009

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

PATCH 1/1 XEN: remove undefined functions

mk_pirq_info(), gsi_from_irq() and vector_from_irq() are static functions and no one is calling them.

This fixed following compilation warnings :

drivers/xen/events.c:134: warning: ‘mk_pirq_info’ defined but not used drivers/xen/events.c:180: warning: ‘gsi_from_irq’ defined but not used drivers/xen/events.c:190: warning: ‘vector_from_irq’ defined but not used

---
 drivers/xen/events.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)
drivers/xen/events.c +0 -27
index abad71b..d43957a 100644
@@ -131,13 +131,6 @@ static struct irq_info mk_virq_info(unsigned short evtchn, unsigned short virq)
 			.cpu = 0, .u.virq = virq };
 }
 
-static struct irq_info mk_pirq_info(unsigned short evtchn,
-				    unsigned short gsi, unsigned short vector)
-{
-	return (struct irq_info) { .type = IRQT_PIRQ, .evtchn = evtchn,
-			.cpu = 0, .u.pirq = { .gsi = gsi, .vector = vector } };
-}
-
 /*
  * Accessors for packed IRQ information.
  */
@@ -177,26 +170,6 @@ static unsigned virq_from_irq(unsigned irq)
 	return info->u.virq;
 }
 
-static unsigned gsi_from_irq(unsigned irq)
-{
-	struct irq_info *info = info_for_irq(irq);
-
-	BUG_ON(info == NULL);
-	BUG_ON(info->type != IRQT_PIRQ);
-
-	return info->u.pirq.gsi;
-}
-
-static unsigned vector_from_irq(unsigned irq)
-{
-	struct irq_info *info = info_for_irq(irq);
-
-	BUG_ON(info == NULL);
-	BUG_ON(info->type != IRQT_PIRQ);
-
-	return info->u.pirq.vector;
-}
-
 static enum xen_irq_type type_from_irq(unsigned irq)
 {
 	return info_for_irq(irq)->type;
Signature · 1 line
1.6.2.5
#1 lore raw
Quoted 11 lines · Jaswinder Singh Rajput

mk_pirq_info(), gsi_from_irq() and vector_from_irq() are static functions and no one is calling them.

This fixed following compilation warnings :

drivers/xen/events.c:134: warning: ‘mk_pirq_info’ defined but not used drivers/xen/events.c:180: warning: ‘gsi_from_irq’ defined but not used drivers/xen/events.c:190: warning: ‘vector_from_irq’ defined but not used

Hm, they're all about to become used.

J

Quoted 50 lines
---
 drivers/xen/events.c |   27 ---------------------------
 1 files changed, 0 insertions(+), 27 deletions(-)
drivers/xen/events.c +0 -27
index abad71b..d43957a 100644
@@ -131,13 +131,6 @@ static struct irq_info mk_virq_info(unsigned short evtchn, unsigned short virq)
 			.cpu = 0, .u.virq = virq };
 }
 
-static struct irq_info mk_pirq_info(unsigned short evtchn,
-				    unsigned short gsi, unsigned short vector)
-{
-	return (struct irq_info) { .type = IRQT_PIRQ, .evtchn = evtchn,
-			.cpu = 0, .u.pirq = { .gsi = gsi, .vector = vector } };
-}
-
 /*
  * Accessors for packed IRQ information.
  */
@@ -177,26 +170,6 @@ static unsigned virq_from_irq(unsigned irq)
 	return info->u.virq;
 }
 
-static unsigned gsi_from_irq(unsigned irq)
-{
-	struct irq_info *info = info_for_irq(irq);
-
-	BUG_ON(info == NULL);
-	BUG_ON(info->type != IRQT_PIRQ);
-
-	return info->u.pirq.gsi;
-}
-
-static unsigned vector_from_irq(unsigned irq)
-{
-	struct irq_info *info = info_for_irq(irq);
-
-	BUG_ON(info == NULL);
-	BUG_ON(info->type != IRQT_PIRQ);
-
-	return info->u.pirq.vector;
-}
-
 static enum xen_irq_type type_from_irq(unsigned irq)
 {
 	return info_for_irq(irq)->type;