Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4249577pxb; Tue, 25 Jan 2022 06:40:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJx614IhMXQuzV5CaUYiIIj9kP1aiv3RHmx1SxuAbeUQTyn3U4GUioJ/5Wf8lIS8ulvhhSUW X-Received: by 2002:a17:906:c14f:: with SMTP id dp15mr16418387ejc.327.1643121641090; Tue, 25 Jan 2022 06:40:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643121641; cv=none; d=google.com; s=arc-20160816; b=Vua+u6c4hy7Q6z/ef5YHHrC37hxVbYDFeOYPTDafsG7Giu68sREprlFd5wR9InAp9N YIzYebIB0QMCqnIeevUGWiFC6/m5b1pOVI/+o00kAkq4fgPkrkfC4IR9bcK6fKX4GTAe VlOGjYWjiI4pmVa65hrVM0HaxGwzqQTSKyQdfkS6g4WU8201l4AI2IMOK0EXfIsyAb6V kO5VF7wM5A+AcY3HutfrimHoYWSA2wUFt9cueRIB9dIws3UGvb6MMyyGRk4vpqU3yhMB TyaTcVIIGhH0jiAPVzAtumG65E7bWK0tdCE+3JGOFwkm89QrBPEv67wsJLUN/c2KQaXG 6wJA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2dd3yWlp7t7pUwagBpLgmf/wkJEyGPWss2ymxB0oGHo=; b=EHUfACXXThvUvpIhSooUecFzphN+HlZhLgkZ5RCDIVTtWMYhTcXHEup0UN0v7xxhg4 Ncu3qO7CL4XWDYD+bHo65nJiUNKqICTa5sfDtostt10/2TpFKH471jmqc7uooq83jCBa MAPHBgPVyfZaFtGf6YlFXwQDA7Fy1MM3R50Erib0ttN70dGimEveopxCBLkadYWB+Zh8 jIIEU+u8wthf+/ctTKkSf4zrzxRDduFy1A6PJWFdYZ7KSY+ych6japSsLbf783uSpTFu Il4sCUqr/z+gU1AawboNtyaAbc5xOAYroVHbxJiSae6uP0vBT72hzIH5t/JfgatuVi/c oy2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jC4Sm+nk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p12si9164406ejy.969.2022.01.25.06.40.14; Tue, 25 Jan 2022 06:40:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jC4Sm+nk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S242059AbiAYKHv (ORCPT + 99 others); Tue, 25 Jan 2022 05:07:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238549AbiAYJ7w (ORCPT ); Tue, 25 Jan 2022 04:59:52 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCB7DC061757; Tue, 25 Jan 2022 01:59:51 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id u10so14717391pfg.10; Tue, 25 Jan 2022 01:59:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2dd3yWlp7t7pUwagBpLgmf/wkJEyGPWss2ymxB0oGHo=; b=jC4Sm+nkUlDMgAPZXuN73FYNW/Z4JlUQZx9m0wPJtOe/TIjnoTDMqt+a32QpKq5zv+ RPjWRCKyBpMNhwI/EQcLAUbM6OO/EDb7Rygw+0+W0nHcTjx/LXlbG4rXcfyrw0gYOasU B75qAj6TeLYa34LX+x3qhcGu2p9HvuxfOQKkhl3kTVwqnScorGnRY5R8pO/Mrpc8h9Ib pqersKjlq/BzCdmq5erlJl/bSDqV0cZQHuJrCPO2Gx6ezIo0oQ279edHM0y6bv9IaY5+ 300Q6s8byykPqIGAQmEsJuDWhmgM6dVVa3keXi3539+EJW8RkCAxYBQ+MreBKIOL4+Nh J+Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2dd3yWlp7t7pUwagBpLgmf/wkJEyGPWss2ymxB0oGHo=; b=OdxQwgo+uTXLJAEeAiFOGnqzbn1a7gNIHFh8qCd3nO+pev/hcJFuISrFbqCAyY0fhb 6ZnTbSnujV1dN/O5p5LOkrpNT8FcOQi4ofVAU+uwlR+vZu9+OPzu4CgFeQyh0jSz/UyV DBiFiu11pWQZr8vU6wP6FVWN6Wd+JgzGM2uZ5kxrlnYjHQOUFia2xrwbyrRq26qhNbDW i0yDNKDoyO/evG0c/f2sbvG+bPw1yx6XlTI1XhlpPy8rXrkyuK3ED/n2MqxyDoMN0Yhk Q7AVf5DHIwjdiokXO2DlqumUHNlGJEjRaxIQhkhlLSUWiIp+EQhHnfJ/uodQp7VdVbOL qVlQ== X-Gm-Message-State: AOAM533rr3OFJe/HbnqqmHKuT703lZyLnJdZY04Ywk/LfSdAMv4liMMP k8nrCEuyjPo9q+jcB384lyY= X-Received: by 2002:a05:6a00:a92:b0:4c5:90cb:71e4 with SMTP id b18-20020a056a000a9200b004c590cb71e4mr17548664pfl.1.1643104791447; Tue, 25 Jan 2022 01:59:51 -0800 (PST) Received: from CLOUDLIANG-MB0.tencent.com ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id mq3sm201606pjb.4.2022.01.25.01.59.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Jan 2022 01:59:51 -0800 (PST) From: Jinrong Liang X-Google-Original-From: Jinrong Liang To: Paolo Bonzini Cc: Xianting Tian , Jim Mattson , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 14/19] KVM: x86/emulate: Remove unused "ctxt" of setup_syscalls_segments() Date: Tue, 25 Jan 2022 17:59:04 +0800 Message-Id: <20220125095909.38122-15-cloudliang@tencent.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) In-Reply-To: <20220125095909.38122-1-cloudliang@tencent.com> References: <20220125095909.38122-1-cloudliang@tencent.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jinrong Liang The "struct x86_emulate_ctxt *ctxt" parameter of setup_syscalls_segments() is not used, so remove it. No functional change intended. Signed-off-by: Jinrong Liang --- arch/x86/kvm/emulate.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 166a145fc1e6..c2d9fe6449c2 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2608,8 +2608,7 @@ static int em_rsm(struct x86_emulate_ctxt *ctxt) } static void -setup_syscalls_segments(struct x86_emulate_ctxt *ctxt, - struct desc_struct *cs, struct desc_struct *ss) +setup_syscalls_segments(struct desc_struct *cs, struct desc_struct *ss) { cs->l = 0; /* will be adjusted later */ set_desc_base(cs, 0); /* flat segment */ @@ -2698,7 +2697,7 @@ static int em_syscall(struct x86_emulate_ctxt *ctxt) if (!(efer & EFER_SCE)) return emulate_ud(ctxt); - setup_syscalls_segments(ctxt, &cs, &ss); + setup_syscalls_segments(&cs, &ss); ops->get_msr(ctxt, MSR_STAR, &msr_data); msr_data >>= 32; cs_sel = (u16)(msr_data & 0xfffc); @@ -2766,7 +2765,7 @@ static int em_sysenter(struct x86_emulate_ctxt *ctxt) if ((msr_data & 0xfffc) == 0x0) return emulate_gp(ctxt, 0); - setup_syscalls_segments(ctxt, &cs, &ss); + setup_syscalls_segments(&cs, &ss); ctxt->eflags &= ~(X86_EFLAGS_VM | X86_EFLAGS_IF); cs_sel = (u16)msr_data & ~SEGMENT_RPL_MASK; ss_sel = cs_sel + 8; @@ -2803,7 +2802,7 @@ static int em_sysexit(struct x86_emulate_ctxt *ctxt) ctxt->mode == X86EMUL_MODE_VM86) return emulate_gp(ctxt, 0); - setup_syscalls_segments(ctxt, &cs, &ss); + setup_syscalls_segments(&cs, &ss); if ((ctxt->rex_prefix & 0x8) != 0x0) usermode = X86EMUL_MODE_PROT64; -- 2.33.1