Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp986768iog; Mon, 13 Jun 2022 18:07:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBsBV+Aim9LPKKcoqSwz66QvOm3mDD+hDZ8uH0ktkMtDH8b1fpsFSCS7eUWEoApIIcHPaK X-Received: by 2002:a17:906:d82:b0:70d:84d3:b6df with SMTP id m2-20020a1709060d8200b0070d84d3b6dfmr2131072eji.464.1655168825107; Mon, 13 Jun 2022 18:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655168825; cv=none; d=google.com; s=arc-20160816; b=TgijHNBYaJH76jE6QKY19X45jOKqjDHDKyubCYuJ5wof2BQTOabuowf9MmSLTWV1Vw xbji9AqzZH9MbYKKyuF0rJqqva33I4YQ8t2HG9z8iDZkpWBKwVZ27bontvuZgRHu2j5w LIaX2m8LIUgQjT9qZxKTRNFSl06D1fSENi4tdr872YXQePWR1LllSOXY6BU3uRw0gh4i IdVcKswvk6n9/0sd8sokXgHESn62qqi2NC0GostyqLow/6wHvmyF1/Ak9EPETX8haLPE iKjOF/Q6KQML4ENtDW9EuIU5juJYQfJWMwgVx+1xPyxdrYjFx2JOINBTcgGx5ymILpjh takQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=OJVToNO7CfirM2mS/wmfpYjagzrj98GWvj0UuFFVilo=; b=VyU9fqlQzlic9smOZZrFgdqX4qUc+x8IKxeLphzGvHkFZM2cX9/HyJP+EhsE074J0N no2g/eJTdz0N6fNS+Ys+DpTAFS8lJfq3E6kSNuXZWKly18Uf48gkWWsHFHjidCH/LWjb wM5SSl3ynFjzBKx97fmaolgxA6PbcCEYJ6IWpoBBvEmr9zuxuFUgK3hIA+LzdrJAaO1B p+sQK7qyPwDCkTtisdIwnc0Idp80patMU4UkIoYRpWaLBslCt3s6uw0ehsfu7v6FOVWr NdNJ45C36kwaexKf9H4otV28ZWJYtv3ttaEXq7YJSITKonkw3jf6acyIGJs8I7N6n4nt MB7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=VtO4WhW0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sb34-20020a1709076da200b00703f4835d31si11260057ejc.913.2022.06.13.18.06.38; Mon, 13 Jun 2022 18:07:05 -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=@gmail.com header.s=20210112 header.b=VtO4WhW0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240088AbiFNAwt (ORCPT + 99 others); Mon, 13 Jun 2022 20:52:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239132AbiFNAwr (ORCPT ); Mon, 13 Jun 2022 20:52:47 -0400 Received: from mail-yw1-x1143.google.com (mail-yw1-x1143.google.com [IPv6:2607:f8b0:4864:20::1143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83B50A47D; Mon, 13 Jun 2022 17:52:46 -0700 (PDT) Received: by mail-yw1-x1143.google.com with SMTP id 00721157ae682-31336535373so14984037b3.2; Mon, 13 Jun 2022 17:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=OJVToNO7CfirM2mS/wmfpYjagzrj98GWvj0UuFFVilo=; b=VtO4WhW0LTva8izAKf2cjLEEVNuc00h/nyH5oRd+R0dxDmyDOBwVkQm3haSlubjltK mLPCLmBGsqSIPBcwTmJsB1mi0eOhaaypjvveq2CX82fmLerrKW+5RSWbeqjQGzaYNyTm 4OKpcFgzNh7Cf3y/QW5y0TCNiVA2Oc8tG7zqSHChA2w8KQUuFVnCW1g4A15MCQwyTNDz axjeL1j5PGxzZzUgfrg6coWHmvMQTAi9IsXdcczJtzaG9Q8iM6FB/sCa/wkkFQTj1ikd Cps6HcjWp/I5wtrsEALQViMgXDMiaO9ORrdQ/AW7NsYYOcVFcD+n7PILkvqUk+l8oJOR pFZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=OJVToNO7CfirM2mS/wmfpYjagzrj98GWvj0UuFFVilo=; b=Fu1VqRtaNDo7IB+uveh2oQa0nO5lC5/6P32TmvkCp1gy3AvweeXbzbIHprQ8rofsMP OEeX1C+QTOeklRAo0dkUdz4dpCZ71gjNqvfIC0u4poxLFdaLJyDNzIDROTLr904UNcVz Yie5GGpbVTuHGppp5lDA/EJKoSH+s1cawhsBxpzlpqbujokgK2utd7DjNBSqIaqHOoif qvH4EG1VkTGIi1aa5e4eFFCbqNKA891p2+ObHSJCdTLj/+1zrYf0YobJwQjk3HZOzXNt zWNvuzeSHKV4dpl6ssczxfai2RYwsjn9Qkn9oVp5KiWHW2eg7Vuqb7X4938tiPsSg4iD KIVg== X-Gm-Message-State: AJIora/36imUHcemZo0yTCPxK6sCU/lYCXngmq0e0mECxHmAjGD7PPlw D5qxmm/hTrusHH1f/fqpK446PATJJJNQAkj6PA== X-Received: by 2002:a81:2fd8:0:b0:314:eaa:bbc1 with SMTP id v207-20020a812fd8000000b003140eaabbc1mr2748956ywv.141.1655167965520; Mon, 13 Jun 2022 17:52:45 -0700 (PDT) MIME-Version: 1.0 References: <20220612035641.1161945-1-sunliming@kylinos.cn> <66c1cf3a-9f2a-e05a-3c76-62b1ee056385@intel.com> In-Reply-To: <66c1cf3a-9f2a-e05a-3c76-62b1ee056385@intel.com> From: sunliming Date: Tue, 14 Jun 2022 08:52:34 +0800 Message-ID: Subject: Re: [PATCH] KVM: x86/mmu: Remove unused "type" of split_page_type() To: Xiaoyao Li Cc: isaku.yamahata@intel.com, pbonzini@redhat.com, seanjc@google.com, mingo@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, kernel test robot Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 I got it, I am sorry aboot it , thanks. Xiaoyao Li =E4=BA=8E2022=E5=B9=B46=E6=9C=8813=E6=97= =A5=E5=91=A8=E4=B8=80 10:48=E5=86=99=E9=81=93=EF=BC=9A > > On 6/12/2022 11:56 AM, sunliming wrote: > > The variable 'type' in split_page_type() is set but not used, so remove > > it. > > > > Fixes the following w1 warning: > > > > arch/x86/kvm/mmu/mmu.c:982:28: warning: variable 'type' set but not use= d [-Wunused-but-set-variable] > > Please note, the code doesn't get into upstream yet. > > The fix shouldn't be sent to upstream maillist. > > > Reported-by: kernel test robot > > Signed-off-by: sunliming > > --- > > arch/x86/kvm/mmu/mmu.c | 2 -- > > 1 file changed, 2 deletions(-) > > > > diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c > > index 7b3df91a93cf..f4d577335f94 100644 > > --- a/arch/x86/kvm/mmu/mmu.c > > +++ b/arch/x86/kvm/mmu/mmu.c > > @@ -979,14 +979,12 @@ static void split_page_type(gfn_t gfn, struct kvm= _memory_slot *slot, > > enum pg_level level) > > { > > struct kvm_page_attr *page_attr =3D page_attr_slot(gfn, slot, lev= el); > > - enum kvm_page_type type; > > gfn_t base_gfn; > > > > if (WARN_ON_ONCE(!kvm_page_type_valid(page_attr) || level <=3D PG= _LEVEL_4K)) > > return; > > > > base_gfn =3D gfn & ~(KVM_PAGES_PER_HPAGE(level) - 1); > > - type =3D page_attr->type; > > > > /* > > * Set the type to KVM_PAGE_TYPE_MIXED in advance since when a la= rge >