irqbalance/backport-Fix-compile-issue-with-none-AARCH64-builds.patch
qinyu 46b5a2ed8f irqbalance: procinterrupts: Fix IRQ name parsing on certain arm64 SoC
procinterrupts: Fix IRQ name parsing on certain arm64 SoC

Signed-off-by: qinyu <qinyu32@huawei.com>
2022-12-09 10:30:11 +08:00

50 lines
1.7 KiB
Diff
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From ee6b3bdd15fdbaf5d6060c3c2df4e7e69dafbd06 Mon Sep 17 00:00:00 2001
From: Michael Neuling <mikey@neuling.org>
Date: Wed, 28 Apr 2021 10:24:05 +1000
Subject: [PATCH] Fix compile issue with none AARCH64 builds
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Reference: https://github.com/Irqbalance/irqbalance/commit/ee6b3bdd15fdbaf5d6060c3c2df4e7e69dafbd06
Conflict: NA
This recent commit broke compiling on non AARCH64 architectures:
commit d17bcc953c513f93553f531e5444553f2bf6ca46
Author: liuchao173 <55137861+liuchao173@users.noreply.github.com>
Date: Tue Apr 27 15:36:30 2021 +0800
Fix irqbalance cannot obtain the full name of irq
This results in:
procinterrupts.c:186:11: error: irq_fullname undeclared (first use in this function); did you mean irq_name?
186 | snprintf(irq_fullname, PATH_MAX, "%s", last_token);
| ^~~~~~~~~~~~
| irq_name
procinterrupts.c:186:11: note: each undeclared identifier is reported only once for each function it appears in
This fixes it.
Signed-off-by: Michael Neuling <mikey@neuling.org>
---
procinterrupts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/procinterrupts.c b/procinterrupts.c
index 8673f2d..e372671 100644
--- a/procinterrupts.c
+++ b/procinterrupts.c
@@ -152,9 +152,9 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq)
char *last_token = NULL;
char *p = NULL;
int is_xen_dyn = 0;
+ char irq_fullname[PATH_MAX] = {0};
#ifdef AARCH64
char *tmp = NULL;
- char irq_fullname[PATH_MAX] = {0};
#endif
irq_name = strtok_r(savedline, " ", &savedptr);
--
2.33.0