From patchwork Thu Jan 9 17:38:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 13933054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C391E77199 for ; Thu, 9 Jan 2025 17:39:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EE10E6B009B; Thu, 9 Jan 2025 12:39:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E917A6B009C; Thu, 9 Jan 2025 12:39:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D592F6B009D; Thu, 9 Jan 2025 12:39:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B5DB56B009B for ; Thu, 9 Jan 2025 12:39:39 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 7288D160345 for ; Thu, 9 Jan 2025 17:39:39 +0000 (UTC) X-FDA: 82988625678.02.641E6CA Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf29.hostedemail.com (Postfix) with ESMTP id 9888A120010 for ; Thu, 9 Jan 2025 17:39:37 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b="XU/sASa1"; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf29.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=none) header.from=collabora.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736444377; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Ns4Cnzb7SpJKJg+vEktGwwn4CtMu0+tM6En/nkl/o18=; b=YAji59CWH+Nt1/Osiq0ONwLQ8cQ6NuCWGZ7WpW4vyfEIU3dKyTKRGCpp15eOiE6RNg30CE cZg+Tp0nFM/ltJRxkJdQ0RhaMWSxHZo7Zql+cXichFBqjsWfZ0zc8jQT804enjW0lQlPnU o/ghUdHD3uASeO2L4j+uE6RjUwnGY6s= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1736444377; a=rsa-sha256; cv=pass; b=5jdGt1CLOv10dda4eAS3HZ/ZVVJzlm3L0G78uOQf9y7FW+zbXmh3WtGjfbABWRv/VfsrtI OA9TJrfGRhHbfwD22bN6V4v3uPY9PFj1de3WfkR2Kuh/Lqg7E5/8NkTGu/GtJNy45uu3TX M1PNGn6JNmqHwVDu9Qw4tiGUYvBTZRw= ARC-Authentication-Results: i=2; imf29.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b="XU/sASa1"; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf29.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=none) header.from=collabora.com ARC-Seal: i=1; a=rsa-sha256; t=1736444363; cv=none; d=zohomail.com; s=zohoarc; b=GcRTWK8stBDDIx3AFdOF3FC0tL59k7NOZ/YfNMyaUnC+X4d5U0tq7M11m6RxtYTSPrhSv542fV1l+RATOAgW1YdlM66s1wlEzlNPeU9ilQxHhLv8Cj9GauCHVHPfV+1gXfj5ua8uGYEShRs+cv3YJ/BeEFvZz0PWCjrgfn10GsU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1736444363; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ns4Cnzb7SpJKJg+vEktGwwn4CtMu0+tM6En/nkl/o18=; b=HIeETnI+JRyrYG3axVdu04XWKOIIOVK6EAJoXYy+aIiXkvmFm/A8XaFv8u8IKdtCxF+rk0Ws3xmtVPgb7KKLhbuEPfPJxnMLmvXgRN4DWK7BT+Y5zZjc16SX2y+5TfjWJKwRU4icIt0Dir/igpoTRw1rbzenAy39/mDTqdSB+S4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1736444363; s=zohomail; d=collabora.com; i=usama.anjum@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=Ns4Cnzb7SpJKJg+vEktGwwn4CtMu0+tM6En/nkl/o18=; b=XU/sASa1xATVXTeeB8hh/d7+0vZQ5lAGzXWOEWzpKhC4sNIoFpqSo+akp9eu1Cwq A7BHMKJO//06Zd5vbwFFfrPlnC5e7lFSns9uYNJdfyBxtJMwIBerXgc+Idcb1cTvHF2 wWX9wuwy9o+xj0v/fCN5PPabFf/TJQxsxBFr1jTI= Received: by mx.zohomail.com with SMTPS id 1736444362474197.40330045642895; Thu, 9 Jan 2025 09:39:22 -0800 (PST) From: Muhammad Usama Anjum To: Kees Cook , Andy Lutomirski , Will Drewry , Shuah Khan , Andrew Morton , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: Muhammad Usama Anjum , kernel@collabora.com Subject: [PATCH 07/16] selftests/mm: hmm-tests: Remove always false expressions Date: Thu, 9 Jan 2025 22:38:33 +0500 Message-Id: <20250109173842.1142376-8-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250109173842.1142376-1-usama.anjum@collabora.com> References: <20250109173842.1142376-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-ZohoMailClient: External X-Rspamd-Queue-Id: 9888A120010 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: e3kng171det9anyqezcuc45fwb1xfqrf X-HE-Tag: 1736444377-594363 X-HE-Meta: U2FsdGVkX18hCGXP6xtcJj8G4jNXsfjOzdZWqpitT0siKkl1m1nOYBkQChvu0kCSNDBK+r2c6184Y+bwEqUUJzmijKXJehb0b1J+rudBvLV+GmTdHII0k8LKH8IbR29h9uO0hcQeLeLzn/SNOZPSJh7Cw9rol4fYu6wa9yfK89CY85W1CvgvSMBwytSSaOCfNb2J5imCo9LDrXgZ7pjKuGBMhYRwJ0LJxVcF2TTOnopLZOtheghNr+oUNpC5PMx7zM5u9U+9UZGkoAPvE/W0Y0IUn6kTRpA+8K0NeCGsddor7X/9rZ9c8H1V51Nah45Y/rY8arMb0QNo3W0W9Z/Sf05lHNYi7EsSi5i1VrS3KmVz2pPmgDgfGNXJj3McAWFYqv9t0yT8sBdxQER7qQQJ/aRu1KOyZSlHWeUTF2H9WuyThxRbtP0R6WxJsdv/d7CJT0986GjSi2sw2fkRzx7hDI1fonjvCsjnVemVwppvEfGMmTufB5cgv/nmPD7CepfJ465qFARVxUbchdNkjgXUglNS8FpjS2nu9me1xZlQ1HNgSlmGxb0awr5AIkfmy9J2I1KZ1WftBZjRrYzaXuqjD66wozzih9z6BNC6LgEvYajiMbBSwUpMUU5Hwxg0jpqJbsBCxCzyiX+QjU6dIT3YfPGfancxloVtKDOL3oN9qqIC1+2fe8/L5C6egXldzS3ku+pRF3sNPY2Kn94R92VPFiDEYTCAiWtwXmxKa+65gtl+sxN6dM5xVIViKbZa4IOkUbA6MXQAmTMNxpvc21I+dZr42hzZVCUZMHNYrzOPsUa4g0KTsMfft0zgaP63j1kRd0bo5eyYQ+LD1CuSggDhZY2cwbl6acg6SNZTMqMP9ZHTphtDOu0JYVfFvqOtdy5EEwKcvtX6v3SCkl587dkvmUF8hdspVA11ufGAHCz5aAAbKs0E2twwWjQMYnXtdDwQCSt7CtQaSQxJQaGOx/k VWlYTfF7 PVF+UWCmpLsbLTxCP+dQJxO51dfev+Ux4nK+yUAgNZz2g28A7IZmBjZVrk/uJB5ElpaA/US092K8i1jRyRlvTB7HQfBpGNZHCT0JLaeHWw65v6iamWqleiDjZzXrq3M+kzed6+JBqY8sNA3sMm+VKLc0Ta1rnmNUnpcueDVkSx2xVN2Bp684pR6l7PIdUCIxY4qT/D3PGWAJtOC+NXYlWiUFMiniSFxsb5G3qrFOAuiABe0tyWOiAEOINuXOYIUOaho5t83RkOnvs1DL+fFDSg9mgWlFpX15wKkqYEOqDm8xtjnFKa2+XIAP5qygABxlc+SaR X-Bogosity: Ham, tests=bogofilter, spamicity=0.001886, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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 --- 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 */