Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1354584pxb; Thu, 14 Apr 2022 04:30:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsiJ4NrKWMjokdwBLQphdUfNF31D7u3KfOUvJVRgp/vtlb8oJ+U7UUfn65qvPwBa4+qspf X-Received: by 2002:a17:902:db04:b0:158:4eab:9208 with SMTP id m4-20020a170902db0400b001584eab9208mr22567087plx.128.1649935855697; Thu, 14 Apr 2022 04:30:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649935855; cv=none; d=google.com; s=arc-20160816; b=SKObrTpPugizPMtrtaPY3hK51aN+/jQpIYdBXHtXeDwCjzx+tyYAEOjnzSk91wGx+f cAQnKiJVQXIidCTeAC3qoDQj1+HzEYd3OeX47EnKocxgCoUy0WB52MH1S+hJ7TEIiwes B3XxdwhAWxj219/9tqi17sIbmlqmqhy4r97lvehh9PuuFxI6YW4oBwWMK0KNiHTsxRAZ twl3dI/yzKQf0G44LOkbUwFsiy4xi4nHbQLodZ3V3iWvXm14+d1z6aN2XEB0UvuBhO5M XHuRm5396fkPjwkAIs0KtnO4vSReFt4joQJfLR7z7nNi3tDbQaY0q6e3P3GIT8wykvA+ weog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Vf8insFKsm0H/Xa5O9Bfm1akCLF8f2bCQgFw5dYlces=; b=tHsDnkCRDGT9X8wZBMb3r8qWExBaZ9fRXBkmsCpFAptOVjLSXeTTInCHnVLYU8+dm9 wbMFwe2GyevdD1VkvQ6SmFJlQXPTtb0G9FlCi/xGvmygy29QGgnscQ/mAEDlgA8rza5r ZN3M/tXTw7ohvHCzOQ5N+kZoDedeBsblBB8aH3TDxfJ48+oqHLNcgMrU3bCfz8a9OWr7 mfva7Hj6mKm1VSiEMBCeMNVRq+D9oZZ6EIg8xYgYTbR8flB33NP4Ecz6+hUZhpEkI8DU i3O0uV9bQnPWE45ONqkLVVpdM2Kn+xSHw49qaHCn9g7tnmdzmvzQBDrBwt3XdRKv2ASN XjyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PeBDsObn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q61-20020a17090a1b4300b001bd14e03034si1546747pjq.12.2022.04.14.04.30.42; Thu, 14 Apr 2022 04:30:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PeBDsObn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242288AbiDNKdG (ORCPT + 99 others); Thu, 14 Apr 2022 06:33:06 -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-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 == &_max2); \ | ^~ kvm_page_table_test.c:281:21: note: in expansion of macro 'max' 281 | alignment = max(0x100000, alignment); | ^~~ Fix it by adjusting the type of the absolute value. Signed-off-by: Thomas Huth --- 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/testing/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_guest_mode mode, void *arg) else guest_test_phys_mem = p->phys_offset; #ifdef __s390x__ - alignment = max(0x100000, alignment); + alignment = max(0x100000UL, alignment); #endif guest_test_phys_mem = align_down(guest_test_phys_mem, alignment); -- 2.27.0