From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga Date: Tue, 15 Jan 2019 01:03:36 +0100 Message-ID: <2005571.rmhIWEJz30@xps> References: <1545161721-382282-1-git-send-email-andy.pei@intel.com> <1545746524-116580-1-git-send-email-andy.pei@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, rosen.xu@intel.com, tianfei.zhang@intel.com To: AndyPei Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 0AD5F5F72 for ; Tue, 15 Jan 2019 01:03:40 +0100 (CET) In-Reply-To: <1545746524-116580-1-git-send-email-andy.pei@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Andy, I comment here for all your patches (4 are pending). They are your first patches for DPDK, welcome! You may want to read the guides explaining how to contribute: http://doc.dpdk.org/guides/contributing/patches.html The title should be "raw/ifpga: fix memory leak in [area here]" 25/12/2018 15:02, AndyPei: > When ifpga_rawdev_create() allocate memory for a new rawdev, the original code > allocate redundant memory for adapter, which is a member of the rawdev. > What is actually necessary is the adapter to be initialized, not memory allocated. > > What is different in v3 from v2 is that the adapter is no longer need to be freed. The changelog is better located after --- below. > fixes:ef1e8ede3da5 > cc: rosen.xu@intel.com > cc: tianfei.zhang@intel.com The format should be a bit different. Please use git log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae' and check with devtools/check-git-log.sh > Signed-off-by: AndyPei Should there be a space in your name as "Andy Pei"? [...] > /** > - * opae_adapter_data_alloc - alloc opae_adapter_data data structure > + * opae_adapter_init - init opae_adapter data structure > + * @adpdate: pointer of opae_adater data structure > + * @name: adapter name. > + * @data: private data of this adapter. The doxygen format is @param param_name param_description. It is also important to strictly match the name of the parameter. @adpdate is a typo (should be @param adapter). You can build the doc with "make doc-api-html" and check the result in your browser. > + * > + * Return: 0 on success. > + */ > +int opae_adapter_init(struct opae_adapter *adapter, > + const char *name, void *data)