From nobody Thu Jun 18 20:43:35 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA5B2C433EF for ; Thu, 14 Apr 2022 10:30:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242291AbiDNKdI (ORCPT ); Thu, 14 Apr 2022 06:33:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239652AbiDNKdE (ORCPT ); Thu, 14 Apr 2022 06:33:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7D3BC59A63 for ; Thu, 14 Apr 2022 03:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649932239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vf8insFKsm0H/Xa5O9Bfm1akCLF8f2bCQgFw5dYlces=; b=PeBDsObnsl+9Qj/nqwvPCuBXeeWK7m/RiN7jfK8rarZP+SRsc3G+aaVAQN1ZRGrmBN6J/c QPKjvZc6J5LzslKENtVf5Eb+P3OvB0bb2rrUzZGz/BiCmpnBNv8ATtGADuRM1z0AhMdJ/Q AL4IoUb7rrHd22BkuTFk0D9d6s9vbPY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-671-hAC-ND9RORqzAfxDFTvCPw-1; Thu, 14 Apr 2022 06:30:35 -0400 X-MC-Unique: hAC-ND9RORqzAfxDFTvCPw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1C1B438009EB; Thu, 14 Apr 2022 10:30:35 +0000 (UTC) Received: from thuth.com (dhcp-192-232.str.redhat.com [10.33.192.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id E707B434844; Thu, 14 Apr 2022 10:30:33 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org, Paolo Bonzini , Christian Borntraeger , Janosch Frank , Claudio Imbrenda Cc: Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, David Hildenbrand Subject: [PATCH] KVM: selftests: Silence compiler warning in the kvm_page_table_test Date: Thu, 14 Apr 2022 12:30:31 +0200 Message-Id: <20220414103031.565037-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" When compiling kvm_page_table_test.c, I get this compiler warning with gcc 11.2: kvm_page_table_test.c: In function 'pre_init_before_test': ../../../../tools/include/linux/kernel.h:44:24: warning: comparison of distinct pointer types lacks a cast 44 | (void) (&_max1 =3D=3D &_max2); \ | ^~ kvm_page_table_test.c:281:21: note: in expansion of macro 'max' 281 | alignment =3D max(0x100000, alignment); | ^~~ Fix it by adjusting the type of the absolute value. Signed-off-by: Thomas Huth Reviewed-by: Claudio Imbrenda --- tools/testing/selftests/kvm/kvm_page_table_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/kvm_page_table_test.c b/tools/test= ing/selftests/kvm/kvm_page_table_test.c index ba1fdc3dcf4a..2c4a7563a4f8 100644 --- a/tools/testing/selftests/kvm/kvm_page_table_test.c +++ b/tools/testing/selftests/kvm/kvm_page_table_test.c @@ -278,7 +278,7 @@ static struct kvm_vm *pre_init_before_test(enum vm_gues= t_mode mode, void *arg) else guest_test_phys_mem =3D p->phys_offset; #ifdef __s390x__ - alignment =3D max(0x100000, alignment); + alignment =3D max(0x100000UL, alignment); #endif guest_test_phys_mem =3D align_down(guest_test_phys_mem, alignment); =20 --=20 2.27.0