> -----Original Message----- > From: Morten Brørup <[email protected]> > Sent: Saturday, December 3, 2022 10:23 PM > To: [email protected]; [email protected] > Cc: Ruifeng Wang <[email protected]>; [email protected]; > [email protected]; > [email protected]; [email protected]; > [email protected]; Morten > Brørup <[email protected]> > 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 <[email protected]> > Acked-by: Tyler Retzlaff <[email protected]> > --- > 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 <[email protected]>
Thanks and regards.

