From: Sasha Levin <sashal@kernel.org>
To: Christian Brauner <brauner@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Sasha Levin <sashal@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Nathan Chancellor <nathan@kernel.org>,
llvm@lists.linux.dev
Subject: [PATCH] selftests/proc: avoid an ordered comparison of function pointers
Date: Tue, 1 Dec 2026 13:08:52 -0500 [thread overview]
Message-ID: <20261201180855.740952-4-sashal@kernel.org> (raw)
ASSERT_NE() finds out whether its arguments are signed with a relational
comparison on their type, which clang flags for function pointers:
proc-remove-mapped.c:132:2: warning: ordered comparison of function pointers [-Wordered-compare-function-pointers]
Check the result of signal() with ASSERT_TRUE() instead.
Fixes: a50a01d799cd ("selftests/proc: check that a mapped entry can be removed")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/proc/proc-remove-mapped.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/proc/proc-remove-mapped.c b/tools/testing/selftests/proc/proc-remove-mapped.c
index ea36fad6087c4..5fecf43ab0288 100644
--- a/tools/testing/selftests/proc/proc-remove-mapped.c
+++ b/tools/testing/selftests/proc/proc-remove-mapped.c
@@ -129,7 +129,7 @@ TEST_F(pci, remove_while_mapped)
SKIP(return, "mmap: %s", strerror(errno));
/* The BAR can be read while the device is there. */
- ASSERT_NE(signal(SIGBUS, on_sigbus), SIG_ERR);
+ ASSERT_TRUE(signal(SIGBUS, on_sigbus) != SIG_ERR);
if (sigsetjmp(fault, 1) == 0) {
v = *p;
} else {
--
2.53.0
reply other threads:[~2026-12-01 18:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261201180855.740952-4-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=shuah@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.