Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp51249rdb; Wed, 7 Feb 2024 21:00:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOqbkMwBWEdpYM8x9ISdOrAr1NtAer1+mcQU7CZ8D2xCeK242tx2WTKCP18VHQYGYtgRkd X-Received: by 2002:a17:90a:9ab:b0:296:a6b0:4fa7 with SMTP id 40-20020a17090a09ab00b00296a6b04fa7mr4743793pjo.13.1707368427808; Wed, 07 Feb 2024 21:00:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707368427; cv=pass; d=google.com; s=arc-20160816; b=BYsB88eXFBE9e3FAAsDKnA9pJ3S2+GP9ETqY0iXRI+XjKRKzYoAD7w7Eczf3jadtDd oB+H/RuqiOMSLzIjuvL7jb9/PpbfLQSHH+ShCnkUGrfQC4its+eurIo+cTj4WuX3i1sw ureFvQsbismM7ht75QuerR0rrdp6qd175Ku+fqzgxkqfTpXmxuSltC9DG63jJ6zU2sag SbU0Bpd6qACvnKppF/o8VAg8faxOnTtus5PsIxY6w+Bcl3NZiZG/d8y56qluKveDoQ5y k95ch+ZN7cKCw+cNV/1fHb6maNts02wWM3mJRmGdgQ+9Of2I6ZjAgexeDGzeI727nzg+ 0GMw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=HghHrrymnGE5LaupdeGvnxnRXMMblf9S9dtvQv+E5Vk=; fh=OqPxGNKrrd6a9KhEtKIozQWDUsSYBoteh21mdLB9iS4=; b=UKVuDXOBJe9iO5rjCoW+c9EVavU89+3iiPv1LmWTubdCrzf6M4n+r9yN6ud8Nj1nJ2 qBheIr6CjO9Wm1QoQ4peXNC8utdYUBXARtC9TKwokRyGIInAcv4Q3qtkpTpq8aWIW1z0 6LQTRBP1hDTq2heC2kzC/aW5RvkqSCs3nc125MUQBHoNppDqqbAWhBC5XPEddaS/qCE2 FOt3ii4rEC136yyx64BRFOvWYl/GpynxnNfhhP4zBM52m2ilFKIWvG9YMZhMR7IuWtxK rcJKQHPOWlp+d3kZlqe1qOocf5ESc+k3Q2h2IshpDXxjoUtUdy8xZCFTFAiCAvQG82pT xuPA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-57468-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com X-Forwarded-Encrypted: i=2; AJvYcCVIp6nE/G+Cxo6OFoHvwr/1ZhXCq9YUyRqwwl7mG1MoUfwIg849aKLxRCiaad8yxG2H0C+8czg8jxxBh8urRFRk/6ZdCvXgXGw7BqBPUA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d22-20020a17090ab31600b00296ec0dccfbsi528590pjr.116.2024.02.07.21.00.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 21:00:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57468-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-57468-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57468-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6D0BE286C33 for ; Thu, 8 Feb 2024 05:00:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C47467A14; Thu, 8 Feb 2024 05:00:21 +0000 (UTC) Received: from szxga07-in.huawei.com (szxga07-in.huawei.com [45.249.212.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8689667A07 for ; Thu, 8 Feb 2024 05:00:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.35 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707368420; cv=none; b=KYnakbfnvKzprpMjZCUgrXPjq4vK0p07a0ruzIhPlWdcmugSf+4q6sRO5u3bcxIh0TMWU/ZORzzbAzTSNL1ZFwxo7DSQ+YHR6bJUlq2MmaoWFjBCz6vfc9AxXbNnC6WA1rYNGXW9bx59pL93qL5W8TnDiiIBhLKGMqsIUQFXVq4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707368420; c=relaxed/simple; bh=drzypQ4OMiu5rtVHsBnVb3sEPK383IRp3OEu0GSDqEA=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=mse4AiGu6NdfjuO4rTELjp8zycQixaTpz3boXUedWlRMGIZRNK7MYqd3K8/cxiTEq6f/AUvhwl/4Ky6UWgR+liGBd19V6q5h3EXOElZAhpLP9oZMspswcPX/RnuwXE8hVKHJrU4+qcCTLZ+C+u5UP0Kh5zZaZEH4z6dq6ljB8BA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.35 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4TVl9d1Pylz1Q8k8; Thu, 8 Feb 2024 12:58:13 +0800 (CST) Received: from kwepemm600007.china.huawei.com (unknown [7.193.23.208]) by mail.maildlp.com (Postfix) with ESMTPS id C301F140429; Thu, 8 Feb 2024 13:00:10 +0800 (CST) Received: from [10.174.185.179] (10.174.185.179) by kwepemm600007.china.huawei.com (7.193.23.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 8 Feb 2024 13:00:09 +0800 Subject: Re: [PATCH] KVM: selftests: Fix GUEST_PRINTF() format warnings in ARM code To: Sean Christopherson CC: Marc Zyngier , Oliver Upton , , , References: <20240202234603.366925-1-seanjc@google.com> From: Zenghui Yu Message-ID: <3188e6f1-f150-f7d0-6c2b-5b7608b0b012@huawei.com> Date: Thu, 8 Feb 2024 13:00:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240202234603.366925-1-seanjc@google.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600007.china.huawei.com (7.193.23.208) On 2024/2/3 7:46, Sean Christopherson wrote: > Fix a pile of -Wformat warnings in the KVM ARM selftests code, almost all > of which are benign "long" versus "long long" issues (selftests are 64-bit > only, and the guest printf code treats "ll" the same as "l"). The code > itself isn't problematic, but the warnings make it impossible to build ARM > selftests with -Werror, which does detect real issues from time to time. > > Opportunistically have GUEST_ASSERT_BITMAP_REG() interpret set_expected, > which is a bool, as an unsigned decimal value, i.e. have it print '0' or > '1' instead of '0x0' or '0x1'. > > Signed-off-by: Sean Christopherson Tested-by: Zenghui Yu > diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testing/selftests/kvm/aarch64/arch_timer.c > index 274b8465b42a..d5e8f365aa01 100644 > --- a/tools/testing/selftests/kvm/aarch64/arch_timer.c > +++ b/tools/testing/selftests/kvm/aarch64/arch_timer.c > @@ -158,9 +158,9 @@ static void guest_validate_irq(unsigned int intid, > > /* Basic 'timer condition met' check */ > __GUEST_ASSERT(xcnt >= cval, > - "xcnt = 0x%llx, cval = 0x%llx, xcnt_diff_us = 0x%llx", > + "xcnt = 0x%lx, cval = 0x%lx, xcnt_diff_us = 0x%lx", > xcnt, cval, xcnt_diff_us); > - __GUEST_ASSERT(xctl & CTL_ISTATUS, "xcnt = 0x%llx", xcnt); > + __GUEST_ASSERT(xctl & CTL_ISTATUS, "xcnt = 0x%lx", xcnt); Unrelated to your patch, but it looks to me that we actually want to print 'xctl' instead of 'xcnt' in the second __GUEST_ASSERT(). Thanks, Zenghui