DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Elena Agostini <eagostini@nvidia.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH v1] gpu/cuda: set unused gdrcopy functions arguments
Date: Thu, 10 Mar 2022 21:23:38 +0100	[thread overview]
Message-ID: <2817309.e9J7NaK4W3@thomas> (raw)
In-Reply-To: <20220310000650.25171-1-eagostini@nvidia.com>

10/03/2022 01:06, eagostini@nvidia.com:
> From: Elena Agostini <eagostini@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@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.



      reply	other threads:[~2022-03-10 20:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10  0:06 eagostini
2022-03-10 20:23 ` Thomas Monjalon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2817309.e9J7NaK4W3@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=eagostini@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).