* [PATCH 1/1] eal/linux: Remove unused values
2025-01-13 17:19 ` [PATCH 0/1] eal/linux: Remove unused values Ariel Otilibili
@ 2025-01-13 17:19 ` Ariel Otilibili
0 siblings, 0 replies; 2+ messages in thread
From: Ariel Otilibili @ 2025-01-13 17:19 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Thomas Monjalon, David Marchand,
Ariel Otilibili, Didier Pallard, Edwin Brossette, Olivier Matz,
Thierry Herbelot, stable
Found by static analysis:
In dev_uev_socket_fd_create(), fd is assigned before a return,
and not used.
The same for the variables buf and i in dev_uev_parse().
Fixes: c2bd9367e18f ("lib: remove direct access to interrupt handle")
Fixes: 0d0f478d0483 ("eal/linux: add uevent parse and process")
Signed-off-by: Ariel Otilibili <ariel.otilibili@6wind.com>
---
lib/eal/linux/eal_dev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/lib/eal/linux/eal_dev.c b/lib/eal/linux/eal_dev.c
index e63f24d108c7..be97f56424de 100644
--- a/lib/eal/linux/eal_dev.c
+++ b/lib/eal/linux/eal_dev.c
@@ -129,7 +129,6 @@ dev_uev_socket_fd_create(void)
return 0;
err:
close(fd);
- fd = -1;
return ret;
}
@@ -165,8 +164,6 @@ dev_uev_parse(const char *buf, struct rte_dev_event *event, int length)
* uevent from udev.
*/
if (!strncmp(buf, "libudev", 7)) {
- buf += 7;
- i += 7;
return -1;
}
if (!strncmp(buf, "ACTION=", 7)) {
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread