56 lines
2.1 KiB
Diff
56 lines
2.1 KiB
Diff
|
|
From 9e6048da9767b9695d3bd5d95bfa604a358b2cf2 Mon Sep 17 00:00:00 2001
|
||
|
|
From: liuchao173 <55137861+liuchao173@users.noreply.github.com>
|
||
|
|
Date: Fri, 20 Sep 2019 10:15:51 +0800
|
||
|
|
Subject: [PATCH 15/53] remove unused path in check_for_irq_ban
|
||
|
|
|
||
|
|
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.
|
||
|
|
---
|
||
|
|
classify.c | 10 +++++-----
|
||
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/classify.c b/classify.c
|
||
|
|
index 9b0177d..15d0ab2 100644
|
||
|
|
--- a/classify.c
|
||
|
|
+++ b/classify.c
|
||
|
|
@@ -599,7 +599,7 @@ static int check_for_module_ban(char *name)
|
||
|
|
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;
|
||
|
|
@@ -658,7 +658,7 @@ static void build_one_dev_entry(const char *dirname, GList *tmp_irqs)
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
@@ -692,8 +692,8 @@ static void build_one_dev_entry(const char *dirname, GList *tmp_irqs)
|
||
|
|
new = get_irq_info(irqnum);
|
||
|
|
if (new)
|
||
|
|
goto done;
|
||
|
|
- get_irq_user_policy(devpath, irqnum, &pol);
|
||
|
|
- if ((pol.ban == 1) || (check_for_irq_ban(devpath, 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;
|
||
|
|
}
|
||
|
|
@@ -745,7 +745,7 @@ static void add_new_irq(int irq, struct irq_info *hint, GList *proc_interrupts)
|
||
|
|
|
||
|
|
/* 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
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|