patch 'examples/vm_power_manager: fix const discarding' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 23 19:14:24 CEST 2026


Hi,

FYI, your patch has been queued to stable release 25.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/27/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b3a670e028e14ac019953ec7bf8c14a9c5f3b482

Thanks.

Kevin

---
>From b3a670e028e14ac019953ec7bf8c14a9c5f3b482 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Wed, 1 Apr 2026 11:19:19 +0200
Subject: [PATCH] examples/vm_power_manager: fix const discarding

[ upstream commit 629d136b2501aabb85a49205c049f71ed170c790 ]

When compiling with GCC 15.2.1, a const qualifier issue
is seen with this warning:

In function 'get_resource_name_from_chn_path':
examples/vm_power_manager/channel_monitor.c:139:16:
error: assignment discards 'const' qualifier from pointer target type
  139 | substr = strstr(channel_path, CHANNEL_MGR_FIFO_PATTERN_NAME);
      |        ^

The function get_resource_name_from_chn_path is used only once
and call a single function (strstr),
so it can be replaced with a direct call to strstr().

Fixes: 221e7026d521 ("examples/power: add FIFO per core for JSON interface")

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
 examples/vm_power_manager/channel_monitor.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 800f733a26..3023e444a4 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -132,14 +132,4 @@ set_policy_mac(struct rte_power_channel_packet *pkt, int idx, char *mac)
 }
 
-static char*
-get_resource_name_from_chn_path(const char *channel_path)
-{
-	char *substr = NULL;
-
-	substr = strstr(channel_path, CHANNEL_MGR_FIFO_PATTERN_NAME);
-
-	return substr;
-}
-
 static int
 get_resource_id_from_vmname(const char *vm_name)
@@ -1067,6 +1057,6 @@ read_json_packet(struct channel_info *chan_info)
 
 		if (root) {
-			resource_name = get_resource_name_from_chn_path(
-				chan_info->channel_path);
+			resource_name = strstr(chan_info->channel_path,
+					CHANNEL_MGR_FIFO_PATTERN_NAME);
 			/*
 			 * Because our data is now in the json
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-23 17:57:58.748233725 +0100
+++ 0001-examples-vm_power_manager-fix-const-discarding.patch	2026-07-23 17:57:58.622236913 +0100
@@ -1 +1 @@
-From 629d136b2501aabb85a49205c049f71ed170c790 Mon Sep 17 00:00:00 2001
+From b3a670e028e14ac019953ec7bf8c14a9c5f3b482 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 629d136b2501aabb85a49205c049f71ed170c790 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list