Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1237312rwb; Thu, 22 Sep 2022 12:02:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6s2BxXSH5IX3oKCiI6xPQClgltzBZ6IDydCfuE8IirtlfIkF/MKbBuoK23rDM+1GDaJVNe X-Received: by 2002:a05:6402:454:b0:447:59a8:fc7d with SMTP id p20-20020a056402045400b0044759a8fc7dmr4893068edw.68.1663873371282; Thu, 22 Sep 2022 12:02:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663873371; cv=none; d=google.com; s=arc-20160816; b=o6faoiOLRgoLMNMrRaKx+Uu8e9fZe3Ii+gOrYLC5jqFoAJo4F+efU9tOiKGeCOyHR0 jzAffA312n6rmdILDt8aTjUHGLZsTbg0xOVsYe7z0jGUlc3wLK9y3v6u2xKuENgx2F79 iNtp+VdD0BLLACLm7jS5+3FFUbYADcHCGywjGkjlRhT6lsoFl0pRA6doWwclqW+/JPC+ dI3M7+ka+dzRsY08MfrKKsiagYHfboIlPGwb/UqI1zKQuYakE8E5latrMC7ZTNk0W1SG VAS57N6j5SkFC1XWVmdpjKkVVysADIOXOgqPjVEj/IKRG1R+2vzkNxpluTgBZQy98XwO Rnog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Sckvs0FTvGyjC/ju9lFywFrSTF78gTiQEzpAFikyqII=; b=09vnv+KsATb1lRKtWcxVR4an8TRzKo+FDLDZqZVv1HUhlu/fX7tQlpiJthiqlobjDW PSx+h01hlYB9ZII8opptFSIzsgqUsL833xtvVihVvoaJrc1STepE9RtnRuDVywiCvVR+ DISoJ0khUMvSqvj6E/SQHqYu2hUHMhLBSuGlzPazdysowdr2g9tr5Q43aBWHVYxPV25v hOCLYrEAKaOU7caZDzJ2MPBADiwL3x2nhm2MqPzS70JALYwZCWEbdjtte8Osbc9kwf5s HrAHhLVzcVfZN6fb5AdTNPIN65oUSQCrfBn1vEIbMllOMrahjtFdkJbazRRbjJDNTY+J /V1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=grnT8CgZ; 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 wt1-20020a170906ee8100b0077ac5f39842si6401707ejb.96.2022.09.22.12.02.23; Thu, 22 Sep 2022 12:02:51 -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=google header.b=grnT8CgZ; 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 S229649AbiIVSp2 (ORCPT + 99 others); Thu, 22 Sep 2022 14:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbiIVSpZ (ORCPT ); Thu, 22 Sep 2022 14:45:25 -0400 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EAC7D01F6 for ; Thu, 22 Sep 2022 11:45:24 -0700 (PDT) Received: by mail-il1-x12d.google.com with SMTP id j7so4596886ilu.7 for ; Thu, 22 Sep 2022 11:45:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=Sckvs0FTvGyjC/ju9lFywFrSTF78gTiQEzpAFikyqII=; b=grnT8CgZ1gQuEDOPJTlzBomCgI4eVGDOtVSRW4oxEgOy/f2NoelS/Ta7NvlEk6LbRX gzhUDV71pkz1woX43jN0dWObCEw9lU8dWhiRfx15iMSrLhUu5GH4dwwtQCLgugTvX1z2 8AU9g2XA10kmW48eSrBKewQqFDDowhwFDMlFo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=Sckvs0FTvGyjC/ju9lFywFrSTF78gTiQEzpAFikyqII=; b=LsWRMY5vOfUjExFadl32oGMOIVwOcpADVbpFMn9frBRQ7goNPskvMfKqbe97lA1emT 7kdoMPOkgi3rOLTWGT84ZgknIPEk3+Bab7Xb7kslbP1bK/jZunGnomkYDr18F7G3fWQk AL9t25MTFHO+wnRtrek3Jh+xWQMYjQlAIRRbFUbLZ12SFV3LY3KoJOUsqs4G5J/JxQjH Zy1C37NoUWZUJ/oiFyfM47et6esiZrG5ae5MTp1UWTupNIYRF5KERQ2yz6PAP15v1YhK qFqD75SY+yauf1VS6pt4KoGxyiHOgTiNikt/22dD6IURR3/IpE5eBbOW8phrpoHJtk4k nOgg== X-Gm-Message-State: ACrzQf072x6vFRffkuLP8jUbdoN+duT2w05MWb7g/O07YqA75y8GD7La E8WjDuvvP5Ngc7I5Hg2yzJaN9Q== X-Received: by 2002:a05:6e02:b45:b0:2f5:9ee6:4ff4 with SMTP id f5-20020a056e020b4500b002f59ee64ff4mr2467698ilu.101.1663872323713; Thu, 22 Sep 2022 11:45:23 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id c3-20020a0566022d0300b006849ee78e1bsm2619529iow.34.2022.09.22.11.45.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 22 Sep 2022 11:45:23 -0700 (PDT) Message-ID: Date: Thu, 22 Sep 2022 12:45:22 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH linux-next] KVM: selftests: remove redundant variable tsc_val Content-Language: en-US To: cgel.zte@gmail.com, pbonzini@redhat.com, shuah@kernel.org, seanjc@google.com, Greg Kroah-Hartman Cc: 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 References: <20220831143150.304406-1-cui.jinpeng2@zte.com.cn> From: Shuah Khan In-Reply-To: <20220831143150.304406-1-cui.jinpeng2@zte.com.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 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, -- Shuah