[PATCH v1] gpu/cuda: set unused gdrcopy functions arguments
Thomas Monjalon
thomas at monjalon.net
Thu Mar 10 21:23:38 CET 2022
10/03/2022 01:06, eagostini at nvidia.com:
> From: Elena Agostini <eagostini at nvidia.com>
>
> Without enabling gdrcopy, dpdk build has warnings about
> unused gdrcopy functions input parameters.
As developers we should test with --werror option given to meson,
so we don't miss such details.
This is what the script devtools/test-meson-builds.sh does.
> This patch set them to __rte_unused .
>
> Fixes: 24c7759 ("gpu/cuda: map GPU memory with GDRCopy")
Let's keep this casing of GDRCopy in the new title.
> Signed-off-by: Elena Agostini <eagostini at nvidia.com>
> ---
> int
> -gdrcopy_pin(gdr_t *gdrc_h, __rte_unused gdr_mh_t *mh, uint64_t d_addr, size_t size, void **h_addr)
> +gdrcopy_pin(__rte_unused gdr_t *gdrc_h, __rte_unused gdr_mh_t *mh, __rte_unused uint64_t d_addr, __rte_unused size_t size, __rte_unused void **h_addr)
While at it, break the too long line.
It seems my compiler is smart enough to not require the unused attribute
for parameters used in another branch of #ifdef.
But it is probably required for some old compilers.
Applied, thanks.
More information about the dev
mailing list