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 9033DA0032 for ; Fri, 18 Feb 2022 13:39:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BFEA40395; Fri, 18 Feb 2022 13:39:45 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mails.dpdk.org (Postfix) with ESMTP id 77B9841140 for ; Fri, 18 Feb 2022 13:39:44 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id k1so14365448wrd.8 for ; Fri, 18 Feb 2022 04:39:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MWBa8WT/ZvI12s3OfxOVMHD1MzELKybhpLbZhxD3/14=; b=YtSV6GILmlllsrRU7NJ8aIPrxVMYUf+0BCHoORK2bFOTCHxrtcEdoOa8dy6VbsiX5E +EnlJDVCb9EFRhEhj/urcmI/FtkK1/1EnXZKyn3TIxRwN6z9N95NAIosCh011ptUkkR0 WHjxLI/iDnM3olIYB6rl/G6hXJVxKfW6siVrbFne9KhDbMIRXeNysJyuzeJBxmi3rUgw E1CXy2vXaRl8H6zwswStHXO2kF5HWF7DOMw6Gv7raL13qipvYSHe7QD2hstNuBw3ubwA O5LEOlz+MITLy9ZNprpbpwsmrZud9aYtT8GOgMqeCONQgycc7szR13zGJqL7bFy6NUF9 4TRQ== 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=MWBa8WT/ZvI12s3OfxOVMHD1MzELKybhpLbZhxD3/14=; b=tsYIA41OkdGTIngDo1XQKprzgfCtGW6XxUTcg7qcX963uxDUJj/RGqshl/36zn0DbK KHIik7LFo4TbljLv2/hALX2j+302grqBzD5dhRu8hu5pf1BN5HLRLKZSqvSCCEB7KLud v0RmoFqCuGgiTv+687qYhYLHZHDKIZLfMNMh+S7xWlK2TJm4WLX4z+Bl9mlTwNU/Kf5t Bvlv5+6LDFQF7bfZ4T+aa8N/jFKIk2LeR8P9kLWCoYU+/9rTDRbCFKoGcmT7z0omwevO jEYXUv/XyGTp3v5yqUGjV/PHgsSYIF88Vys1UwLf5rOzctOiJf3yhESP7RAT3RSdZBx3 w9Cw== X-Gm-Message-State: AOAM533xq7Q+Mz7ofmH5QNBBYIMzD92xEEvrywrxNxN23SPvzk/csaIR +43kIX1cYFbXCRtWMGapAJ5WAfXCfeWLsQ== X-Google-Smtp-Source: ABdhPJzqcfmPDo8vh7PrjM2ttjAieazhx+B9skfsDw/PLwcQ3jalx658Cc4ueN+vUo9UtPXdxuD28A== X-Received: by 2002:a05:6000:258:b0:1e4:eee1:93b9 with SMTP id m24-20020a056000025800b001e4eee193b9mr6059224wrz.558.1645187984164; Fri, 18 Feb 2022 04:39:44 -0800 (PST) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id w18sm24272513wrl.62.2022.02.18.04.39.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:39:43 -0800 (PST) From: luca.boccassi@gmail.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 20.11.5 Date: Fri, 18 Feb 2022 12:37:34 +0000 Message-Id: <20220218123931.1749595-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.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 20.11.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/4548934a6d392544736c38de8dd314e96a0bb5d7 Thanks. Luca Boccassi --- >From 4548934a6d392544736c38de8dd314e96a0bb5d7 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 bb8b3dcfb9..56e58e04a1 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -64,8 +64,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; } @@ -78,8 +77,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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:38.427311751 +0000 +++ 0005-bus-ifpga-remove-useless-check-while-browsing-device.patch 2022-02-18 12:37:37.498787632 +0000 @@ -1 +1 @@ -From 62c21c38a26e654bba09be147ea2d61c2e699a13 Mon Sep 17 00:00:00 2001 +From 4548934a6d392544736c38de8dd314e96a0bb5d7 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 bb8b3dcfb9..56e58e04a1 100644