Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105654/?format=api
http://patchwork.dpdk.org/api/patches/105654/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220105102652.6400-1-maxime.gouin@6wind.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220105102652.6400-1-maxime.gouin@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220105102652.6400-1-maxime.gouin@6wind.com", "date": "2022-01-05T10:26:52", "name": "bus/ifpga: remove useless check while browsing devices", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "4a8d04616ab504c3ddf4b068206e3602b51371cd", "submitter": { "id": 2472, "url": "http://patchwork.dpdk.org/api/people/2472/?format=api", "name": "Maxime Gouin", "email": "maxime.gouin@6wind.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220105102652.6400-1-maxime.gouin@6wind.com/mbox/", "series": [ { "id": 21081, "url": "http://patchwork.dpdk.org/api/series/21081/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21081", "date": "2022-01-05T10:26:52", "name": "bus/ifpga: remove useless check while browsing devices", "version": 1, "mbox": "http://patchwork.dpdk.org/series/21081/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/105654/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/105654/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 270E2A034D;\n\tThu, 6 Jan 2022 09:41:36 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9EBBB406B4;\n\tThu, 6 Jan 2022 09:41:35 +0100 (CET)", "from mail-wm1-f68.google.com (mail-wm1-f68.google.com\n [209.85.128.68]) by mails.dpdk.org (Postfix) with ESMTP id 668BE4014F\n for <dev@dpdk.org>; Wed, 5 Jan 2022 11:27:06 +0100 (CET)", "by mail-wm1-f68.google.com with SMTP id\n p1-20020a1c7401000000b00345c2d068bdso1537881wmc.3\n for <dev@dpdk.org>; Wed, 05 Jan 2022 02:27:06 -0800 (PST)", "from dokken.dev.6wind.com ([185.13.181.2])\n by smtp.gmail.com with ESMTPSA id n1sm43358898wri.46.2022.01.05.02.27.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 05 Jan 2022 02:27:05 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google;\n h=from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=4gYMR+n/AXlBmXgBbr5YckOiG/d+f8Q0b6b5qlVi6Vk=;\n b=a9N8f9cxB46CTbdFZ3CvGXCl3TpNSA8VTZ8EnsJKm9EKiQhh4x/qnM9rKZlLdFU1As\n D4nxK2nZR039tOtuS2/sFjR7JevA8oZaIlmzTAB0EdlP6YRHbbJWiqKbf8mstGvF6q/A\n Uumm+vAts0h0P1ll+LHKkbvVhdTnJa6d48WzvWwJdPnwL32Baj5sPmy9p7NX29WaP08v\n pNRE1hdpNLMVeFlTfwEI6HI1NtjbIHBMLq9KUXjU8NBEDLe9RDK4gjN/QbT597mkU3qX\n GZAFCjPnQo1+p7P9uFTVAalmoEQGtXHww+HpJB0ItxB/hmPOl3hpj38BA5+k7X5ipvmt\n P63A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=4gYMR+n/AXlBmXgBbr5YckOiG/d+f8Q0b6b5qlVi6Vk=;\n b=kDp/+YiAUHWGV1FZUeOC4wJGjfY8cd2WD6VW3o5S1Hb73cSUdxchzT+GQHVQMjv/o2\n T+DVl25zQ0uBlWGnRoKNfzMyFdcOtuudofwrPuwxNdL3+HR/HchGQnRsU7c1WTCiiwYc\n KwGpiVkT0lmK1jTRw60q+aDjYVQ31moNCldJCn+FYpXOKc6M6JrgSCYCdKdNKh+4MR2B\n WF3Q1pNTEfbWDFAiAit84fx+oxy3dQSzeipZYDe/3J8VtN8mLo4ThJTS3XkTko3IPk8L\n r2Kem7yx3OAnCR+3nQjc/halGZPC9u95WaRE5RRgSwPOQR2ey8VH92dzWqS8b16oCK5e\n DYAg==", "X-Gm-Message-State": "AOAM533URszjLN90puoLxwU/W6Hvk5hyPD2ScmWj7T6i+tDSN78q/DFU\n l69MSvwFvMWbn0v8jeHm+jVdaw9/4/AAQxZAIMs=", "X-Google-Smtp-Source": "\n ABdhPJzqjhouLXtvCzjRdPrGpA0K0vglJjL4ZW7dFNrv8hzRSKmqvdJ6qaOD/N0H1oU8ZQwRZYreTA==", "X-Received": "by 2002:a7b:ce14:: with SMTP id m20mr573842wmc.191.1641378426208;\n Wed, 05 Jan 2022 02:27:06 -0800 (PST)", "From": "Maxime Gouin <maxime.gouin@6wind.com>", "To": "dev@dpdk.org", "Cc": "Maxime Gouin <maxime.gouin@6wind.com>, Rosen Xu <rosen.xu@intel.com>,\n Qi Zhang <qi.z.zhang@intel.com>, Tianfei Zhang <tianfei.zhang@intel.com>,\n Olivier Matz <olivier.matz@6wind.com>", "Subject": "[PATCH] bus/ifpga: remove useless check while browsing devices", "Date": "Wed, 5 Jan 2022 11:26:52 +0100", "Message-Id": "<20220105102652.6400-1-maxime.gouin@6wind.com>", "X-Mailer": "git-send-email 2.30.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Thu, 06 Jan 2022 09:41:34 +0100", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "reported by code analysis tool C++test (version 10.4):\n\n> /build/dpdk-20.11/drivers/bus/ifpga/ifpga_bus.c\n> 67 Condition \"afu_dev\" is always evaluated to true\n> 81 Condition \"afu_dev\" is always evaluated to true\n\nThe \"for\" loop already checks that afu_dev is not NULL.\n\nFixes: 05fa3d4a6539 (\"bus/ifpga: add Intel FPGA bus library\")\n\nSigned-off-by: Maxime Gouin <maxime.gouin@6wind.com>\nReviewed-by: Olivier Matz <olivier.matz@6wind.com>\n---\n drivers/bus/ifpga/ifpga_bus.c | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c\nindex cbc680928486..c5c8bbd57219 100644\n--- a/drivers/bus/ifpga/ifpga_bus.c\n+++ b/drivers/bus/ifpga/ifpga_bus.c\n@@ -64,8 +64,7 @@ ifpga_find_afu_dev(const struct rte_rawdev *rdev,\n \tstruct rte_afu_device *afu_dev = NULL;\n \n \tTAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) {\n-\t\tif (afu_dev &&\n-\t\t\tafu_dev->rawdev == rdev &&\n+\t\tif (afu_dev->rawdev == rdev &&\n \t\t\t!ifpga_afu_id_cmp(&afu_dev->id, afu_id))\n \t\t\treturn afu_dev;\n \t}\n@@ -78,8 +77,7 @@ rte_ifpga_find_afu_by_name(const char *name)\n \tstruct rte_afu_device *afu_dev = NULL;\n \n \tTAILQ_FOREACH(afu_dev, &ifpga_afu_dev_list, next) {\n-\t\tif (afu_dev &&\n-\t\t\t!strcmp(afu_dev->device.name, name))\n+\t\tif (!strcmp(afu_dev->device.name, name))\n \t\t\treturn afu_dev;\n \t}\n \treturn NULL;\n", "prefixes": [] }{ "id": 105654, "url": "