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 A02CEA00C2; Sun, 20 Feb 2022 06:19:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33D734068C; Sun, 20 Feb 2022 06:19:08 +0100 (CET) Received: from mail-il1-f180.google.com (mail-il1-f180.google.com [209.85.166.180]) by mails.dpdk.org (Postfix) with ESMTP id 58EFB40395 for ; Sun, 20 Feb 2022 06:19:07 +0100 (CET) Received: by mail-il1-f180.google.com with SMTP id c14so7642550ilm.4 for ; Sat, 19 Feb 2022 21:19:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ipGIruC3yLGFHQZI1Y2Wkqi2ZraYyuZC1IX5CV6tEEA=; b=GonbtrlRdFMESdbpeuvEDZhMqTGPvkMGMkzUv56w6OK+OO4uxTuxCwb0Sy08pdjmDa dQVlQ73j+gLnavGHmyjYqyNPy4xdYKwVlQbNn1m0sZPPqOSLm0Fg/smbMyp7Gfpi17w2 gBkQ1e9s/sMuzgJ7dZuosGjilFZJF0ERFbJ58Bmq4Pum+WTUHozKr4St1U4RMD9lqjlg zhxum7G0K3PuGz2h5gTZwbPhwt9ma1i4OLA71ek+azJKudOPTlQx/hCL053wdV+lOJW7 zwgSIj3FP1ZQslQmgbg2ZfIgLVrLMsx5qMApniGGIJ3dwpd5pVx9Am6ypBYLBhx4mTmV hrTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ipGIruC3yLGFHQZI1Y2Wkqi2ZraYyuZC1IX5CV6tEEA=; b=GQFxLtpj1kG/yp0wLUianfr4xNczHdwmbz+I/uE08viwxDlRVkSBctD/zC5GzNP2ZP PIHkn8zQJAOasooKqjvh/zgandQWJYyaDK7ntb2KujwNXBt1U5m+DMmVXpyxj8SbaPhk 0epPwNYPoOz06BK7UpCsruoHz+5E7rhDi71IzTB6Gu91laVGe2GfkLSM+J6mJDf5R6Mj ljQWa8+uAArNZchOK8I9jIZ0PzBYTnIV692+LZ/nTHejVycrQ0LWAXasri2HrCw/DYIc arHZUPExBknob+NCLGPhJyDGA4Yi0UANfBLO/yys7YauhEUfwBRR6E0nnMDPNXntigfH Xlmw== X-Gm-Message-State: AOAM5321Lb7yZcdJ9Dbt5/IKl1ehSgJ/Zh+3IqiN83oMzGWaQf5CNnEe t2V51WB8pghmq0pACHRuFJDZH+FhVchN5/NBAJA= X-Google-Smtp-Source: ABdhPJyDlnh6NRVZeuHPbBlS7HWHdnhiEvBHekkPAbfU3DCGLoEMmqoj3H2NqHmE0t+Toq7wkpsx+ImbcENyEzZuYbw= X-Received: by 2002:a05:6e02:1584:b0:2b9:7a3d:8937 with SMTP id m4-20020a056e02158400b002b97a3d8937mr11192328ilu.192.1645334346240; Sat, 19 Feb 2022 21:19:06 -0800 (PST) MIME-Version: 1.0 References: <20220219234322.61309-1-stephen@networkplumber.org> In-Reply-To: <20220219234322.61309-1-stephen@networkplumber.org> From: Jerin Jacob Date: Sun, 20 Feb 2022 10:48:40 +0530 Message-ID: Subject: Re: [PATCH 0/3] more unnecessary null checks To: Stephen Hemminger Cc: dpdk-dev Content-Type: text/plain; charset="UTF-8" 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 On Sun, Feb 20, 2022 at 5:13 AM Stephen Hemminger wrote: > > Thomas suggested there are some other functions that could > use the nullfree cleanup. And ACL and LPM are both candidates. > > Stephen Hemminger (3): > cocci/nullfree: add more functions Can ./devtools/cocci.sh to integrated to devtools/checkpatches.sh to detect the issues before the code gets into DPDK? > acl: remove unncessary null checks in calls to rte_acl_free() > lpm: remove unnecessary NULL checks > > app/test/test_acl.c | 12 ++++-------- > app/test/test_func_reentrancy.c | 3 +-- > devtools/cocci/nullfree.cocci | 9 +++++++++ > lib/acl/rte_acl.h | 1 + > lib/lpm/rte_lpm.h | 1 + > lib/lpm/rte_lpm6.h | 1 + > lib/table/rte_swx_table_wm.c | 3 +-- > lib/table/rte_table_acl.c | 15 +++++---------- > 8 files changed, 23 insertions(+), 22 deletions(-) > > -- > 2.34.1 >