Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37884455rwd; Tue, 11 Jul 2023 23:06:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCCyd2TBsU7Le19o0GBiEyFjMt3/3xYzw86UaNZXDIONYd2f9KwPV1a0fLD9eEdsM9v0+P X-Received: by 2002:a17:902:728a:b0:1b8:6850:c3c4 with SMTP id d10-20020a170902728a00b001b86850c3c4mr13538518pll.22.1689141975395; Tue, 11 Jul 2023 23:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689141975; cv=none; d=google.com; s=arc-20160816; b=ESrIoH+YhFzqmcvQYpWnvcvFC9OH0f2n8dRp+67Ouzq3GkHHX6AFOR9kfLWemnDOCg rFXINEcJsiyPkIhbzWdnnTMeqR3nneWLg5nWkFBpaKFQladN6mKP7SJJJVK0e0UGiGh7 Re3CwC2oOSP6JEiUzgBw4VmMIXjtbQ1t6xT9XNLmmxVj5pJ4cR20dVjz33NhpyEotF1Q bm7i/oUP+AZnOaKKKIM+aJnLmdufhvCmdaG3ZXcs7wbDz7fUV5ReJP5yHiIrFxel/K9b zrgjecmjUwuNZS1YHmR2rWB3BGut+i+GHqmn+SiwWrgpMrk5AHfeQPXRVsIImuOpfNEA z7xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=GiXxEQaXPyxxtihAYrm9kfa4YYfbNqBXZNT0pAJi+RM=; fh=ttrBiPmY1Wr9Y3U2CXvjAtUCXZOU4ikqPA1FmgcOSAk=; b=K9QWXk5QtxaJBmVQiKIT/2PwWi4v2iBVcmQyQ03FaZbWVLDPjkW3QIp/DY8Sk7lzxV 5Hy7dGbJbtPv91l0nae4CVtL4FuzRyqPURy1B7we6A7zMZarl5zr9RURiU/zPdvgLT6B ngAKqRI5NWHceGp/ySqhv87hYmt4Oju6e6aZ2iRjEL441QWnbi8P5VEeSzworTU/0GkL mZ7Yg/DStZ50Yl3TcWGLyDwyEcUo4Ds2VQ+8KcOvBV6tY3snzZQsLZtECdEDmXcJZ/BC 50pk1qpjKtQXDNuyYdQFZKM6lk4B6lGDo34GPIK2ODRCQU+s7/FNTp89S4c5bwYVBluR x1nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=yn3w+DDp; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t7-20020a17090340c700b001b8a389459fsi2617660pld.383.2023.07.11.23.06.02; Tue, 11 Jul 2023 23:06:15 -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=neutral (bad version) header.i=@208.org header.s=dkim header.b=yn3w+DDp; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231226AbjGLFYj (ORCPT + 99 others); Wed, 12 Jul 2023 01:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229714AbjGLFYi (ORCPT ); Wed, 12 Jul 2023 01:24:38 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44A96A6 for ; Tue, 11 Jul 2023 22:24:33 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4R15lC20nSzBR5lJ for ; Wed, 12 Jul 2023 13:24:23 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1689139461; x=1691731462; bh=WK8J9dWxI+4aAEoTHQJfscjTnby xuTPgDNC5E/Kjg+E=; b=yn3w+DDp7mZQsf0OnehCBNyx6jw8HAt9jMiAv2MIHbE xRW5PYvKJCIRb5csC284dGfUmjAuYj3IbzrIJ7117GG9zWD9fA0fxk2p+W3CJ0o4 NOJVMAjICb3VkSaZG9VjJf2lDXM7AYctyP0KLv1RIqA6yVITGuj3ktz5/v8OuH1L enJAZVsCq5ZwZGnfB765c9Sb6uR7tW1jCnCT3PqDGe2D8jz4DDwxmuGHCQRYyFwL Oc4nnN+iLZiUJ0cMPjy6R2vQdSuhdqxs3Xq5QkgpoLYAqDie5e6Il6y/1J5serB5 BwOoH0seK3ibi9qJUfDU+nMOJymy1v1xVX5sTg1HJoA== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id M8UydZeL7A3g for ; Wed, 12 Jul 2023 13:24:21 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4R15l91b4kzBR5l6; Wed, 12 Jul 2023 13:24:21 +0800 (CST) MIME-Version: 1.0 Date: Wed, 12 Jul 2023 13:24:21 +0800 From: shijie001@208suo.com To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org Cc: hpa@zytor.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] KVM: x86: Fix warnings in mtrr.c In-Reply-To: References: User-Agent: Roundcube Webmail Message-ID: X-Sender: shijie001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_FAIL,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 The following checkpatch warnings are removed: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: Block comments should align the * on each line Signed-off-by: Jie Shi --- arch/x86/kvm/mtrr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c index 3eb6e7f47e96..cda5f79f3f2e 100644 --- a/arch/x86/kvm/mtrr.c +++ b/arch/x86/kvm/mtrr.c @@ -39,7 +39,7 @@ static struct kvm_mtrr_range *var_mtrr_msr_to_range(struct kvm_vcpu *vcpu, return &vcpu->arch.mtrr_state.var_ranges[index]; } -static bool msr_mtrr_valid(unsigned msr) +static bool msr_mtrr_valid(unsigned int msr) { switch (msr) { case MTRRphysBase_MSR(0) ... MTRRphysMask_MSR(KVM_NR_VAR_MTRR - 1): @@ -60,7 +60,7 @@ static bool msr_mtrr_valid(unsigned msr) return false; } -static bool valid_mtrr_type(unsigned t) +static bool valid_mtrr_type(unsigned int t) { return t < 8 && (1 << t) & 0x73; /* 0, 1, 4, 5, 6 */ } @@ -135,11 +135,11 @@ static u8 mtrr_disabled_type(struct kvm_vcpu *vcpu) } /* -* Three terms are used in the following code: -* - segment, it indicates the address segments covered by fixed MTRRs. -* - unit, it corresponds to the MSR entry in the segment. -* - range, a range is covered in one memory cache type. -*/ + * Three terms are used in the following code: + * - segment, it indicates the address segments covered by fixed MTRRs. + * - unit, it corresponds to the MSR entry in the segment. + * - range, a range is covered in one memory cache type. + */ struct fixed_mtrr_segment { u64 start; u64 end;