[1/1] eal/linux: Remove unused values

Message ID 20250113171920.1185214-2-ariel.otilibili@6wind.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers
Series eal/linux: Remove unused values |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Ariel Otilibili Jan. 13, 2025, 5:19 p.m. UTC
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(-)
  

Comments

Thomas Monjalon Feb. 12, 2025, 2 p.m. UTC | #1
13/01/2025 18:19, Ariel Otilibili:
> 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>

Applied, thanks.
  
Ariel Otilibili Feb. 13, 2025, 11:12 a.m. UTC | #2
Hi Thomas,

On Wed, Feb 12, 2025 at 3:00 PM Thomas Monjalon <thomas@monjalon.net> wrote:

> Applied, thanks.
>

Thanks for the feedback. Have a good day.
Ariel
  

Patch

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)) {