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 941A1A00C4; Fri, 28 Jan 2022 22:48:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7BAE34279B; Fri, 28 Jan 2022 22:48:15 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id C956040041 for ; Fri, 28 Jan 2022 22:48:13 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 7E5443202005; Fri, 28 Jan 2022 16:48:12 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 28 Jan 2022 16:48:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; bh=KlkuMwpgg2MU0k 6Qu8COsHs4S2KtqupAdxD/2deyCxs=; b=YwFqsLiA2MJbxd/Cf/wg6Ilpa85baF lAwyfSeSOtgTCQ7Q8xY9ChkqFcRi294rhPpHSsERclMqAycv6xCj/zfVGu1uM9Fj IlclBStg7Lr9aqczf4YnPBUVah/qg5PC+stgua1dfdHLRCUpXS6ZAjgiQS3jwrYN j9Fb1J4DSGQnouUdsb+dG6mRnFumKi7qe7FOAXDKt6AX6ZVZtlheap+NuSuC8Omq Z0RQEHrDLx/QJOFNR4OsQKH60ukFoRBfdxhIlorWR16R+qIg4+4/navpyX/HdiF8 Aj3Y/bq8Kzoljy+qdx85yD093UsSJ9c8Fx0Vpjxi+QeDIrhc/lyVW6eQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=KlkuMwpgg2MU0k6Qu8COsHs4S2KtqupAdxD/2deyC xs=; b=Jz/m8TUYGOrqO6JjpWsghnuKDdmq1cXmBEbQCzTe/Iwkhl0yGk86kED50 XG6+/utIxw/NiWvwPTgoO2VNHGIRP0U7zBri3Qncm34sfdVNKIqJKOs1zgiKBVst 4GM8YVH2kVZhYSYV2wVmHFV/HyLKRCMlvlNYWie5TS58homsTuafovEklbkQhOLC NHUbQUGp1OSeB/oN4C60FPWJsTsyYDrCzdYzc80oTf6V6YaWCMiCvcLrfAZFfeW3 Y1O1riDfhBsuTW18AsrPRm1b+cS0ZOsv34JKT4LwXhSjbfzKIbmabL72u1FMNFsq Oodgqs1YoxlwMTuDDU+hoj4XS7qRg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrfeehgdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 28 Jan 2022 16:48:11 -0500 (EST) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Subject: Re: [PATCH v2 02/83] devtools/cocci: add script to fix unnecessary null checks Date: Fri, 28 Jan 2022 22:48:09 +0100 Message-ID: <2287349.NG923GbCHz@thomas> In-Reply-To: <20220124174719.14417-3-stephen@networkplumber.org> References: <20220124000518.319850-1-stephen@networkplumber.org> <20220124174719.14417-1-stephen@networkplumber.org> <20220124174719.14417-3-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 24/01/2022 18:45, Stephen Hemminger: > This script is based on the idea of the nullfree script > in the Linux kernel. It finds cases where a check for null > pointer is done, but is unnecessary because the function > already handles NULL pointer. > > Basic example: > if (x->buf) > rte_free(x->buf); > can be reduced to: > rte_free(x->buf); > > Signed-off-by: Stephen Hemminger Good to have, thank you.