From: Shuah Khan <skhan@linuxfoundation.org>
To: Tobias Klauser <tklauser@distanz.ch>, Shuah Khan <shuah@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests/vDSO: fix -Wformat warning in vdso_test_correctness
Date: Thu, 17 Dec 2020 11:29:52 -0700 [thread overview]
Message-ID: <c3bb8366-f1ab-31bc-fd6c-7e7cbfeb72a1@linuxfoundation.org> (raw)
In-Reply-To: <20201217163235.22788-1-tklauser@distanz.ch>
On 12/17/20 9:32 AM, Tobias Klauser wrote:
> Fix the following -Wformat warnings in vdso_test_correctness.c:
>
> vdso_test_correctness.c: In function ‘test_one_clock_gettime64’:
> vdso_test_correctness.c:352:21: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘long long int’ [-Wformat=]
> 352 | printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
> | ~~~~^
> | |
> | long int
> | %09lld
> 353 | (unsigned long long)start.tv_sec, start.tv_nsec,
> | ~~~~~~~~~~~~~
> | |
> | long long int
> vdso_test_correctness.c:352:32: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘long long int’ [-Wformat=]
> 352 | printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
> | ~~~~^
> | |
> | long int
> | %09lld
> 353 | (unsigned long long)start.tv_sec, start.tv_nsec,
> 354 | (unsigned long long)vdso.tv_sec, vdso.tv_nsec,
> | ~~~~~~~~~~~~
> | |
> | long long int
> vdso_test_correctness.c:352:43: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
>
> The tv_sec member of __kernel_timespec is long long, both in
> uapi/linux/time_types.h and locally in vdso_test_correctness.c.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
> ---
> tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
> index 5029ef9b228c..c4aea794725a 100644
> --- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
> +++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
> @@ -349,7 +349,7 @@ static void test_one_clock_gettime64(int clock, const char *name)
> return;
> }
>
> - printf("\t%llu.%09ld %llu.%09ld %llu.%09ld\n",
> + printf("\t%llu.%09lld %llu.%09lld %llu.%09lld\n",
> Thanks for the patch.
Thanks for the patch.
Applied to linux-kselftest next
thanks,
-- Shuah
prev parent reply other threads:[~2020-12-17 18:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-17 16:32 Tobias Klauser
2020-12-17 18:29 ` Shuah Khan [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=c3bb8366-f1ab-31bc-fd6c-7e7cbfeb72a1@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=tklauser@distanz.ch \
--cc=vincenzo.frascino@arm.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
all inboxes | Powered by JetHome®