Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4704479iob; Sun, 8 May 2022 22:38:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuBOgS3IbOd0+HhvXBWD8IgjgHB3mNlb6iUBu6O8M2vj0irwA6tqOQxQxekuLjqAV7yz7O X-Received: by 2002:a63:580b:0:b0:3c1:a780:59f7 with SMTP id m11-20020a63580b000000b003c1a78059f7mr11847319pgb.76.1652074715320; Sun, 08 May 2022 22:38:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652074715; cv=none; d=google.com; s=arc-20160816; b=qgaehaRJ5uSM90bw8efyv6aw3SW7oqKh0Vx7Eq5BkUpOEV2BEs4ryoMkwzXcpDkLqZ rhoqA953NC1pb/byOMYw3t1h9IlhRap/wcxZpbZXxddT0jOF1U+pQDbAhn3r+qLsTbzo wqlrqYfYdBEJ0/W53YwRMA7r0DKSyESXJ0fJmMpAQIP5xmldkMVZcsMNQeocFYlRty7+ 4g1hGzIZI/ob8DJb+oEk0FWbv4bc5gx5/JI0jiwx7t58DwyKWVMdwZZpSsogmZAW50X5 w48WsmygM9elbv8cptAH3vzITN6u/QAwn5GFX56kP86bMa7b4R9lG+QlasRtEQtNlRqr ufYQ== 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 :message-id:date:subject:cc:to:from; bh=B9dG5BoTL3WdBWGMMiKgeJUSIRDPrbHFPSbshuJTjP0=; b=xU3H8EvrpIVv80BrI5fRfzWbi4nMrug/dsygtN/FvYwq3okYoO+7tQ+SWVFeBVyoeO noIfSRj1svJuOKBZ1yn/1M108hWGpu2bAi1rCMzpaj5M6gnUmn06XVQOigpF2VbJOwln 0InxHUfHwYnZ+9nvuHcc+BpbMOusMSBsOydN+9NFX7ROhgIDnk8mQgD+Ggf36bjXv8CQ P6ZletWuds0iQMDZPwX/soWDbBqy7aIKFrCigpIVOLBhh8Ye40kOzzp5TeoTWtStdKhw O7pL6lKVz04gttuDZ2ND3IrUvEhJcow56b/KKOhDwq2AtSMd9PBdn56RCoL4+87cod8c S5JQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k4-20020aa788c4000000b0050d679a9c44si14883764pff.186.2022.05.08.22.38.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 22:38:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 22A7C158D7D; Sun, 8 May 2022 22:37:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1389351AbiEFGIN (ORCPT + 99 others); Fri, 6 May 2022 02:08:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389349AbiEFGIF (ORCPT ); Fri, 6 May 2022 02:08:05 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FBA665D03; Thu, 5 May 2022 23:04:22 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R281e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04395;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0VCQNAcq_1651817052; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VCQNAcq_1651817052) by smtp.aliyun-inc.com(127.0.0.1); Fri, 06 May 2022 14:04:19 +0800 From: Jiapeng Chong To: peterz@infradead.org Cc: mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@kernel.org, namhyung@kernel.org, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] x86/events: remove set but not used variable 'hwc' Date: Fri, 6 May 2022 14:04:10 +0800 Message-Id: <20220506060410.104036-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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 Eliminate the follow clang warning: arch/x86/events/amd/core.c:774:24: warning: variable 'hwc' set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/x86/events/amd/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/events/amd/core.c b/arch/x86/events/amd/core.c index 47ef8aee15d2..78076904daad 100644 --- a/arch/x86/events/amd/core.c +++ b/arch/x86/events/amd/core.c @@ -771,13 +771,11 @@ static void amd_pmu_enable_event(struct perf_event *event) static void amd_pmu_enable_all(int added) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); - struct hw_perf_event *hwc; int idx; amd_brs_enable_all(); for (idx = 0; idx < x86_pmu.num_counters; idx++) { - hwc = &cpuc->events[idx]->hw; /* only activate events which are marked as active */ if (!test_bit(idx, cpuc->active_mask)) -- 2.20.1.7.g153144c