[IA64] Delete iosapic_free_rte()
authorYasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Wed, 18 Jul 2007 06:47:34 +0000 (15:47 +0900)
committerTony Luck <tony.luck@intel.com>
Thu, 19 Jul 2007 21:03:55 +0000 (14:03 -0700)
>   arch/ia64/kernel/iosapic.c:597: warning: 'iosapic_free_rte' defined but not used
>
> This isn't spurious, the only call to iosapic_free_rte() has been removed, but there
> is still a call to iosapic_alloc_rte() ... which means we must have a memory leak.

I did it on purpose (and gave the warning a miss...) and I consider
iosapic_free_rte() is no longer needed.

I decided to remain iosapic_rte_info to keep gsi-to-irq binding
after device disable. Indeed it needs some extra memory, but it
is only "sizeof(iosapic_rte_info) * <the number of removed devices>"
bytes and has no memory leak becasue re-enabled devices use the
iosapic_rte_info which they used before disabling.

Signed-off-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/iosapic.c

index c101c8bff27b6205d582d1ee546094865eadfd6e..91e6dc1e7baf8d37ddd91c340c0b8c753cfed16d 100644 (file)
@@ -593,14 +593,6 @@ static struct iosapic_rte_info *iosapic_alloc_rte (void)
        return rte;
 }
 
        return rte;
 }
 
-static void iosapic_free_rte (struct iosapic_rte_info *rte)
-{
-       if (rte->flags & RTE_PREALLOCATED)
-               list_add_tail(&rte->rte_list, &free_rte_list);
-       else
-               kfree(rte);
-}
-
 static inline int irq_is_shared (int irq)
 {
        return (iosapic_intr_info[irq].count > 1);
 static inline int irq_is_shared (int irq)
 {
        return (iosapic_intr_info[irq].count > 1);