From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Apeksha Gupta <apeksha.gupta@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Hemant Agrawal <hemant.agrawal@nxp.com>
Subject: [PATCH 5/7] net/enetfec: fix const pointer in UIO filename parsing
Date: Fri, 28 Nov 2025 14:56:13 +0100 [thread overview]
Message-ID: <20251128135616.2662164-6-david.marchand@redhat.com> (raw)
In-Reply-To: <20251128135616.2662164-1-david.marchand@redhat.com>
With latest glibc (Fedora Rawhide):
../drivers/net/enetfec/enet_uio.c: In function 'file_name_match_extract':
../drivers/net/enetfec/enet_uio.c:37:16: warning: assignment discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
37 | substr = strstr(filename, match);
| ^
Fixes: b84fdd39638b ("net/enetfec: support UIO")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/enetfec/enet_uio.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/enetfec/enet_uio.c b/drivers/net/enetfec/enet_uio.c
index f32d5e1b1e..c3917cd9df 100644
--- a/drivers/net/enetfec/enet_uio.c
+++ b/drivers/net/enetfec/enet_uio.c
@@ -32,13 +32,7 @@ static int enetfec_count;
static bool
file_name_match_extract(const char filename[], const char match[])
{
- char *substr = NULL;
-
- substr = strstr(filename, match);
- if (substr == NULL)
- return false;
-
- return true;
+ return strstr(filename, match) != NULL;
}
/*
--
2.51.1
next prev parent reply other threads:[~2025-11-28 13:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 13:56 [PATCH 0/7] Fixes for Fedora Rawhide David Marchand
2025-11-28 13:56 ` [PATCH 1/7] bus/ifpga: fix const pointer in device name parsing David Marchand
2025-11-28 13:56 ` [PATCH 2/7] bus/uacce: fix const pointer in device matching David Marchand
2025-11-28 13:56 ` [PATCH 3/7] drivers: fix some const pointers in qat drivers David Marchand
2025-11-28 13:56 ` [PATCH 4/7] crypto/caam_jr: fix const pointer in UIO filename parsing David Marchand
2025-11-28 14:00 ` Hemant Agrawal
2025-11-28 13:56 ` David Marchand [this message]
2025-11-28 14:00 ` [PATCH 5/7] net/enetfec: " Hemant Agrawal
2025-11-28 13:56 ` [PATCH 6/7] net/memif: fix const pointer in socket check David Marchand
2025-11-28 13:56 ` [PATCH 7/7] app/procinfo: fix const pointer in collectd format David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251128135616.2662164-6-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=apeksha.gupta@nxp.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=hemant.agrawal@nxp.com \
--cc=sachin.saxena@nxp.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).