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 992B8A00C2; Sun, 20 Feb 2022 19:21:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1F4594068C; Sun, 20 Feb 2022 19:21:53 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id 63B8640395 for ; Sun, 20 Feb 2022 19:21:51 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id ev16-20020a17090aead000b001bc3835fea8so816475pjb.0 for ; Sun, 20 Feb 2022 10:21:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W4MMCllUcjyMIz2n2MP7klIlTuf2XWeciWZxW4LEmyM=; b=qC4Nb2lfBJWzUqFMU4UAoGz4QSc8WHlpdlyf7JeEFuCGMIrgA7tmS3m4NaVjfYbqZm Cl7TV2KDyItq3caMCw6dMvEo2q/iU79FZ8cOS0zp4BhJZG2mZsIIPB1uZaEwac3witck 42sxTOzHeckCKHMZBaRWABqUbgbOpHndsBdfrpVsfcHx4WDITGucHU0Bdw7Xz7d3NHj0 oLaxmRiVKAkxYoJfn4GOpOXBq1FCggr0do2wTsgywBeSSNBh1Pgire8plQbQguPQ/I3g gRBC5VJXg7KjEMtP6UkEVd6FFzYiwJtWcFzXbWxMvdV2V9pAtRoSYwcn/9/sabajPW3y JN0w== 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=W4MMCllUcjyMIz2n2MP7klIlTuf2XWeciWZxW4LEmyM=; b=BGKEg6F9if0XRXSmCjz3G6eX40z59ibBSfJea928s8Xf0JOlvX+ry3RLIMsLHaooX2 u4Y4xLhw3b9Q9F02nAC2L6JEFQjs670z6qOT3zcle+118LCfDWB15lORsXCiBxhqKjmE mPgpZ5F6QSWza4912j7fIhdgwaplo1v49+j0vA33kOIdg2sXMQvxtI6Xw8WKDI5nDGrn h8Zg56WryNAwnFG/2TFyJXwT4TGtPnXHt6Wsbv/CjWvUxGo+hCSjQ4Fmw6bauKPuf/jN S54rkEEnrDSOPIAEdA0SogahkpOnpazbC+3MrjWflZINyB1mlA21zoU4B+ko3ik59T/Y uuPw== X-Gm-Message-State: AOAM530MJXM6Rn7LZfaq2+oCdvvBQub3xxM6PoND4G078qC8GiTlS1XE U1A0z3P2qT6fwG3Mxwk6LtMWQ0c66nU/B/rd X-Google-Smtp-Source: ABdhPJz8qSQ9wifMJnmlDWFladTauc6cJZq8g8KqX6vvQPVLEVkG9xdReg4QfFKcp7tUeUEDSgGwVw== X-Received: by 2002:a17:902:bb93:b0:14f:3c15:566f with SMTP id m19-20020a170902bb9300b0014f3c15566fmr15657792pls.6.1645381310013; Sun, 20 Feb 2022 10:21:50 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id u8sm13528107pgf.83.2022.02.20.10.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Feb 2022 10:21:49 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v3 0/8] yet more unnecessary NULL checks Date: Sun, 20 Feb 2022 10:21:39 -0800 Message-Id: <20220220182147.9750-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220219234322.61309-1-stephen@networkplumber.org> References: <20220219234322.61309-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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Thomas suggested there are some other functions that could use the nullfree cleanup; this covers the rest of the story. Note: this does not change existing API/ABI, there are still some outliers that don't use the convention but fixing these will have to wait until next LTS. v3 - fix another typo and add more functions v2 - fix spelling typo and add functions Stephen Hemminger (8): cocci/nullfree: add more functions acl: remove unnecessary null checks lpm: remove unnecessary NULL checks lib: document existing free functions test: remove unnecessary NULL checks before free fips_validation: remove unnecessary NULL check event/sw: remove unnecessary NULL check pipeline: remove unnecessary checks for NULL pointer before free app/test/test_acl.c | 12 +- app/test/test_cmdline_lib.c | 3 +- app/test/test_cryptodev.c | 9 +- app/test/test_cryptodev_asym.c | 30 ++--- app/test/test_cryptodev_blockcipher.c | 3 +- app/test/test_func_reentrancy.c | 6 +- app/test/test_hash.c | 3 +- devtools/cocci/nullfree.cocci | 108 +++++++++++++++++- drivers/event/sw/sw_evdev.c | 6 +- examples/fips_validation/fips_dev_self_test.c | 3 +- lib/acl/rte_acl.h | 1 + lib/bitratestats/rte_bitrate.h | 1 + lib/compressdev/rte_comp.h | 1 + lib/cryptodev/rte_crypto.h | 1 + lib/eal/include/rte_interrupts.h | 4 +- lib/efd/rte_efd.h | 1 + lib/eventdev/rte_event_ring.h | 1 + lib/fib/rte_fib.h | 1 + lib/fib/rte_fib6.h | 1 + lib/lpm/rte_lpm.h | 1 + lib/lpm/rte_lpm6.h | 1 + lib/member/rte_member.h | 1 + lib/pipeline/rte_port_in_action.h | 6 +- lib/pipeline/rte_swx_ctl.c | 3 +- lib/pipeline/rte_swx_ctl.h | 1 + lib/pipeline/rte_swx_pipeline.c | 6 +- lib/pipeline/rte_swx_pipeline.h | 1 + lib/reorder/rte_reorder.h | 1 + lib/rib/rte_rib.h | 1 + lib/rib/rte_rib6.h | 1 + lib/sched/rte_sched.h | 1 + lib/stack/rte_stack.h | 1 + lib/table/rte_swx_table_wm.c | 3 +- lib/table/rte_table_acl.c | 15 +-- lib/telemetry/rte_telemetry.h | 2 +- 35 files changed, 162 insertions(+), 78 deletions(-) -- 2.34.1