> -----Original Message----- > From: Morten Brørup <m...@smartsharesystems.com> > Sent: Saturday, December 3, 2022 10:23 PM > To: dev@dpdk.org; roret...@linux.microsoft.com > Cc: Ruifeng Wang <ruifeng.w...@arm.com>; zhou...@loongson.cn; > d...@linux.vnet.ibm.com; > k...@semihalf.com; bruce.richard...@intel.com; > konstantin.v.anan...@yandex.ru; Morten > Brørup <m...@smartsharesystems.com> > Subject: [PATCH v2] eal: add nonnull and access function attributes > > Add "nonnull" function attribute to help the compiler detect a NULL pointer > being passed > to a function not accepting NULL pointers as an argument at build time. > > Add "access" function attribute to tell the compiler how a function accesses > its pointer > arguments. > > Add these attributes to the rte_memcpy() function, as the first in hopefully > many to come. > > v2: > * Only define "nonnull" for GCC and CLANG. > * Append _param/_params to prepare for possible future attributes > attached directly to the individual parameters, like __rte_unused. > * Use RTE_TOOLCHAIN_GCC instead of RTE_CC_GCC, to fix complaints about > GCC_VERSION being undefined. > * Try to fix Doxygen compliants. > > Signed-off-by: Morten Brørup <m...@smartsharesystems.com> > Acked-by: Tyler Retzlaff <roret...@linux.microsoft.com> > --- > lib/eal/arm/include/rte_memcpy_32.h | 8 ++++++++ > lib/eal/arm/include/rte_memcpy_64.h | > 6 ++++++ > lib/eal/include/rte_common.h | 29 +++++++++++++++++++++++++++++ > lib/eal/ppc/include/rte_memcpy.h | 3 +++ > lib/eal/x86/include/rte_memcpy.h | 6 ++++++ > 5 files changed, 52 insertions(+) > Reviewed-by: Ruifeng Wang <ruifeng.w...@arm.com>
Thanks and regards.