[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250109173842.1142376-8-usama.anjum@collabora.com>
Date: Thu, 9 Jan 2025 22:38:33 +0500
From: Muhammad Usama Anjum <usama.anjum@...labora.com>
To: Kees Cook <kees@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
Will Drewry <wad@...omium.org>,
Shuah Khan <shuah@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Jérôme Glisse <jglisse@...hat.com>,
linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Cc: Muhammad Usama Anjum <usama.anjum@...labora.com>,
kernel@...labora.com
Subject: [PATCH 07/16] selftests/mm: hmm-tests: Remove always false expressions
As default_hsize is unsigned, it is always greater than equal to zero.
Remove expression which is checking if it is less than 0.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
---
tools/testing/selftests/mm/hmm-tests.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/mm/hmm-tests.c b/tools/testing/selftests/mm/hmm-tests.c
index 141bf63cbe05e..3b4db583bd3b6 100644
--- a/tools/testing/selftests/mm/hmm-tests.c
+++ b/tools/testing/selftests/mm/hmm-tests.c
@@ -796,7 +796,7 @@ TEST_F(hmm, anon_write_hugetlbfs)
int ret;
default_hsize = file_read_ulong("/proc/meminfo", "Hugepagesize:");
- if (default_hsize < 0 || default_hsize*1024 < default_hsize)
+ if (default_hsize*1024 < default_hsize)
SKIP(return, "Huge page size could not be determined");
default_hsize = default_hsize*1024; /* KB to B */
@@ -1579,7 +1579,7 @@ TEST_F(hmm, compound)
/* Skip test if we can't allocate a hugetlbfs page. */
default_hsize = file_read_ulong("/proc/meminfo", "Hugepagesize:");
- if (default_hsize < 0 || default_hsize*1024 < default_hsize)
+ if (default_hsize*1024 < default_hsize)
SKIP(return, "Huge page size could not be determined");
default_hsize = default_hsize*1024; /* KB to B */
--
2.39.5
Powered by blists - more mailing lists