From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 445E3A034C for ; Fri, 25 Feb 2022 18:16:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CB34410FD; Fri, 25 Feb 2022 18:16:16 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 8859F4113D for ; Fri, 25 Feb 2022 18:16:15 +0100 (CET) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 6E9BB3F1F3 for ; Fri, 25 Feb 2022 17:16:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809375; bh=FTc6ceJLjgUX6ImJ5nDcjmvqI3U4Iw/8tYN+LkfdU7A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=M4eB/Bbu31DmAKbLr9XaScrE1b5r4aeGaX7OAs5TTxvFhRPeSsUxOvplVeoElDePr HASyMy37cVFVRecCcLAZ/cdnSoZbjfKBGaLLaMjLT2VvqEmKAsHM+/gibAn11la/QO 7K4JHvvwFLG6lfaw8IkiWC7d4x9YM4bzcsCj8OSCe1nlBkJq2/B5+hLIiY2xED90cA 7oOU8M8Fh5C4eAWcweCJgnorNo0RzyYMv4J+aFRlKhVD4hPvQMXSJopG9N2tZ849ca eeGo05dgi6nMvK0G1dwAJuq1CR8YSbLduoXA0iH1KCoV2GNZXVWYXANhmnR7Eh1t6T oNGoJvEJI7v0w== Received: by mail-wm1-f72.google.com with SMTP id p20-20020a05600c1d9400b003810032294fso270664wms.3 for ; Fri, 25 Feb 2022 09:16:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FTc6ceJLjgUX6ImJ5nDcjmvqI3U4Iw/8tYN+LkfdU7A=; b=sPp0bnNpNHEEnUuhQNcTKc1SfyeK0+WCmNUvQ+zCioarmlPR5NIw1XNfqjntq8o6O/ gZF3Ls0QmQHOXvjSq1t1B0QuuQVoGcn0mCOqzg23Y+/YkbfaWFqzgfcD/WE2EcIqgghE livieamRAM5q/gSz0yrnzLUhRKD4O31+scgl8ETvtMhStV2TW5yN66Y7d7L1dO2aQNjU IYvhfmvLQAoslfASZSXzr/4oEi31BWI/7kYtYof2hUz3kZO4VtSEhOXg5x39tVvyFAa3 7/yslEnoAh5GNdrieizFbEW6M+wNkyRnosI/NkrtpEaMgP1c4h8GCgfTZdnb77XwhWN7 nX0w== X-Gm-Message-State: AOAM533JP6eiaB9k7a4fm9gSmsNEhFMXZYmLl+bnR3gqyRcV/1RmTjpJ Jxdkq6K1j4b0zU9jfEFqSanY/8s68XPliMfBqW5NTmpdvj63JLnhp110kmBb/3M61mC6zAMqKo5 rx9CEjQep1sfMHLiv5EArBFAB X-Received: by 2002:a05:6000:178c:b0:1ea:7c28:d45d with SMTP id e12-20020a056000178c00b001ea7c28d45dmr7029742wrg.604.1645809374957; Fri, 25 Feb 2022 09:16:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNiYX+zK1u+OieKyzToCY7ctDnwB5vWougWROExQbAD7n+bpc+5QrQQd+Rt1BHfnaOgh7dlQ== X-Received: by 2002:a05:6000:178c:b0:1ea:7c28:d45d with SMTP id e12-20020a056000178c00b001ea7c28d45dmr7029730wrg.604.1645809374751; Fri, 25 Feb 2022 09:16:14 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id s3-20020a5d4ec3000000b001ea95eba44dsm2625340wrv.109.2022.02.25.09.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:16:13 -0800 (PST) From: christian.ehrhardt@canonical.com To: Maxime Gouin Cc: Olivier Matz , Kevin Traynor , Rosen Xu , dpdk stable Subject: patch 'bus/ifpga: remove useless check while browsing devices' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:01 +0100 Message-Id: <20220225171550.3499040-8-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.12 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/27/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/47065be22622b9634d2bb0be00bd21097eb42e37 Thanks. Christian Ehrhardt --- >From 47065be22622b9634d2bb0be00bd21097eb42e37 Mon Sep 17 00:00:00 2001 From: Maxime Gouin Date: Wed, 5 Jan 2022 11:26:52 +0100 Subject: [PATCH] bus/ifpga: remove useless check while browsing devices [ upstream commit 62c21c38a26e654bba09be147ea2d61c2e699a13 ] reported by code analysis tool C++test (version 10.4): /build/dpdk-20.11/drivers/bus/ifpga/ifpga_bus.c 67 Condition "afu_dev" is always evaluated to true 81 Condition "afu_dev" is always evaluated to true The "for" loop already checks that afu_dev is not NULL. Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Signed-off-by: Maxime Gouin Reviewed-by: Olivier Matz Acked-by: Kevin Traynor Acked-by: Rosen Xu --- drivers/bus/ifpga/ifpga_bus.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index addbc3e86b..1d9e63dab0 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -66,8 +66,7 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev, struct rte_afu_device *afu_dev = NULL; TAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) { - if (afu_dev && - afu_dev->rawdev == rdev && + if (afu_dev->rawdev == rdev && !ifpga_afu_id_cmp(&afu_dev->id, afu_id)) return afu_dev; } @@ -80,8 +79,7 @@ rte_ifpga_find_afu_by_name(const char *name) struct rte_afu_device *afu_dev = NULL; TAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) { - if (afu_dev && - !strcmp(afu_dev->device.name, name)) + if (!strcmp(afu_dev->device.name, name)) return afu_dev; } return NULL; -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:44.611397719 +0100 +++ 0008-bus-ifpga-remove-useless-check-while-browsing-device.patch 2022-02-25 16:58:44.196990375 +0100 @@ -1 +1 @@ -From 62c21c38a26e654bba09be147ea2d61c2e699a13 Mon Sep 17 00:00:00 2001 +From 47065be22622b9634d2bb0be00bd21097eb42e37 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 62c21c38a26e654bba09be147ea2d61c2e699a13 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index cbc6809284..c5c8bbd572 100644 +index addbc3e86b..1d9e63dab0 100644 @@ -29 +30 @@ -@@ -64,8 +64,7 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev, +@@ -66,8 +66,7 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev, @@ -39 +40 @@ -@@ -78,8 +77,7 @@ rte_ifpga_find_afu_by_name(const char *name) +@@ -80,8 +79,7 @@ rte_ifpga_find_afu_by_name(const char *name)