backport community patches

Signed-off-by: lvgenggeng <lvgenggeng@uniontech.com>
(cherry picked from commit 39736e9054e0cd4edbe328a201bbadaa8849a698)
This commit is contained in:
lvgenggeng 2024-09-06 11:13:40 +08:00 committed by openeuler-sync-bot
parent d3f4890ab7
commit 557e3f24a4
2 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,69 @@
From 1277ea524354fa628b4189e699af8d62f8be7021 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Sun, 31 Mar 2024 14:18:24 -0700
Subject: [PATCH 1/1] fix 32-bit formats
exposed with -Wformat when building on 32-bit systems
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
placement.c | 2 +-
ui/ui.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/placement.c b/placement.c
index 9fde8cb..dea7c23 100644
--- a/placement.c
+++ b/placement.c
@@ -172,7 +172,7 @@ static void validate_irq(struct irq_info *info, void *data)
{
if (info->assigned_obj != data)
log(TO_CONSOLE, LOG_INFO, "object validation error: irq %d is wrong, points to %p, should be %p\n",
- info->irq, info->assigned_obj, data);
+ info->irq, (void*)info->assigned_obj, data);
}
static void validate_object(struct topo_obj *d, void *data __attribute__((unused)))
diff --git a/ui/ui.c b/ui/ui.c
index bee6868..8354fc6 100644
--- a/ui/ui.c
+++ b/ui/ui.c
@@ -101,7 +101,7 @@ int get_valid_sleep_input(int column_offest)
if(input == NULL) {
curs_set(0);
attrset(COLOR_PAIR(1));
- mvprintw(2, column_offest, "%lu ", new_sleep);
+ mvprintw(2, column_offest, "%" PRIu64 " ", new_sleep);
move(LINES, COLS);
break;
}
@@ -125,7 +125,7 @@ int get_valid_sleep_input(int column_offest)
}
attrset(COLOR_PAIR(1));
- mvprintw(2, column_offest, "%lu ", new_sleep);
+ mvprintw(2, column_offest, "%" PRIu64 " ", new_sleep);
return new_sleep;
}
@@ -296,7 +296,7 @@ void handle_cpu_banning()
case '\r': {
attrset(COLOR_PAIR(3));
int banned = toggle_cpu(tmp, position + offset - 6);
- mvprintw(position, 3, "CPU %d ", position + offset - 6);
+ mvprintw(position, 3, "CPU %zu ", position + offset - 6);
if(banned) {
mvprintw(position, 19, "YES");
} else {
@@ -770,7 +770,7 @@ void display_tree_node_irqs(irq_t *irq, void *data)
if (max_offset >= offset && max_offset - offset < LINES - 5) {
snprintf(indent + strlen(indent), 32 - strlen(indent), "%s", (char *)data);
attrset(COLOR_PAIR(3));
- printw("%sIRQ %u, IRQs since last rebalance %lu\n",
+ printw("%sIRQ %u, IRQs since last rebalance %" PRIu64 "\n",
indent, irq->vector, irq->diff);
}
max_offset++;
--
2.20.1

View File

@ -1,7 +1,7 @@
Summary: A dynamic adaptive IRQ balancing daemon Summary: A dynamic adaptive IRQ balancing daemon
Name: irqbalance Name: irqbalance
Version: 1.9.2 Version: 1.9.2
Release: 5 Release: 6
Epoch: 3 Epoch: 3
License: GPLv2 License: GPLv2
Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/irqbalance-%{version}.tar.gz Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/irqbalance-%{version}.tar.gz
@ -36,6 +36,7 @@ Patch6009: backport-activate_mapping-set-errsave-before-first-jump-to-th.patch
Patch6010: backport-Fix-socket-API-being-blocked-for-10s.patch Patch6010: backport-Fix-socket-API-being-blocked-for-10s.patch
Patch6011: backport-Flush-file-before-closing.patch Patch6011: backport-Flush-file-before-closing.patch
Patch6012: backport-Check-fflush-return-value.patch Patch6012: backport-Check-fflush-return-value.patch
Patch6013: backport-fix-32-bit-formats.patch
Patch9000: feature-aarch64-add-the-regular-to-get-the-correct-i.patch Patch9000: feature-aarch64-add-the-regular-to-get-the-correct-i.patch
Patch9001: feature-add-new-user-irq-policy-config-rule.patch Patch9001: feature-add-new-user-irq-policy-config-rule.patch
@ -132,6 +133,12 @@ fi
/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : /sbin/chkconfig --del %{name} >/dev/null 2>&1 || :
%changelog %changelog
* Fri Sep 06 2024 lvgenggeng <lvgenggeng@uniontech.com> - 3:1.9.2-6
- Type:bugfix
- ID:NA
- SUG:restart
- DESC: fix -Wformat when building on 32-bit systems
* Tue May 07 2024 langfei <langfei@huawei.com> - 3:1.9.2-5 * Tue May 07 2024 langfei <langfei@huawei.com> - 3:1.9.2-5
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA