patch 'bus/dpaa: remove redundant file descriptor check' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:48:43 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=d21248db895951d5efbbb77c5ca0d936fed30675

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From d21248db895951d5efbbb77c5ca0d936fed30675 Mon Sep 17 00:00:00 2001
From: Rohit Raj <rohit.raj at nxp.com>
Date: Wed, 10 Jul 2024 14:25:31 +0530
Subject: [PATCH] bus/dpaa: remove redundant file descriptor check
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]

This patch removes the redundant file descriptor check.

Coverity issue: 425715
Fixes: 2f3d633aa593 ("common/dpaax: add library for PA/VA translation table")

Signed-off-by: Rohit Raj <rohit.raj at nxp.com>
Signed-off-by: Vanshika Shukla <vanshika.shukla at nxp.com>
---
 drivers/bus/dpaa/base/qbman/process.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 3504ec97db..3e4622f606 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
  *
  * Copyright 2011-2016 Freescale Semiconductor Inc.
- * Copyright 2017,2020 NXP
+ * Copyright 2017,2020,2022,2024 NXP
  *
  */
 #include <assert.h>
@@ -27,15 +27,16 @@ static int check_fd(void)
 {
 	int ret;
 
-	if (fd >= 0)
-		return 0;
 	ret = pthread_mutex_lock(&fd_init_lock);
 	assert(!ret);
+
 	/* check again with the lock held */
 	if (fd < 0)
 		fd = open(PROCESS_PATH, O_RDWR);
+
 	ret = pthread_mutex_unlock(&fd_init_lock);
 	assert(!ret);
+
 	return (fd >= 0) ? 0 : -ENODEV;
 }
 
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:04.043643478 +0800
+++ 0046-bus-dpaa-remove-redundant-file-descriptor-check.patch	2024-08-12 20:44:02.025069281 +0800
@@ -1 +1 @@
-From 0ca2093f6b3608467bebe9caf27ce98671fb3381 Mon Sep 17 00:00:00 2001
+From d21248db895951d5efbbb77c5ca0d936fed30675 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 0ca2093f6b3608467bebe9caf27ce98671fb3381 ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 59e0d641ce..2d805c5bd9 100644
+index 3504ec97db..3e4622f606 100644
@@ -31 +33 @@
-@@ -28,15 +28,16 @@ static int check_fd(void)
+@@ -27,15 +27,16 @@ static int check_fd(void)


More information about the stable mailing list