Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/106289/?format=api
http://patches.dpdk.org/api/patches/106289/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220124000518.319850-51-stephen@networkplumber.org/", "project": { "id": 1, "url": "http://patches.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": "<20220124000518.319850-51-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20220124000518.319850-51-stephen@networkplumber.org", "date": "2022-01-24T00:04:46", "name": "[50/82] net/i40e: remove unnecessary NULL checks", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f93a6fcb10712281879cbfdac1fc34ff33c60085", "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220124000518.319850-51-stephen@networkplumber.org/mbox/", "series": [ { "id": 21315, "url": "http://patches.dpdk.org/api/series/21315/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21315", "date": "2022-01-24T00:03:56", "name": "remove unnecessary null checks", "version": 1, "mbox": "http://patches.dpdk.org/series/21315/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/106289/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/106289/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 87E52A04A6;\n\tMon, 24 Jan 2022 01:09:55 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 94554428BD;\n\tMon, 24 Jan 2022 01:06:19 +0100 (CET)", "from mail-pg1-f177.google.com (mail-pg1-f177.google.com\n [209.85.215.177])\n by mails.dpdk.org (Postfix) with ESMTP id ADBE842833\n for <dev@dpdk.org>; Mon, 24 Jan 2022 01:06:14 +0100 (CET)", "by mail-pg1-f177.google.com with SMTP id e16so4334627pgn.4\n for <dev@dpdk.org>; Sun, 23 Jan 2022 16:06:14 -0800 (PST)", "from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])\n by smtp.gmail.com with ESMTPSA id\n ck21sm10935350pjb.51.2022.01.23.16.06.12\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 23 Jan 2022 16:06:13 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20210112.gappssmtp.com; s=20210112;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=OUYCORe2vUmTo5U+aHVAc4mtCYCEHhtpbL/FAZv929Y=;\n b=YKeitL3n7s9DXaM3vIzdLgX9DQ5O+KIWTCxS9ttkgI9uWgzpl/N2Ekvqe8PQ0LwdTy\n DSKG7K0pAQ4sHfPU+x+63tauVreYUoi604FVf8rHtgtDDRTvOr1T99/ymz2Kat4QzRiH\n e54YkSdgkdOXnqCEzTbh6nNWIAREd27AXaRSsTMBWQbv+0a1ayh8M8xEFQqeZlzIe1Q+\n 0+tIB5JEjY2D84ej+ZzSDyrbGtYtun4Gus9R3zrMgj8RpLKQ5La4iVo2SkFUyAAjZTym\n 3hDdTyLciaGCqQRz9m+EsCZOi7i+5XWEUsWG+r3EDCsZwmMDfXHEXakGXOEXxVboluUC\n ELhw==", "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:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=OUYCORe2vUmTo5U+aHVAc4mtCYCEHhtpbL/FAZv929Y=;\n b=GW5uOZFdMezagAYB8UodVlalrcC2AWSVZjyKNRgROpV5X8P8Zm1OZxxHZeEjZOHi3D\n jP/fvnEoGugHJhGpLktfi596CFQ/g33Q9YzrxhXPojet+0Fu3JSN27elj9YX87cM8qQR\n OfAfrO73Exb7B+/mtiHVS/yH1yvbP/owJKQftEJMS5lQwa1M7rm0s4O4jVrcEfGXzYhJ\n KEgYZkbun5sRz78NOVt+W1qflmcOuXiNvYS/A5URCMnEBPFs98AGK284S74hz1bAfjxV\n mWmUr2ifQsOGaJxLWgcoAhu5vzwfxi2jw7kgWJ1GyiXaDTYjAQhTyBf/I/m1PdcQQoEb\n 14Og==", "X-Gm-Message-State": "AOAM5306LEfSa8vIwWMX0yw/QzzkzRbLbLdxMxeicYM8KdXZoxp5CAqU\n Y3iw63JjGkfC0jFq/LKoAUnRpRF/+JunDw==", "X-Google-Smtp-Source": "\n ABdhPJzXL1ozizXd/i0WTHaWR/FUV67kqb+LrnIrrTBZP9M0O0VLfQPppIQaWDbBdknTlrhvqHvmVQ==", "X-Received": "by 2002:a63:fb41:: with SMTP id w1mr3454820pgj.293.1642982773722;\n Sun, 23 Jan 2022 16:06:13 -0800 (PST)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Beilei Xing <beilei.xing@intel.com>", "Subject": "[PATCH 50/82] net/i40e: remove unnecessary NULL checks", "Date": "Sun, 23 Jan 2022 16:04:46 -0800", "Message-Id": "<20220124000518.319850-51-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.30.2", "In-Reply-To": "<20220124000518.319850-1-stephen@networkplumber.org>", "References": "<20220124000518.319850-1-stephen@networkplumber.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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": "Remove redundant NULL pointer checks before free functions\nfound by nullfree.cocci\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/net/i40e/i40e_ethdev.c | 27 +++++++++------------------\n drivers/net/i40e/i40e_rxtx.c | 3 +--\n 2 files changed, 10 insertions(+), 20 deletions(-)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 1d417dbf8ad7..ecfa3c94db44 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -1781,10 +1781,8 @@ i40e_rm_ethtype_filter_list(struct i40e_pf *pf)\n \n \tethertype_rule = &pf->ethertype;\n \t/* Remove all ethertype filter rules and hash */\n-\tif (ethertype_rule->hash_map)\n-\t\trte_free(ethertype_rule->hash_map);\n-\tif (ethertype_rule->hash_table)\n-\t\trte_hash_free(ethertype_rule->hash_table);\n+\trte_free(ethertype_rule->hash_map);\n+\trte_hash_free(ethertype_rule->hash_table);\n \n \twhile ((p_ethertype = TAILQ_FIRST(ðertype_rule->ethertype_list))) {\n \t\tTAILQ_REMOVE(ðertype_rule->ethertype_list,\n@@ -1801,10 +1799,8 @@ i40e_rm_tunnel_filter_list(struct i40e_pf *pf)\n \n \ttunnel_rule = &pf->tunnel;\n \t/* Remove all tunnel director rules and hash */\n-\tif (tunnel_rule->hash_map)\n-\t\trte_free(tunnel_rule->hash_map);\n-\tif (tunnel_rule->hash_table)\n-\t\trte_hash_free(tunnel_rule->hash_table);\n+\trte_free(tunnel_rule->hash_map);\n+\trte_hash_free(tunnel_rule->hash_table);\n \n \twhile ((p_tunnel = TAILQ_FIRST(&tunnel_rule->tunnel_list))) {\n \t\tTAILQ_REMOVE(&tunnel_rule->tunnel_list, p_tunnel, rules);\n@@ -1833,16 +1829,11 @@ i40e_fdir_memory_cleanup(struct i40e_pf *pf)\n \tfdir_info = &pf->fdir;\n \n \t/* flow director memory cleanup */\n-\tif (fdir_info->hash_map)\n-\t\trte_free(fdir_info->hash_map);\n-\tif (fdir_info->hash_table)\n-\t\trte_hash_free(fdir_info->hash_table);\n-\tif (fdir_info->fdir_flow_pool.bitmap)\n-\t\trte_free(fdir_info->fdir_flow_pool.bitmap);\n-\tif (fdir_info->fdir_flow_pool.pool)\n-\t\trte_free(fdir_info->fdir_flow_pool.pool);\n-\tif (fdir_info->fdir_filter_array)\n-\t\trte_free(fdir_info->fdir_filter_array);\n+\trte_free(fdir_info->hash_map);\n+\trte_hash_free(fdir_info->hash_table);\n+\trte_free(fdir_info->fdir_flow_pool.bitmap);\n+\trte_free(fdir_info->fdir_flow_pool.pool);\n+\trte_free(fdir_info->fdir_filter_array);\n }\n \n void i40e_flex_payload_reg_set_default(struct i40e_hw *hw)\ndiff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c\nindex 9a00a9b71e2c..25a28ecea22c 100644\n--- a/drivers/net/i40e/i40e_rxtx.c\n+++ b/drivers/net/i40e/i40e_rxtx.c\n@@ -2573,8 +2573,7 @@ i40e_reset_rx_queue(struct i40e_rx_queue *rxq)\n \trxq->rx_tail = 0;\n \trxq->nb_rx_hold = 0;\n \n-\tif (rxq->pkt_first_seg != NULL)\n-\t\trte_pktmbuf_free(rxq->pkt_first_seg);\n+\trte_pktmbuf_free(rxq->pkt_first_seg);\n \n \trxq->pkt_first_seg = NULL;\n \trxq->pkt_last_seg = NULL;\n", "prefixes": [ "50/82" ] }{ "id": 106289, "url": "