Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/107145/?format=api
http://patches.dpdk.org/api/patches/107145/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220209191748.377729-1-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": "<20220209191748.377729-1-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20220209191748.377729-1-stephen@networkplumber.org", "date": "2022-02-09T19:17:12", "name": "[v3,00/36] remove unnecessary null checks", "commit_ref": null, "pull_url": null, "state": null, "archived": false, "hash": null, "submitter": { "id": 27, "url": "http://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220209191748.377729-1-stephen@networkplumber.org/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/107145/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/107145/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 04A17A034E;\n\tWed, 9 Feb 2022 20:17:54 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B9E5E41101;\n\tWed, 9 Feb 2022 20:17:53 +0100 (CET)", "from mail-pf1-f182.google.com (mail-pf1-f182.google.com\n [209.85.210.182])\n by mails.dpdk.org (Postfix) with ESMTP id 373B540140\n for <dev@dpdk.org>; Wed, 9 Feb 2022 20:17:52 +0100 (CET)", "by mail-pf1-f182.google.com with SMTP id d187so5942378pfa.10\n for <dev@dpdk.org>; Wed, 09 Feb 2022 11:17:52 -0800 (PST)", "from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])\n by smtp.gmail.com with ESMTPSA id\n u16sm14378401pgh.54.2022.02.09.11.17.49\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 09 Feb 2022 11:17:50 -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=fISF3QKhYfqePbKXqVQSo0pwz/Aje2bb+BbXpARC7Vs=;\n b=5iMv94q76iwSgzB2BRWesVSWIdZg/152vnTa/JX21xOIt3Q5RnOeXCBdF4Pkv+pBjU\n /Jp0S91rRlN3MC9QAA5+KYcnSdnjtnVeLSOxXE6KoPd/8B/BbEdA0cKywQtfBtAZhLPI\n 7unagqPdQEZi8aMfiFPXo9MLVCbf2Mz0itpCB3HFKohDmnGGcNxAX/oWhaoQ7yZR0JSn\n cF4D7P3GbaKr3zLRy7rhNU/3Hr2mfVHUr2FzcBf0e04awwaGKYkJv6XaMvcRkyRxzLTG\n 0K3S8ZFNVh3PMkgdS8ym2Xq19BYr+zLu36WMvxpzKdnSw/fp8zS+8NuZ4KP1acpwwCpv\n QYnA==", "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=fISF3QKhYfqePbKXqVQSo0pwz/Aje2bb+BbXpARC7Vs=;\n b=bSEmrff/2fUddhShP3fM138BJqg8Suru/yo8J14aj5ZosgykCVBMr/lCXYeL1OQ3iB\n 4pAyT02M7fMN/Ij6cbT2qkZtxzyfk+dyUBS3UgsKVBrzf/BTeB4j9yFtgh15Y2tiAgaI\n Lv4gGsfyp0eYrDzPbiEh4egd/7wNcReDJGvYOJzA5jSX5x5Eh+hCjSDMytMQFh+VNJ5L\n XT96Iq3UiTck2YKmitYqaK1IWfrWoXCOrx9+BKdzNAXEWhqYNedqIaAVW5FonyZHdry1\n ETEBhQIFPBUUuNPaBTksmFaDaufpXDu+RsyMXwGXnoMJ5OVd9AAGHXfxrKm67qqXEDwk\n SfjA==", "X-Gm-Message-State": "AOAM533/AbEjxnMCmnPPh3K1bEpE+8dzP17znDIBAiU7fyWapP5Kzk9A\n 0OzoYCUZtjCrSM1XePM8zctFOGsW7RNl61vJ", "X-Google-Smtp-Source": "\n ABdhPJxjsgtgnQDh4p698bpwEZBMB0OdPAk9qQDy/JQkSGjsENTHRq6vVedAo72CpawucYABTGv16g==", "X-Received": "by 2002:a63:2048:: with SMTP id r8mr3086250pgm.211.1644434270996;\n Wed, 09 Feb 2022 11:17:50 -0800 (PST)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>", "Subject": "[PATCH v3 00/36] remove unnecessary null checks", "Date": "Wed, 9 Feb 2022 11:17:12 -0800", "Message-Id": "<20220209191748.377729-1-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.34.1", "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": "While working on a new driver, noticed that some drivers always call\nfree routines (correct) and others conditionally call free routines\nif not null (redundant check). The extra if(e != NULL) type check\nis unneeded and adds extra code. Better to have all the code\nconsistent.\n\nThe Linux kernel has automated this kind of fixup using coccinelle,\nand this patchset creates a coccinelle script to do the transformation;\nthen has individual patches for each sub component.\n\nIn one driver dpaaxx, the change suggested a further change\nto the compat macros to make them even simpler.\n\nv3\n - consolidate patches into logical groups\n\nv2\n - add documentation change patch\n - spelling fix to coccinelle script patch\n - suggested whitespace fix to igc and ixgbe patch\n\n\nStephen Hemminger (36):\n lib: update documentation of XXX_free() functions\n devtools/cocci: add script to fix unnecessary null checks\n eal: remove unnecessary NULL checks\n ethdev: remove unnecessary NULL checks\n examples: remove unnecessary NULL checks\n vhost: remove unnecessary NULL checks\n app: remove unnecessary NULL checks\n baseband/*: remove unnecessary NULL checks\n bus/*: remove unnecessary NULL checks\n common/*: remove unnecessary NULL checks\n compress/*: remove unnecessary NULL checks\n crypto: remove unnecessary NULL checks\n event/sw: remove unnecessary NULL checks\n net/axgbe: remove unnecessary NULL checks\n net/bnx*: remove unnecessary NULL checks\n net/cnxk: remove unnecessary NULL checks\n net/cxgbe: remove unnecessary NULL checks\n net/dpaa*: remove unnecessary NULL checks\n net/ena: remove unnecessary NULL checks\n net/hinic: remove unnecessary NULL checks\n net/hns3: remove unnecessary NULL checks\n net/i*: remove unnecessary NULL checks\n net/mlx*: remove unnecessary NULL checks\n net/mvpp2: remove unnecessary NULL checks\n net/netvsc: remove unnecessary NULL checks\n net/octeontx: remove unnecessary NULL checks\n net/qede: remove unnecessary NULL checks\n net/txgbe: remove unnecessary NULL checks\n net/vdev_netvsc: remove unnecessary NULL checks\n net/virtio: remove unnecessary NULL checks\n net/other: remove unnecessary NULL checks\n raw/*: remove unnecessary NULL checks\n regex/*: remove unnecessary NULL checks\n vdpa/*: remove unnecessary NULL checks\n compressdev: remove unnecessary NULL checks\n other: remove unnecessary NULL checks\n\n app/pdump/main.c | 9 ++--\n app/test-crypto-perf/cperf_test_latency.c | 3 +-\n .../cperf_test_pmd_cyclecount.c | 9 ++--\n app/test-crypto-perf/cperf_test_throughput.c | 3 +-\n .../cperf_test_vector_parsing.c | 6 +--\n app/test-crypto-perf/cperf_test_verify.c | 3 +-\n app/test-pmd/cmd_flex_item.c | 3 +-\n app/test-pmd/cmdline.c | 3 +-\n app/test-pmd/testpmd.c | 3 +-\n app/test-regex/main.c | 12 ++---\n app/test/test_cksum.c | 3 +-\n app/test/test_compressdev.c | 3 +-\n app/test/test_cryptodev.h | 3 +-\n app/test/test_cryptodev_asym.c | 3 +-\n app/test/test_cryptodev_blockcipher.c | 12 ++---\n app/test/test_func_reentrancy.c | 15 +++----\n app/test/test_hash.c | 15 +++----\n app/test/test_hash_perf.c | 7 +--\n app/test/test_link_bonding.c | 9 ++--\n app/test/test_link_bonding_mode4.c | 3 +-\n app/test/test_malloc.c | 5 +--\n app/test/test_mbuf.c | 45 +++++++------------\n app/test/test_pcapng.c | 3 +-\n app/test/test_reorder.c | 15 +++----\n app/test/virtual_pmd.c | 3 +-\n devtools/cocci/nullfree.cocci | 33 ++++++++++++++\n drivers/baseband/acc100/rte_acc100_pmd.c | 3 +-\n drivers/baseband/la12xx/bbdev_la12xx.c | 3 +-\n drivers/baseband/null/bbdev_null.c | 3 +-\n .../baseband/turbo_sw/bbdev_turbo_software.c | 3 +-\n drivers/bus/fslmc/fslmc_bus.c | 6 +--\n drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 6 +--\n drivers/bus/ifpga/ifpga_bus.c | 12 ++---\n drivers/bus/pci/pci_params.c | 3 +-\n drivers/bus/pci/windows/pci.c | 3 +-\n drivers/bus/pci/windows/pci_netuio.c | 3 +-\n drivers/common/cpt/cpt_ucode_asym.h | 6 +--\n drivers/common/dpaax/compat.h | 11 +----\n drivers/common/mlx5/mlx5_common_mr.c | 3 +-\n drivers/common/mlx5/mlx5_common_pci.c | 3 +-\n drivers/common/qat/qat_qp.c | 9 ++--\n drivers/compress/mlx5/mlx5_compress.c | 3 +-\n drivers/compress/octeontx/otx_zip_pmd.c | 9 ++--\n drivers/crypto/armv8/rte_armv8_pmd_ops.c | 3 +-\n drivers/crypto/ccp/ccp_dev.c | 3 +-\n drivers/crypto/ccp/ccp_pmd_ops.c | 3 +-\n drivers/crypto/cnxk/cnxk_ae.h | 6 +--\n drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 3 +-\n drivers/crypto/mvsam/rte_mrvl_pmd_ops.c | 6 +--\n drivers/crypto/null/null_crypto_pmd_ops.c | 6 +--\n drivers/crypto/octeontx/otx_cryptodev_ops.c | 3 +-\n drivers/crypto/openssl/rte_openssl_pmd_ops.c | 6 +--\n drivers/crypto/scheduler/scheduler_pmd_ops.c | 6 +--\n drivers/crypto/virtio/virtqueue.c | 6 +--\n drivers/event/sw/sw_evdev.c | 3 +-\n drivers/net/axgbe/axgbe_rxtx.c | 6 +--\n drivers/net/bnx2x/bnx2x_rxtx.c | 6 +--\n drivers/net/bnxt/bnxt_ethdev.c | 3 +-\n drivers/net/bonding/rte_eth_bond_pmd.c | 3 +-\n drivers/net/cnxk/cnxk_ethdev.c | 6 +--\n drivers/net/cxgbe/cxgbe_main.c | 3 +-\n drivers/net/dpaa/dpaa_ethdev.c | 3 +-\n drivers/net/dpaa/fmlib/fm_lib.c | 3 +-\n drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-\n drivers/net/dpaa2/dpaa2_mux.c | 3 +-\n drivers/net/dpaa2/dpaa2_ptp.c | 3 +-\n drivers/net/ena/ena_ethdev.c | 18 +++-----\n drivers/net/hinic/hinic_pmd_ethdev.c | 3 +-\n drivers/net/hns3/hns3_rxtx.c | 9 ++--\n drivers/net/i40e/i40e_ethdev.c | 27 ++++-------\n drivers/net/i40e/i40e_rxtx.c | 3 +-\n drivers/net/iavf/iavf_rxtx.c | 3 +-\n drivers/net/ice/ice_fdir_filter.c | 6 +--\n drivers/net/igc/igc_flow.c | 5 +--\n drivers/net/ixgbe/ixgbe_ethdev.c | 12 ++---\n drivers/net/ixgbe/ixgbe_rxtx.c | 3 +-\n drivers/net/memif/rte_eth_memif.c | 6 +--\n drivers/net/mlx4/mlx4_mr.c | 3 +-\n drivers/net/mlx5/mlx5_flow.c | 3 +-\n drivers/net/mvpp2/mrvl_qos.c | 3 +-\n drivers/net/netvsc/hn_rxtx.c | 6 +--\n drivers/net/null/rte_eth_null.c | 3 +-\n drivers/net/octeontx/octeontx_ethdev.c | 3 +-\n drivers/net/octeontx/octeontx_ethdev_ops.c | 3 +-\n drivers/net/qede/qede_main.c | 3 +-\n drivers/net/qede/qede_rxtx.c | 6 +--\n drivers/net/softnic/rte_eth_softnic_cli.c | 12 ++---\n .../net/softnic/rte_eth_softnic_cryptodev.c | 6 +--\n drivers/net/softnic/rte_eth_softnic_thread.c | 6 +--\n drivers/net/tap/tap_flow.c | 9 ++--\n drivers/net/txgbe/txgbe_ethdev.c | 12 ++---\n drivers/net/vdev_netvsc/vdev_netvsc.c | 3 +-\n drivers/net/virtio/virtio_user_ethdev.c | 12 ++---\n drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 3 +-\n drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 15 +++----\n drivers/raw/ifpga/ifpga_rawdev.c | 9 ++--\n drivers/raw/skeleton/skeleton_rawdev_test.c | 6 +--\n drivers/regex/cn9k/cn9k_regexdev.c | 6 +--\n drivers/regex/cn9k/cn9k_regexdev_compiler.c | 3 +-\n drivers/regex/mlx5/mlx5_regex.c | 3 +-\n drivers/regex/mlx5/mlx5_rxp.c | 3 +-\n drivers/vdpa/ifc/ifcvf_vdpa.c | 9 ++--\n drivers/vdpa/mlx5/mlx5_vdpa_mem.c | 3 +-\n drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 3 +-\n examples/fips_validation/fips_dev_self_test.c | 18 +++-----\n examples/fips_validation/fips_validation.c | 3 +-\n examples/fips_validation/main.c | 36 +++++----------\n examples/ip_pipeline/cli.c | 12 ++---\n examples/ip_pipeline/cryptodev.c | 6 +--\n examples/ip_pipeline/thread.c | 6 +--\n examples/l2fwd-cat/cat.c | 3 +-\n examples/pipeline/thread.c | 6 +--\n examples/vhost_blk/vhost_blk.c | 3 +-\n lib/compressdev/rte_compressdev.c | 3 +-\n lib/eal/common/eal_common_devargs.c | 6 +--\n lib/eal/common/eal_common_memzone.c | 3 +-\n lib/eal/common/eal_common_options.c | 9 ++--\n lib/eal/common/eal_common_trace_ctf.c | 6 +--\n lib/eal/freebsd/eal.c | 4 +-\n lib/eal/linux/eal.c | 10 ++---\n lib/eal/windows/eal_alarm.c | 3 +-\n lib/eal/windows/eal_memory.c | 3 +-\n lib/ethdev/rte_ethdev.c | 3 +-\n lib/graph/graph_stats.c | 3 +-\n lib/hash/rte_hash.h | 4 +-\n lib/ipsec/ipsec_sad.c | 3 +-\n lib/mempool/rte_mempool.h | 1 +\n lib/port/rte_port_source_sink.c | 21 +++------\n lib/power/rte_power_empty_poll.c | 3 +-\n lib/reorder/rte_reorder.c | 6 +--\n lib/ring/rte_ring.h | 3 +-\n lib/vhost/iotlb.c | 3 +-\n lib/vhost/vhost_crypto.c | 6 +--\n lib/vhost/vhost_user.c | 9 ++--\n 134 files changed, 312 insertions(+), 560 deletions(-)\n create mode 100644 devtools/cocci/nullfree.cocci", "diff": null, "prefixes": [ "v3", "00/36" ] }{ "id": 107145, "url": "