Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp533001rwb; Thu, 22 Sep 2022 23:52:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Vj8OZ/wS5cy6S4zP6UMlHmfQPAMkrva2iTaFhio2uLeYiEK1ST/vYei5AStl9/upItAiV X-Received: by 2002:a63:e118:0:b0:438:7603:8d6e with SMTP id z24-20020a63e118000000b0043876038d6emr6498773pgh.72.1663915960427; Thu, 22 Sep 2022 23:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663915960; cv=none; d=google.com; s=arc-20160816; b=PWsfGYDmW6rtsaGDNV332Oeg2d2tfTXzMyaUfZFqcz1nZ0LDquCsBRm48/IUZxlDRj OxRSm17nQVQODyP1Dsa8NK8cjSy3T+xDPgA36H7ZPlgDLikNHjDG9g2551UAPp8oaM3z u3NI++pjUtEC/SEGhChY7KDjyee/AQAL9eA2mEf12FHYYwyyKg/ps5x+m3hL/SA3Szok 5VtRdz2Hz1mA15ikwqGaxxEhcpLAcFQ5InWgc82Tf8Wn0wvqw49jaCYJ+MbElkw3Ewyx iVzJVFqK26Y2JlgXZx3WVf4TWyW5Hh+U36dFqu7dNkHchcPgJQt/JHW0/y5o/VBAlqka h+Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8LxG3+h/FLJItQq7dgwca0RS16S1Y+n3ZJm7Rfr5Zms=; b=wWmwpqY3OHhliuOFs1sarVkkoXFJWo0GA+xbvyrt3sA6biuRE6HASs5k3/LdxwEV4y uAR43JRMLrJV7E/5v6L9QAUOlyWb7fMicxdCkPhBX5ChroKO3p3DF6OdMlV0B6nm0cCy lipGKSy976FN9Y9D+bhhgOtl+II6H6OtFRSIMhfeKwmU+vRQOt8k5Orkphmrj3XIWxA8 aiJxlACrLG5gM0vDK3Jxx6VDmKXo34gy6P4B5DBJorilvpNEWXj7R3e1rBU1YK3DbYdY vBHUZutAhBcHfP4nGuli5eGosnS0jCOfUu/Bfm3cCKFQUCQW3aPeORuZhRriWBMy6zoy CVcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Dj90cAbp; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nl8-20020a17090b384800b001fdcaa15a56si2438517pjb.112.2022.09.22.23.52.29; Thu, 22 Sep 2022 23:52:40 -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=@linuxfoundation.org header.s=korg header.b=Dj90cAbp; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbiIWG3r (ORCPT + 99 others); Fri, 23 Sep 2022 02:29:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbiIWG3S (ORCPT ); Fri, 23 Sep 2022 02:29:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A75451280F9; Thu, 22 Sep 2022 23:27:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2F346612F0; Fri, 23 Sep 2022 06:27:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06BEBC433D6; Fri, 23 Sep 2022 06:27:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663914469; bh=TdJrTT8FDQYJZs18nJ4Mh6O+0KQmY7Nw9igqLQnPdHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Dj90cAbpLQwo0BQCpgx5QtvWWoCxxsRGMyxHbRtcniQDPc/eSESsBaV03vBz2W4SZ PU3EViDNQ13xk1gDgM4A8zZApDXj/zXhXQXb8j68AneZ2cJSJCbY4g4Xn+V9Z1qidD Vk6LoRQ41AIDMOMJYb7vvZCJbIeR1Xn36Ahkns28= Date: Fri, 23 Sep 2022 08:28:20 +0200 From: Greg Kroah-Hartman To: Shuah Khan Cc: cgel.zte@gmail.com, pbonzini@redhat.com, shuah@kernel.org, seanjc@google.com, dmatlack@google.com, jmattson@google.com, peterx@redhat.com, oupton@google.com, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jinpeng Cui , Zeal Robot Subject: Re: [PATCH linux-next] KVM: selftests: remove redundant variable tsc_val Message-ID: References: <20220831143150.304406-1-cui.jinpeng2@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Thu, Sep 22, 2022 at 12:45:22PM -0600, Shuah Khan wrote: > On 8/31/22 08:31, cgel.zte@gmail.com wrote: > > From: Jinpeng Cui > > > > Return value directly from expression instead of > > getting value from redundant variable tsc_val. > > > > Reported-by: Zeal Robot > > Signed-off-by: Jinpeng Cui > > --- > > tools/testing/selftests/kvm/include/x86_64/processor.h | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h > > index 0cbc71b7af50..75920678f34d 100644 > > --- a/tools/testing/selftests/kvm/include/x86_64/processor.h > > +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h > > @@ -237,7 +237,6 @@ static inline uint64_t get_desc64_base(const struct desc64 *desc) > > static inline uint64_t rdtsc(void) > > { > > uint32_t eax, edx; > > - uint64_t tsc_val; > > /* > > * The lfence is to wait (on Intel CPUs) until all previous > > * instructions have been executed. If software requires RDTSC to be > > @@ -245,8 +244,8 @@ static inline uint64_t rdtsc(void) > > * execute LFENCE immediately after RDTSC > > */ > > __asm__ __volatile__("lfence; rdtsc; lfence" : "=a"(eax), "=d"(edx)); > > - tsc_val = ((uint64_t)edx) << 32 | eax; > > - return tsc_val; > > + > > + return ((uint64_t)edx) << 32 | eax; > > } > > static inline uint64_t rdtscp(uint32_t *aux) > > My understanding is that this patch isn't coming from individuals that work > for ZTE. We won't be able to accept these patches. Refer to the following > for reasons why we can't accept these patches. > > https://patchwork.kernel.org/project/linux-kselftest/patch/20220920063202.215088-1-ye.xingchen@zte.com.cn/ Thanks for catching this. Also this address has now been banned from the kernel mailing lists, so watch out for patches sent to maintainers that do not show up on lore.kernel.org. thanks, greg k-h