All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot2 for John Stultz" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: John Stultz <jstultz@google.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Justin Stitt <justinstitt@google.com>,
	Shuah Khan <skhan@linuxfoundation.org>,
	stable@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: [tip: timers/urgent] selftests: timers: Fix posix_timers ksft_print_msg() warning
Date: Fri, 12 Apr 2024 12:15:29 -0000	[thread overview]
Message-ID: <171292412916.10875.16404428821258401754.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20240410232637.4135564-1-jstultz@google.com>

The following commit has been merged into the timers/urgent branch of tip:

Commit-ID:     e4a6bceac98eba3c00e874892736b34ea5fdaca3
Gitweb:        https://git.kernel.org/tip/e4a6bceac98eba3c00e874892736b34ea5fdaca3
Author:        John Stultz <jstultz@google.com>
AuthorDate:    Wed, 10 Apr 2024 16:26:28 -07:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 12 Apr 2024 14:11:15 +02:00

selftests: timers: Fix posix_timers ksft_print_msg() warning

After commit 6d029c25b71f ("selftests/timers/posix_timers: Reimplement
check_timer_distribution()") the following warning occurs when building
with an older gcc:

posix_timers.c:250:2: warning: format not a string literal and no format arguments [-Wformat-security]
  250 |  ksft_print_msg(errmsg);
      |  ^~~~~~~~~~~~~~

Fix this up by changing it to ksft_print_msg("%s", errmsg)

Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()")
Signed-off-by: John Stultz <jstultz@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Justin Stitt <justinstitt@google.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240410232637.4135564-1-jstultz@google.com
---
 tools/testing/selftests/timers/posix_timers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/timers/posix_timers.c b/tools/testing/selftests/timers/posix_timers.c
index d86a0e0..348f471 100644
--- a/tools/testing/selftests/timers/posix_timers.c
+++ b/tools/testing/selftests/timers/posix_timers.c
@@ -247,7 +247,7 @@ static int check_timer_distribution(void)
 		ksft_test_result_skip("check signal distribution (old kernel)\n");
 	return 0;
 err:
-	ksft_print_msg(errmsg);
+	ksft_print_msg("%s", errmsg);
 	return -1;
 }
 

      parent reply	other threads:[~2024-04-12 12:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-10 23:26 [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning John Stultz
2024-04-10 23:26 ` [PATCH 2/3] selftests: timers: Fix uninitialized variable warning in ksft_min_kernel_version John Stultz
2024-04-11 15:39   ` Nathan Chancellor
2024-04-11 18:11     ` John Stultz
2024-04-11 18:47       ` Nathan Chancellor
2024-04-10 23:26 ` [PATCH 3/3] selftests: timers: Fix abs() warning in posix_timers test John Stultz
2024-04-12 12:15   ` [tip: timers/urgent] " tip-bot2 for John Stultz
2024-04-10 23:28 ` [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning Justin Stitt
2024-04-11  9:38 ` Oleg Nesterov
2024-04-11 20:45 ` Shuah Khan
2024-04-11 20:53   ` John Stultz
2024-04-11 21:12     ` Shuah Khan
2024-04-12 12:15 ` tip-bot2 for John Stultz [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=171292412916.10875.16404428821258401754.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=jstultz@google.com \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.