On Fri, 17 Feb 2023 15:58:52 +0000 "Sevincer, Abdullah" <abdullah.sevin...@intel.com> wrote:
> From: Sevincer, Abdullah <abdullah.sevin...@intel.com> > Sent: Sunday, February 12, 2023 11:44 AM > To: Stephen Hemminger <step...@networkplumber.org> > Cc: dev@dpdk.org; jer...@marvell.com > Subject: RE: [PATCH v3] app/procinfo: display eventdev xstats for PMD data > > Thanks Stephen, > I will remove extra line there. > > Instead malloc using of calloc is required or just suggestion? > I can see allocation is done in same way with malloc in > lib\eventdev\rte_eventdev.c (reference to eventdev_build_telemetry_data > function). > I will keep malloc as it is if there is no opposition. It doesn't matter much if you use malloc vs calloc. But there are some static analysis tools that might look at calloc as way to determine number of elememts for later array checks. Also, the kernel checkpatch warns when kmalloc is used but kcalloc or kmalloc_array could be used instead. That is Linux kernel specific but same idea applies.