From 4ed5d04734a2c4d80acc582ab72c7c5225b2e7e3 Mon Sep 17 00:00:00 2001 From: Yunfeng Ye Date: Sun, 10 Nov 2019 22:08:25 +0000 Subject: [PATCH 43/53] irqbalance: remove redundancy check in add_one_irq_to_db() Before calling add_one_irq_to_db(), it has been checked by calling get_irq_info(), so remove unnecessary redundancy check. Signed-off-by: Yunfeng Ye --- classify.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/classify.c b/classify.c index 90b0f30..c99e0f7 100644 --- a/classify.c +++ b/classify.c @@ -285,17 +285,6 @@ void add_cl_banned_irq(int irq) add_banned_irq(irq, &cl_banned_irqs); } -static int is_banned_irq(int irq) -{ - GList *entry; - struct irq_info find; - - find.irq = irq; - - entry = g_list_find_custom(banned_irqs, &find, compare_ints); - return entry ? 1:0; -} - gint substr_find(gconstpointer a, gconstpointer b) { if (strstr(b, a)) @@ -340,21 +329,6 @@ static struct irq_info *add_one_irq_to_db(const char *devpath, struct irq_info * struct irq_info *new; int numa_node; char path[PATH_MAX]; - GList *entry; - - /* - * First check to make sure this isn't a duplicate entry - */ - entry = g_list_find_custom(interrupts_db, hint, compare_ints); - if (entry) { - log(TO_CONSOLE, LOG_INFO, "DROPPING DUPLICATE ENTRY FOR IRQ %d on path %s\n", irq, devpath); - return NULL; - } - - if (is_banned_irq(irq)) { - log(TO_ALL, LOG_INFO, "SKIPPING BANNED IRQ %d\n", irq); - return NULL; - } new = calloc(1, sizeof(struct irq_info)); if (!new) -- 2.23.0