Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2674775rdb; Wed, 4 Oct 2023 08:13:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVpjXY7U9EfBcgrakViq0UItW/0RVS9GR1BPnVOzSBMNzrqFBuEKLwq098kd/We0B4BW7R X-Received: by 2002:a05:6a21:47ca:b0:160:719d:63c5 with SMTP id as10-20020a056a2147ca00b00160719d63c5mr2416660pzc.59.1696432400712; Wed, 04 Oct 2023 08:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696432400; cv=none; d=google.com; s=arc-20160816; b=TnrRZlQtVPFTc/LpaS5rzBLMEKjQA64jRAktnoYU5eoylzcii3hKk7FsvVFqBMAx12 WzbHQT7Mw1D6ALmEhY6fawh0AZmYBQUVia8HzWrRiOyL4j0tktdv6h9Pniq6rkBkCciH R/nopOofqQkM2kp1V08JEaFmhgdFuJ1zMAu1I/S8wAW8zalQlgsUs6bigybNJYehyKGw QuMQ9iBnQ4m+1JxP7gDXvV+Ryx2qR88CGSpHEh06QcYDIOhf0i42tbx7Qtk6AEFIQyeQ +hGvNjkyo/C/TGyZ7O8UAXMCLZyUERlxanf0giU4y5+wbRPcCrCTvrJ7PTHb0/Hry/2m T8Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=WPvrdimJk+6ET5yzeMFp8sbCNMwce3CbuZMRLA/5qXQ=; fh=h83YpKJuUa8fa+MA3d5Rb/da2BpzMfqTwYCJm07lxUI=; b=cwzzC3h+3Schdze/zwJSKBLWy3wqnP4eIY5kwIu7hzjBdS+KU+v6staYIu2SvPxLfY GmS6jNL57ziYMsUsPc2pBlkKbv352+PqM/YACtAHAc34fU7fM7uFFLmGkYyAeqzoTHym XUWsevfkV49ttGAe8DPB3fiP5eAMIHfL+JHPsWvJ5iQCjfJIqpycy5AnbSvQeNMGDOV+ GKuZcHp1Ntv9WdqorGfWdahMqp1cEUr+oTWqx+g53yux8c/IF7LfY3mILdIpVURgKMEk QSRbClUEDE3u9oKc9hU2hRqR1nRt62dWKDZa/r2JzQspXdxq1IY4AkTPcQWg3AR2xTRl HWjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=QqhqBkEX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id y2-20020a056a001c8200b0068fe2453ab6si3713370pfw.353.2023.10.04.08.13.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 08:13:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=QqhqBkEX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 72EEC82224EF; Wed, 4 Oct 2023 08:13:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243067AbjJDPNT (ORCPT + 99 others); Wed, 4 Oct 2023 11:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243038AbjJDPNT (ORCPT ); Wed, 4 Oct 2023 11:13:19 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4528DBF for ; Wed, 4 Oct 2023 08:13:15 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 41be03b00d2f7-563ab574cb5so1770118a12.1 for ; Wed, 04 Oct 2023 08:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1696432394; x=1697037194; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=WPvrdimJk+6ET5yzeMFp8sbCNMwce3CbuZMRLA/5qXQ=; b=QqhqBkEXlbKTock6z0wk4sCYAeseisPQPGwrPY24N0b5m7GwvUb90+Myk6znN1xZ+Y EBq5uEqBZD2kyI3gxLEsMEHc+KpNIA1UUr1cKHp+GVTMeewLvnlTz9sdv0UzL0WMi6QZ hyebyElSN4CH39cRGJBmhGnrdOth0BGK17mc3WBPvwv1WEC9p2t+xX7Ubk7VHDVVHg3M xnp7wu/0As5WmKUNAbDaqb1FgYRMFllQgzAYNBKZiwvUMVi98Qpgtub6lzP4BkqAOyiE jPPtEmn95zgLE10c3Z2VBWU2NIoIaPZPXfSXJ7u7UZgKCFAQR9tIx0HEge5Jb0URlPEm z3rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696432394; x=1697037194; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WPvrdimJk+6ET5yzeMFp8sbCNMwce3CbuZMRLA/5qXQ=; b=HLwuOY6tLIBPizcYhszZtnpoiPubDqxLI85e6J+qMylM+D67WRPtKJgtJw5CiiwKf9 EXNi2tvqYLU8pgMk6tpBlCmxAZ2uF5SGiqfg8CTS73lQsdDAutW+rFwyjEmf033a/N2H UivicgwtmNmC5h+tNzh0HOrdf9dF/CktlT0z+yicx/XMlhS9qWbsBrFj8dOVcVXDKr4x 3km7mhyui6w7pisJnpibP/PcHCGN+wfBZPn/ITCk1pW3a8FhiI8OJGJySEZkqNZghvNQ qskuJtSc4ucU7g7cmMl4P8IwAEEuP7K+IfWgarjx1xf5yofjMbz2ELeZtZIfblnk+l/1 AZHQ== X-Gm-Message-State: AOJu0YxizrXyMta4iFxdqBsX6V9R4ZLGdBL5sjahBvphWHIV0XCtFAqG f4pvuOF5xaBN25fA2tu+fC1NOGjRlWA= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:d583:b0:262:ffa8:f49d with SMTP id v3-20020a17090ad58300b00262ffa8f49dmr42120pju.9.1696432394658; Wed, 04 Oct 2023 08:13:14 -0700 (PDT) Date: Wed, 4 Oct 2023 08:13:12 -0700 In-Reply-To: <20231004133827.107-2-julian.stecklina@cyberus-technology.de> Mime-Version: 1.0 References: <20231004133827.107-1-julian.stecklina@cyberus-technology.de> <20231004133827.107-2-julian.stecklina@cyberus-technology.de> Message-ID: Subject: Re: [PATCH 2/2] KVM: x86: rename push to emulate_push for consistency From: Sean Christopherson To: Julian Stecklina Cc: Paolo Bonzini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 04 Oct 2023 08:13:19 -0700 (PDT) On Wed, Oct 04, 2023, Julian Stecklina wrote: > push and emulate_pop are counterparts. Rename push to emulate_push and > harmonize its function signature with emulate_pop. This should remove > a bit of cognitive load when reading this code. > > Signed-off-by: Julian Stecklina > --- > arch/x86/kvm/emulate.c | 11 ++++++----- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > index fc4a365a309f..33f3327ddfa7 100644 > --- a/arch/x86/kvm/emulate.c > +++ b/arch/x86/kvm/emulate.c > @@ -1819,22 +1819,23 @@ static int writeback(struct x86_emulate_ctxt *ctxt, struct operand *op) > return X86EMUL_CONTINUE; > } > > -static int push(struct x86_emulate_ctxt *ctxt, void *data, int bytes) > +static int emulate_push(struct x86_emulate_ctxt *ctxt, const unsigned long *data, > + u8 op_bytes) I like the rename and making @data const, but please leave @bytes as an int. Regarding @bytes versus @len, my vote is to do s/len/bytes for emulate_pop() and emulate_popf().