From patchwork Thu Jan 9 17:38:37 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: 13933059 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 9AEA0E77197 for ; Thu, 9 Jan 2025 17:39:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2897A6B00A6; Thu, 9 Jan 2025 12:39:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 210C96B00A5; Thu, 9 Jan 2025 12:39:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 088CD6B00A6; Thu, 9 Jan 2025 12:39:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D74F96B00A4 for ; Thu, 9 Jan 2025 12:39:58 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id A62D21C68EF for ; Thu, 9 Jan 2025 17:39:58 +0000 (UTC) X-FDA: 82988626476.09.8B11879 Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by imf14.hostedemail.com (Postfix) with ESMTP id 9B772100005 for ; Thu, 9 Jan 2025 17:39:56 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=UQ3swVZv; dmarc=pass (policy=none) header.from=collabora.com; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf14.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1736444396; a=rsa-sha256; cv=pass; b=El9TQoqrHhEfOJWsC5KBCauR0eeFtzvRQbe3Iny+/JepHcj8b/4uq9SxMmtv/Iz/Y3vByG f49ixK0f2iwd5UYKrLtK/nyr2pr13fusg70lt6Irm8/bdkSwsUjTLFaoxlU78NtK5jQf+X LeR1NzopS8voZGmJyXiNjHM2TqOLGYI= ARC-Authentication-Results: i=2; imf14.hostedemail.com; dkim=pass header.d=collabora.com header.s=zohomail header.b=UQ3swVZv; dmarc=pass (policy=none) header.from=collabora.com; arc=pass ("zohomail.com:s=zohoarc:i=1"); spf=pass (imf14.hostedemail.com: domain of usama.anjum@collabora.com designates 136.143.188.112 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1736444396; 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=cUnEN6YUpTMMgOpnHZpEAdwLBYl8OGrY4+GN/GOq3J8=; b=ki2c203QXTn4JIvTEPXAIvCAcP+6PCfD71OgJ/xQ3C6OUGBAjkHIlcoVCqsGxj/8P7TNeP K1X2NwV5+lKze1G5IImqTDSulRhrFDrKVI0pjyd3R2skG6Ms5Y3DJpu9QgZ7pZDEkifJUu eD6WCPO0tpRE4KhL4SFsudulV5bccQ4= ARC-Seal: i=1; a=rsa-sha256; t=1736444384; cv=none; d=zohomail.com; s=zohoarc; b=PHb8dCW9PsSrkgiVvy89CX6NtRRSc5wJyJpqofaA9Dm9uTekK3hmP66n8zHmSXHaLwXdnsfJrZSi1lb2CgfN/56gU4Ldb0pz7NymDHXvtk2CwX5+fv/hilL3lnzaYdgWheqFhhbo+id4bokFtW+lmDgoLVZVQkk6BmY6NqB/c58= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1736444384; 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=cUnEN6YUpTMMgOpnHZpEAdwLBYl8OGrY4+GN/GOq3J8=; b=U3qhjteAQzwH/C2ZCdDKiIb4CM/PFVYxhZ7tHLLsitY0XLdGkKQopA+BIb2ltOTCFS49X776Q+777LD8rw4E00V+8KsmovQpxFpm5Kk2X67IVN7sRIbG/RjYBtjoVH6/ysbjS6GFaFeu6X7NS1PUXHkYrOBqkD9OXKCAU+fJh+g= 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=1736444384; 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=cUnEN6YUpTMMgOpnHZpEAdwLBYl8OGrY4+GN/GOq3J8=; b=UQ3swVZvqhbr8qX8U+H5z1BO9RPCr4yETMNjAHOUT7lN3IGgsnEudIoj+S4145Pj shouJU/NVGZtxN/HmJ7FskpjssHRat7nBX50KjAcvWfno+eXQtCwc0HS9SYWUVkvgZF j4Sg2EPiAvoUzvP7h5OGLApi6fVsywicPRqBiaRs= Received: by mx.zohomail.com with SMTPS id 1736444383262634.9970969812879; Thu, 9 Jan 2025 09:39:43 -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 11/16] selftests/mm: hugetlb-read-hwpoison: Fix type mismatch warnings Date: Thu, 9 Jan 2025 22:38:37 +0500 Message-Id: <20250109173842.1142376-12-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-Stat-Signature: gxgfcw3j5emfmuokmm1jtze7m4yyjumk X-Rspam-User: X-Rspamd-Queue-Id: 9B772100005 X-Rspamd-Server: rspam08 X-HE-Tag: 1736444396-675658 X-HE-Meta: U2FsdGVkX1+7KtzfK/FWnmsnupazf0utaciJbN2CQHRCpn7ABpkWNe2N22iBb88/k6Io+VAMZBZLolFSQ/+8djtctWPp+iaG4yHtyS92q+poOHX64VPLs5lfCQLDiNp4Yxzd+Pqg/udzwtATgSfjMjmJqF1vRpU0DqAR26hViF1hMYTxvLL0qAfNApnBapuLZD/NWqSaLvQgwCZsC6A2zIg64gWyODgppmtWM+nEhffWWaPcsxOIQi8B3zU3/6gNBbF+OiNfbj4w9ROrned/QglKG+5Q9e00kFkgQYEAWjhqDRrn0pg1tHXXpWbTX5ns+YRsK98JgUSPjbbzQ0HBw4lKdza5yJtatSoZBoMDJipqJfRg5Suq3n9CZDpQipqn9HXDqkSLh0+QUKvDNjna5BYj328PEjf/NvIOggBkRBM/DS+h/bvzViS0mARRen7SRsF7NUaIqP1WnJ5NnVOXJlgceWFrpBCJ7P7CDd6QRt+UuKWRyZxvlLgyE3GFNb+hGmHHiVke97uUeaPXJQU6pgMCtFSx6aBCx7tAgabgUUWJnA19rFmqOEBfEpi98q3R67RFcGBkdpt3Vrafayf9in8k7CMxrgb48C+pAHFnGz6xCFbH1HpgYRNI1TLofZRtn2dAv7Ev0gnwjplaRLW1FFjW1tCIVXkEN8YsVrhkSw0giK09w3BT4nJxfSFoFCuwo8K7oo0EIZlx4GrPai0a1OH5vbmNEzPasvyN4gIcIjO+CrvL1qhaP/nCM7CdLhgI/4P4WmhD5ilaffm9ZyFDlbNXus6YdYZTCrhTkVyRBICqnosbFaeCUiDW+xox0yDXVHVWUqcIdZsKgq6m/bS3Ml+cXEq5RtzBKehwbt60oQJGkh/tU35paP7EDFy1GVsAJ0NzGEFsUTvdTbzPVLEoamf5qftz5vxVy31sucVpTwwt5UpGkT9qodKJy85hAjEnZX+X/GM43Lj+Ras95+Z v+GihtJx VDN3VeNBua/YQ/s9x727vP2QWUEucdekXeBa0L70CTUmrmNTpSn2l8h6VHmmDDfXAEktKQsE/nehXaLqCn9a8qZj3+TSV9oB4A9/PkL6glU2ge7cZ3pWmB5QVMk/jvw5sxbWmwcjpPyk/Nv0RyQxFE02FJRVngon6vCN6Jveho5plM+cWbKAtlPb5+A4e99vxGkd3o4uch5vvXLKwh0T29EZxdY0/Ai7LU0f2RK667tR16gcUTrV1Fob0Zs0XXBa/pWQ+5dmiwEHwY9zzKhzfooOIuF2E+nGZSjksZa6EP8kV717h5yMvswy9x0bvS5FZf9n6 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000203, 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 type mismatch warnings. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/mm/hugetlb-read-hwpoison.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c b/tools/testing/selftests/mm/hugetlb-read-hwpoison.c index ba6cc6f9cabcd..e2a2bb1989d58 100644 --- a/tools/testing/selftests/mm/hugetlb-read-hwpoison.c +++ b/tools/testing/selftests/mm/hugetlb-read-hwpoison.c @@ -72,7 +72,7 @@ static bool seek_read_hugepage_filemap(int fd, size_t len, size_t wr_chunk_size, { char buf[MAX_WRITE_READ_CHUNK_SIZE]; ssize_t ret_count = 0; - ssize_t total_ret_count = 0; + size_t total_ret_count = 0; char val = offset / wr_chunk_size + offset % wr_chunk_size; printf(PREFIX PREFIX "init val=%u with offset=0x%lx\n", val, offset); @@ -83,7 +83,7 @@ static bool seek_read_hugepage_filemap(int fd, size_t len, size_t wr_chunk_size, return false; } - while (offset + total_ret_count < len) { + while ((unsigned long)offset + total_ret_count < len) { ret_count = read(fd, buf, wr_chunk_size); if (ret_count == 0) { printf(PREFIX PREFIX "read reach end of the file\n"); @@ -109,7 +109,7 @@ static bool read_hugepage_filemap(int fd, size_t len, { char buf[MAX_WRITE_READ_CHUNK_SIZE]; ssize_t ret_count = 0; - ssize_t total_ret_count = 0; + size_t total_ret_count = 0; char val = 0; printf(PREFIX PREFIX "expect to read 0x%lx bytes of data in total\n",