From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BFBBA0093; Tue, 19 May 2020 17:19:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D26D71D67C; Tue, 19 May 2020 17:19:47 +0200 (CEST) Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172]) by dpdk.org (Postfix) with ESMTP id EE0681D623 for ; Tue, 19 May 2020 17:19:45 +0200 (CEST) Received: by mail-pg1-f172.google.com with SMTP id r22so6547170pga.12 for ; Tue, 19 May 2020 08:19:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sHpU4KKnCeQkM4UznNcS7IXj1nhxonXcGZfCwubDKhM=; b=09s7/sbLQrOh+qgX6v9BkHhUsXZ/cHDutobjiDWe4Dol65r8wtxgbwXofOlMBvV2qk 79c3YLnG1jyZ/zMOWrqun/6bZwQf3vbP8nawOoA8uVtQjdGXsJYeNHC4ZotugqIoNbTp Fu2pLxOuMpUvwVwW5vUAJ1aCu8AJv+vUdVpQndUm2gquGPr6/rHh7ZrG+yhVJ+CMG2Lb pLQ3fid4inzq2yBMDLxuk9x81ypuFOoguw0KG7rjSEUSdDvEhzfpyVTcrQr87tiL24jl UfejIGtF2B8EE6NSLLH1HcJh56Gqrzg9gCtwEqRy3VSMZmUcFjDLx4TnLQxV1bue2ayV Xg5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sHpU4KKnCeQkM4UznNcS7IXj1nhxonXcGZfCwubDKhM=; b=UrPlGVRhPG8sUCF9nBwkk0cGsqCQf7F1VZ0Go4xrW7ZjLzM4auk3dbJTq6Dojp5XvG xT2E4yOkTn5UbplLfqbNyLw+ux0MG5SXjl2stYbNWD5SLDOCbrjWLuIwUgytG7HreKX/ PTwly1URx2ALpnTIR5x59V33GC3DMloCoi3M/aA0b1osndx5RBgdGM2pQ6ns1j0XHPlt D5Dbly8chMY4RXIK/k5L40Hpb9MURpIcGArgipiM5N+JeUI7lXoAnUS6YXJ2ElOZA4os 8GcjdHBonaU9gxwsHlf830zvEXR31fcWuoUWeJCjH6wO51HwBOCbTejr9TE2ipPd1nE9 PDXw== X-Gm-Message-State: AOAM533jA5xTqTvWHA4zuBz140ri9YFXkDbi2tt+I9riIb0OSY+mMBNN BUbv4uhgtZp9PzaeiOLrkCp7IzY//nQe2Q== X-Google-Smtp-Source: ABdhPJxFs/vlKOA5jpo3jMTHruqB3DqFbPbVrSCfDjCl7X6ayqF/a21fLOUTqgOURLhtmVMIfpfYyA== X-Received: by 2002:a62:750b:: with SMTP id q11mr2393565pfc.142.1589901585044; Tue, 19 May 2020 08:19:45 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b140sm10986036pfb.119.2020.05.19.08.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 08:19:44 -0700 (PDT) Date: Tue, 19 May 2020 08:19:36 -0700 From: Stephen Hemminger To: Hemant Agrawal Cc: dev@dpdk.org Message-ID: <20200519081936.6d188c99@hermes.lan> In-Reply-To: <20200514093001.12007-1-hemant.agrawal@nxp.com> References: <20200513113822.8681-1-hemant.agrawal@nxp.com> <20200514093001.12007-1-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCHv2 1/2] bitratestats: add support for free X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 14 May 2020 15:00:00 +0530 Hemant Agrawal wrote: > > +int > +rte_stats_bitrate_free(struct rte_stats_bitrates *bitrate_data) > +{ > + if (bitrate_data) > + rte_free(bitrate_data); > + return 0; > +} rte_free of NULL is allowed, the test is not needed. Should be void not int function.