From: John Kacur <jkacur@redhat.com>
To: Tan En De <ende.tan@starfivetech.com>
Cc: linux-rt-users@vger.kernel.org, mtosatti@redhat.com,
williams@redhat.com, leyfoon.tan@starfivetech.com,
endeneer@gmail.com
Subject: Re: [1/1] rt-tests: cyclictest: Suppress unused parameter warnings
Date: Fri, 20 Dec 2024 13:07:44 -0500 (EST) [thread overview]
Message-ID: <2536ec36-44e3-e88c-1333-678dc41c649c@redhat.com> (raw)
In-Reply-To: <20241212162453.2618945-1-ende.tan@starfivetech.com>
On Fri, 13 Dec 2024, ende.tan@starfivetech.com wrote:
> From: Tan En De <ende.tan@starfivetech.com>
>
> Mark unused parameters with `__attribute__((unused))`.
You were probably trying to be consistent with the rest of the programs in
rt-tests, however, according to checkpatch,
WARNING: __always_unused or __maybe_unused is preferred over
__attribute__((__unused__))
__always_unused is slightly shorter, shall we try that instead?
John
>
> Signed-off-by: Tan En De <ende.tan@starfivetech.com>
> ---
> src/cyclictest/cyclictest.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
> index b1f8420..f2db5e4 100644
> --- a/src/cyclictest/cyclictest.c
> +++ b/src/cyclictest/cyclictest.c
> @@ -603,12 +603,12 @@ static int has_smi_counter(void)
> return 1;
> }
> #else
> -static int open_msr_file(int cpu)
> +static int open_msr_file(int cpu __attribute__((unused)))
> {
> return -1;
> }
>
> -static int get_smi_counter(int fd, unsigned long *counter)
> +static int get_smi_counter(int fd __attribute__((unused)), unsigned long *counter __attribute__((unused)))
> {
> return 1;
> }
> --
> 2.34.1
>
>
>
next prev parent reply other threads:[~2024-12-20 18:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 16:24 [1/1] rt-tests: cyclictest: Suppress unused parameter warnings ende.tan
2024-12-13 6:35 ` Crystal Wood
2024-12-20 18:02 ` John Kacur
2024-12-21 1:06 ` Crystal Wood
2024-12-20 18:07 ` John Kacur [this message]
2024-12-21 0:00 ` EnDe Tan
2025-01-07 22:06 ` Crystal Wood
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=2536ec36-44e3-e88c-1333-678dc41c649c@redhat.com \
--to=jkacur@redhat.com \
--cc=ende.tan@starfivetech.com \
--cc=endeneer@gmail.com \
--cc=leyfoon.tan@starfivetech.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=williams@redhat.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).