From patchwork Mon Dec 5 19:37:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13065039 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 8F6FEC4332F for ; Mon, 5 Dec 2022 19:37:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DC3E08E0006; Mon, 5 Dec 2022 14:37:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D4DF88E0005; Mon, 5 Dec 2022 14:37:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B030F8E0006; Mon, 5 Dec 2022 14:37:32 -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 9AAC28E0005 for ; Mon, 5 Dec 2022 14:37:32 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6FEC11207CA for ; Mon, 5 Dec 2022 19:37:32 +0000 (UTC) X-FDA: 80209261944.13.6FEBF94 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf27.hostedemail.com (Postfix) with ESMTP id 09BC140006 for ; Mon, 5 Dec 2022 19:37:31 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gFHv+YSm; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1670269052; a=rsa-sha256; cv=none; b=a64efS47k7nkODPnLMJT7GOQCTI+S09UW3w34qMO2mrmSVwauJZulrelgmEn7PhsE9CQl2 OoiJ3CyxDLdevX9vMp1rcEGj7Kuq/pYPc7eS+YYiYpNabdhNyoNAPZxHIhezzZ1itE7Fcu AXZBATUnxYLemp7XRoGWru9/mIqAXQM= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=gFHv+YSm; spf=pass (imf27.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1670269052; 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=eWQ4pPsBzpe6OTUvcnaLk/UT4hr86kNhRIgvcHh2HCk=; b=hNxO1jgwW232W7NBoXGtORsyLzOug7UVDZYzlq9t7To/9VATimeiQGLD7ol3z9O1dTaP1x 2spe65fmtpvHFxOI690EKSJqwts+mRtshVIh99nKbEd1BXIVFfGyEPb5EarNfYmkEgxOzv ffbd4QnSaUMArq+iReOxILzDgTQDxX0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670269051; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eWQ4pPsBzpe6OTUvcnaLk/UT4hr86kNhRIgvcHh2HCk=; b=gFHv+YSm/NGSrIsjFH5Cen42gqHzw8VgRAZ+rZyGrIM0YRn81AzbkBKZyiHxqSV9MbFObV EMNZCdDSsBtPn+Kwmb9HNtcoZpdIAlNKj3hB4NUFhC25dS1Xw4OnZUf9TdUvpv01jgqhCZ kQ2y/83XfuEYZpvi3N2g5HaZEnjVCgE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-260-ajpONTwvN6mbx4Wv6398SA-1; Mon, 05 Dec 2022 14:37:28 -0500 X-MC-Unique: ajpONTwvN6mbx4Wv6398SA-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CD9F78569A4; Mon, 5 Dec 2022 19:37:27 +0000 (UTC) Received: from t480s.fritz.box (unknown [10.39.193.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E57F2028CE4; Mon, 5 Dec 2022 19:37:26 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, linux-kselftest@vger.kernel.org, David Hildenbrand , Andrew Morton , Shuah Khan , Yang Li Subject: [PATCH mm-unstable v1 3/4] selftests/vm: cow: fix compile warning on 32bit Date: Mon, 5 Dec 2022 20:37:15 +0100 Message-Id: <20221205193716.276024-4-david@redhat.com> In-Reply-To: <20221205193716.276024-1-david@redhat.com> References: <20221205193716.276024-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Rspam-User: X-Spamd-Result: default: False [-3.24 / 9.00]; BAYES_HAM(-5.84)[99.67%]; R_MISSING_CHARSET(2.50)[]; MID_CONTAINS_FROM(1.00)[]; DMARC_POLICY_ALLOW(-0.50)[redhat.com,none]; R_SPF_ALLOW(-0.20)[+ip4:170.10.133.0/24]; R_DKIM_ALLOW(-0.20)[redhat.com:s=mimecast20190719]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_SEVEN(0.00)[7]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[redhat.com:+]; RCVD_COUNT_THREE(0.00)[4]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_SOME(0.00)[]; ARC_SIGNED(0.00)[hostedemail.com:s=arc-20220608:i=1]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 09BC140006 X-Rspamd-Server: rspam01 X-Stat-Signature: cmz59ytt8x39uxiuwerdapnyqxhfpif8 X-HE-Tag: 1670269051-657441 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: The compiler complains about the conversion of a pointer to an int of different width. Fixes: 6f1405efc61b ("selftests/vm: anon_cow: add R/O longterm tests via gup_test") Signed-off-by: David Hildenbrand --- tools/testing/selftests/vm/cow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/vm/cow.c b/tools/testing/selftests/vm/cow.c index 73e05b52c49e..26f6ea3079e2 100644 --- a/tools/testing/selftests/vm/cow.c +++ b/tools/testing/selftests/vm/cow.c @@ -650,7 +650,7 @@ static void do_test_ro_pin(char *mem, size_t size, enum ro_pin_test test, } /* Take a R/O pin. This should trigger unsharing. */ - args.addr = (__u64)mem; + args.addr = (__u64)(uintptr_t)mem; args.size = size; args.flags = fast ? PIN_LONGTERM_TEST_FLAG_USE_FAST : 0; ret = ioctl(gup_fd, PIN_LONGTERM_TEST_START, &args); @@ -669,7 +669,7 @@ static void do_test_ro_pin(char *mem, size_t size, enum ro_pin_test test, * Read back the content via the pin to the temporary buffer and * test if we observed the modification. */ - tmp_val = (__u64)tmp; + tmp_val = (__u64)(uintptr_t)tmp; ret = ioctl(gup_fd, PIN_LONGTERM_TEST_READ, &tmp_val); if (ret) ksft_test_result_fail("PIN_LONGTERM_TEST_READ failed\n");