File remove-unused-path-in-check_for_irq_ban.patch of Package irqbalance.27245

From: liuchao173 <55137861+liuchao173@users.noreply.github.com>
Subject: remove unused path in check_for_irq_ban
References: bsc#1204961
Patch-Mainline: v1.7.0
Git-commit: 9e6048da9767b9695d3bd5d95bfa604a358b2cf2
Git-repo: https://github.com/Irqbalance/irqbalance.git.git

that path variable is actually unused in check_for_irq_ban. And in build_one_dev_entry, sometimes the path is a file, sometimes it's a path. So remove the path variable entirely.

Signed-off-by:  <trenn@suse.com>
Index: irqbalance-1.4.0/classify.c
===================================================================
--- irqbalance-1.4.0.orig/classify.c
+++ irqbalance-1.4.0/classify.c
@@ -547,7 +547,7 @@ static int check_for_module_ban(char *na
 		return 0;
 }
 
-static int check_for_irq_ban(char *path __attribute__((unused)), int irq, GList *proc_interrupts)
+static int check_for_irq_ban(int irq, GList *proc_interrupts)
 {
 	struct irq_info find, *res;
 	GList *entry;
@@ -633,7 +633,7 @@ static void build_one_dev_entry(const ch
 				if (new)
 					continue;
 				get_irq_user_policy(devpath, irqnum, &pol);
-				if ((pol.ban == 1) || (check_for_irq_ban(devpath, irqnum, tmp_irqs))) {
+				if ((pol.ban == 1) || (check_for_irq_ban(irqnum, tmp_irqs))) {
 					add_banned_irq(irqnum, &banned_irqs);
 					continue;
 				}
@@ -666,8 +666,8 @@ static void build_one_dev_entry(const ch
 		new = get_irq_info(irqnum);
 		if (new)
 			goto done;
-		get_irq_user_policy(devpath, irqnum, &pol);
-		if ((pol.ban == 1) || (check_for_irq_ban(path, irqnum, tmp_irqs))) {
+		get_irq_user_policy(irqnum, &pol);
+		if ((pol.ban == 1) || (check_for_irq_ban(irqnum, tmp_irqs))) {
 			add_banned_irq(irqnum, &banned_irqs);
 			goto done;
 		}
@@ -718,7 +718,7 @@ static void add_new_irq(int irq, struct
 
 	/* Set NULL devpath for the irq has no sysfs entries */
 	get_irq_user_policy(NULL, irq, &pol);
-	if ((pol.ban == 1) || check_for_irq_ban(NULL, irq, proc_interrupts)) { /*FIXME*/
+	if ((pol.ban == 1) || check_for_irq_ban(irq, proc_interrupts)) { /*FIXME*/
 		add_banned_irq(irq, &banned_irqs);
 		new = get_irq_info(irq);
 	} else
openSUSE Build Service is sponsored by