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 D2C06A00C5; Wed, 3 Aug 2022 17:16:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 725AE40A7E; Wed, 3 Aug 2022 17:16:10 +0200 (CEST) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTP id A24EC40141 for ; Wed, 3 Aug 2022 17:16:09 +0200 (CEST) Received: by mail-pj1-f44.google.com with SMTP id 15-20020a17090a098f00b001f305b453feso2363884pjo.1 for ; Wed, 03 Aug 2022 08:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=34lsTJDsAyEC+65MT9Bm9oFoARFqFqgjylUiOwsnjdY=; b=5oq/GBoi9z6ah5/FikwZeDOxZBbX786pQkk0DuccDObz0R4od0CsYGy0jOkjieX3wE IxwfUgYlbHgft/egwBxAj5sMI/o+WK1Rw+7y9WSVXadoVEhytpqBZ/ruaL97LPjGFmwM c3VQ/e7TvF7Yqc9fu6tvFsE8KmZVTiJd93AlKR1a8ABdOP1dikmVTDFxu4InsZZnhD5c ldB09IiAyyhAx16q6p7rXj3nBW56/X4rLZTCr+pJa1tALkVAYmeGHzlx4YfQ0t+2DQSk xQNS315GGReLfGIIS7ufEi71AFWHn6rf/eBjqLOR+ftNUn5rA3as9FiAFL9Q4TuaW0wx yNIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=34lsTJDsAyEC+65MT9Bm9oFoARFqFqgjylUiOwsnjdY=; b=Katcm/1jmEftb4Zbl93aUpfTG/FwhCrb5jFauMCs/CsJ4vz3af05BocscG59MNQlYF Vtsw1LcVaAYl+MN1xTLo/PtKTSU6Lp9IT62BtZ6g6s9af8wtxJKQEubtBvg6TkK2uKCN au8fjv8tJALOJ+RCmeIqr2QbF+0MmSRCa6oB95r67HTdRTPMXb3AF2G8DDBGud66OXHz v1FlhD+Ii0GCaMoc9K9vRw8ODNrN3YN4vh/YWCDcq0Ae48TUXWfuUjqL6jxqpnuzoAoC gtDt1cGJ9JXKt51oNE9yuHAOiHUpR+RllrTQzenxGWqF97NFuRR4SQs4QEwmtnPqRt0W PuTA== X-Gm-Message-State: ACgBeo0RNOX/8uiKDFeOZH6vnW9/Uhe04ecRPyWKb6lPbPxz1qSSiPv6 EXCnOGOkXgAnfKp2ix4aObWNAA== X-Google-Smtp-Source: AA6agR6621gJYgccOEZlNutE5dKSq2oTFV+kMa+cmjG5fpQxQa2XYTPaUKhatcKXDO4J+2qnQBgnZQ== X-Received: by 2002:a17:902:cf03:b0:16d:20d4:6e1e with SMTP id i3-20020a170902cf0300b0016d20d46e1emr26474435plg.71.1659539768708; Wed, 03 Aug 2022 08:16:08 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id iw4-20020a170903044400b0015ee60ef65bsm2037483plb.260.2022.08.03.08.16.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Aug 2022 08:16:08 -0700 (PDT) Date: Wed, 3 Aug 2022 08:16:06 -0700 From: Stephen Hemminger To: Junfeng Guo Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org, Xiaoyun Li Subject: Re: [PATCH 04/13] net/idpf: add queue operations Message-ID: <20220803081606.0838d104@hermes.local> In-Reply-To: <20220803113104.1184059-5-junfeng.guo@intel.com> References: <20220803113104.1184059-1-junfeng.guo@intel.com> <20220803113104.1184059-5-junfeng.guo@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Wed, 3 Aug 2022 19:30:55 +0800 Junfeng Guo wrote: > +static void > +idpf_tx_queue_release(void *txq) > +{ > + struct idpf_tx_queue *q = (struct idpf_tx_queue *)txq; > + > + if (!q) > + return; > + > + if (q->complq) > + rte_free(q->complq); null pointer check before calling rte_free is unnecessary. rte_free(NULL) works. There is even a script used to scan DPDK to fix this. devtools/cocci/nullfree.cocci