[dpdk-dev] [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga
Thomas Monjalon
thomas at monjalon.net
Tue Jan 15 01:03:36 CET 2019
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 at intel.com
> cc: tianfei.zhang at 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 <andy.pei at intel.com>
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)
More information about the dev
mailing list