From patchwork Thu Jan 9 17:38:40 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: 13933062 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 D8F0AE7719A for ; Thu, 9 Jan 2025 17:40:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 658846B00AB; Thu, 9 Jan 2025 12:40:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 608126B00AC; Thu, 9 Jan 2025 12:40:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 481296B00AD; Thu, 9 Jan 2025 12:40:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 265AA6B00AB for ; Thu, 9 Jan 2025 12:40:16 -0500 (EST) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id DCB561C6A07 for ; Thu, 9 Jan 2025 17:40:15 +0000 (UTC) X-FDA: 82988627190.14.4593888 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf25.hostedemail.com (Postfix) with ESMTP id ECDA8A0009 for ; Thu, 9 Jan 2025 17:40:13 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=OqtrwqmQ; spf=pass (imf25.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=pass ("zohomail.com:s=zohoarc:i=1") ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1736444414; a=rsa-sha256; cv=pass; b=INgZ5+SqIJ+dCsFLNLPJgkwmSVjGXM3b8V+PZp4+y/XpbFYHAdtp8XQT4xGLclTc/ViO1I VqnNgmK4o2JFde6inMILQisCyVXTZDWH6bjcZM/7W0Y1wUq9Cp1doSx9OotST83sBaTilv hheyuJr3RRyIH1Uu1JW/uet8N1LylUk= ARC-Authentication-Results: i=2; imf25.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=OqtrwqmQ; spf=pass (imf25.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=pass ("zohomail.com:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736444414; 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=jExE7sSKlOBw8hiTubKK6vBM62dOLKsuL/Hd624njm0=; b=ig/+AxfXHfQ2hLjlKpaB1L+btqFd+XWFchuSKjpaXLfvlBql/EVu4n3/WQMqNVCsO0bhNS ka6Q5I3A5MzkgtkfqG6/zEoNb0Bwj1e/0DFJjpedxedtEqSy3TDsJuWJGf1NmRtqKtaFpl FcA3jNZEykwQd4Zbtq68f4LmhQu7nS4= ARC-Seal: i=1; a=rsa-sha256; t=1736444400; cv=none; d=zohomail.com; s=zohoarc; b=RKT/gDA02p5jlVeA0ZbGdM6gvQ1lXql/mRPcPhYmrgpAWdlBYGw/6R1eHKPUaICqGTSQsuCwjzQ+BblY+QHmUwPHgGtfm1nKB/tuyz3joF6fCkRmSnK5dD4/vDQtb1dfvy4YFpjHUv/CX+lcWMm1qEViRaKb9zeE3qhmaV8zktc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1736444400; 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=jExE7sSKlOBw8hiTubKK6vBM62dOLKsuL/Hd624njm0=; b=mccv1hFXvmsaa923Bm/zl8be9pFJqVhaz6+MXRnAbEJIO2QwYY8dUf8Nzzdo56yIWHwVXAe1MVNOdXG3j4btiny4SRCjxCbRvYKhLDIbP4Yo0pot8QghDP+soM9f+iaaYFEdYOVM1M7CgEhfxFyZreTokRLIDgpNbOdSwjGrZR8= 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=1736444400; 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=jExE7sSKlOBw8hiTubKK6vBM62dOLKsuL/Hd624njm0=; b=OqtrwqmQveeDkFGdhTZ7RPC8k3KFXiDUsZQ+0JYO9UXiSr4piapx1Q3hAVYr4bbm wVl9zGA7DV2gmu2tXYAoy1E89945Czf4gC7qPh3JFs0u/uJpGEBv9szx5xtTl/BIdnW 6x1E0vqVaF0ZRTYEJwHHsybiJhTs/JzKMtkNyBTg= Received: by mx.zohomail.com with SMTPS id 1736444398626830.5404799734731; Thu, 9 Jan 2025 09:39:58 -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 14/16] selftests/mm: thuge-gen: Fix type mismatch warnings Date: Thu, 9 Jan 2025 22:38:40 +0500 Message-Id: <20250109173842.1142376-15-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: ECDA8A0009 X-Stat-Signature: 4xpitf56sccskfojoew7cajcz63mqct1 X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1736444413-736621 X-HE-Meta: U2FsdGVkX1/kbnR57GK4I3hJZnUbPuK12qpTL51GDfnQItJu7Ebt4iJGDNwJ78aBlKULNqt1U58UaGkhvKwnmvbYCQtm43vVU1Zr58/Xg7UG+MxBjEzWdn2ZW1rpTOxsqPkGsCm3Cxn81K/M4Aa/+46t6Uk4oTx7YxkglitWzJc7vatyHyl0EsbP9/hRn9oX7zlOu7ODA+PiacYJiRfkaVtNxfSM90fmydl6ishlQqzi0jjK3lzDBAty94fayyeu3OXdy9w+qL+NluZqjO9X8fuOg5YP3748SaxEfC2icDgHaU7PM8zyfjzEVs892WMAIFQ9SkzTssbbefQLbxWX5HkzeKxQ06baGvIQgo3fVpRrvF8DOqzhUZTVPfVj05iWaIY/TFn5GiU0/cgEcHdpLET4rto24ftXdpc+PFmGMtbGnqUaNwV5Ikzj7VMkFS/6eNjh1HKFlvYyoSgvkFbcOyJFu7CZk4ZuTpW+D7zxSm2LEjJS7ZWcVzqfFOKolwGXmpeXjaYyYjvZ+tlxou5FPKMHmSIH9pmTCx8sn6eF8LkOeYlolUxfsJS5e7e8rBN///Av3I66mhXX8l1BSsBRmmryt29Nvz0fp3u+6Rn9ztX8BdhKzbKMD/hHmwRVEIFJ0zIb1ABfjEbvvHAE/th5pIFhAQN3wne6HuPgCG/3gZpGPy7LumShWFn67bl6XMrpZTfOZVkqpkoDqUHE0szfSOyQ8rGElAtZo1zvxfEMLtBmL1bIOFLFlFPOIHpY97vrnDfVFf/4qtGTzc7BGvO3165+IOhCxSpPfEcOZnZ1l31RU/SyLxdGhLCB30Vb0yLYCAs8Tw1bHgMFBwrnsCwbQjOQN2ltjV73ID4vNsIAjirSDaTJIyO+hpvHEBsc7v0TqtsXCGg/PfPqEHWwV4nCg+3GI9D6DbeKcdE0ciuBxNAEJQATW9LrtFtB7T10S6/IRk0XHZEN2CjZXCwpAhk fhmZXyY2 I0/WdIh/g17EOSwfOAaf6WKzarh5NF6gcxiP0VLswJ43/H6/4HnV9NXIinY8U/DVMl8vb0hRQyyZKdE06Fct4Z3h7qARl6UhPsrB530IVk0I2qFAniXlhXtnUigAgQtMo8d1k9Tp11sP/NpCa5eMmDfLh1X7PxlLpk7dXWlMtsyFFBPoyIOztWX4vThr11PQdkfTTfQAFnLdmfh/q4funajNFipNQZXgtINwSdqn0inE1BoXybq00vQKBrGaDrn5En6v4hC/zNVa0AURz4pStVfTad7weYtgD1gXIAZZyaU+i9xg0mmsPczL1U8oAmYPN+I7x X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Fix all the found type mismatch warnings. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/thuge-gen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/mm/thuge-gen.c b/tools/testing/selftests/mm/thuge-gen.c index e4370b79b62ff..515b89ac4eb59 100644 --- a/tools/testing/selftests/mm/thuge-gen.c +++ b/tools/testing/selftests/mm/thuge-gen.c @@ -65,7 +65,7 @@ void show(unsigned long ps) { char buf[100]; - if (ps == getpagesize()) + if ((signed long)ps == getpagesize()) return; ksft_print_msg("%luMB: ", ps >> 20); @@ -106,7 +106,7 @@ unsigned long read_sysfs(int warn, char *fmt, ...) unsigned long read_free(unsigned long ps) { - return read_sysfs(ps != getpagesize(), + return read_sysfs((signed long)ps != getpagesize(), "/sys/kernel/mm/hugepages/hugepages-%lukB/free_hugepages", ps >> 10); } @@ -126,7 +126,7 @@ void test_mmap(unsigned long size, unsigned flags) after = read_free(size); show(size); - ksft_test_result(size == getpagesize() || (before - after) == NUM_PAGES, + ksft_test_result((signed long)size == getpagesize() || (before - after) == NUM_PAGES, "%s mmap\n", __func__); if (munmap(map, size * NUM_PAGES)) @@ -164,7 +164,7 @@ void test_shmget(unsigned long size, unsigned flags) after = read_free(size); show(size); - ksft_test_result(size == getpagesize() || (before - after) == NUM_PAGES, + ksft_test_result((signed long)size == getpagesize() || (before - after) == NUM_PAGES, "%s: mmap\n", __func__); if (shmdt(map)) ksft_exit_fail_msg("%s: shmdt: %s\n", __func__, strerror(errno)); @@ -173,7 +173,7 @@ void test_shmget(unsigned long size, unsigned flags) void find_pagesizes(void) { unsigned long largest = getpagesize(); - int i; + unsigned int i; glob_t g; glob("/sys/kernel/mm/hugepages/hugepages-*kB", 0, NULL, &g);