From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E23AD3A9631 for ; Fri, 12 Jun 2026 09:32:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781256748; cv=none; b=hTxUT/h236fzfRGy8Wj8WLB27ivB99bVG2F4/s8Q9PBQBH2BQITRac6BtZlTIda5YZtTbIoCsbbP8YHdl18HUF2Hy5xgibpAMABHwzMgBF6ISqyLzpRK+QWs+YZAPhq6UsjEB0BnivdgOEPqm5z2CKAgCg6JnJfe5h6QayfA9NA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781256748; c=relaxed/simple; bh=gKRoG+JXJPYOyOW9jrNZYKeyX1v/ta+3BKXL+1gZuvk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PBfA4oxQU6wMvzqjaJ+jx4tbCVo4qt29PEVO6+lxyrLcH4lbjLM3GpF/8/tgf4mZViilLzlsF52W+fAsF3h6VVWq4PDW9ugif57A9dUdVoxCbcq0+OQEnu4p6dnv4NKpghjhaRdpRHkpi+hzftnRq6r4TYx02JMdD01ZSo4v0IA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=fv+LHVJ+; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=fv+LHVJ+; arc=none smtp.client-ip=45.249.212.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="fv+LHVJ+"; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="fv+LHVJ+" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Bp1cifga+Z84k64jt4SpGZgPBX4W+InpVedDdVyeB1E=; b=fv+LHVJ+Nzb/d1hRm1p4V/WQpD3ctTKKbK6w/iaYH9T1+SUU6WE3biQMTBzEwob6sgAR207+H v/cWa93c3eXnxFpAn5HA4w5/PhzHY/iwc24EGpoWrwbHSq2ClgksBaSWuH3AtBubgFU907W72Pj h9OGHRJU5Rvj4fahyxlfkiw= Received: from canpmsgout01.his.huawei.com (unknown [172.19.92.178]) by szxga01-in.huawei.com (SkyGuard) with ESMTPS id 4gcDmr0c6zz1BGBF for ; Fri, 12 Jun 2026 17:31:56 +0800 (CST) dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=Bp1cifga+Z84k64jt4SpGZgPBX4W+InpVedDdVyeB1E=; b=fv+LHVJ+Nzb/d1hRm1p4V/WQpD3ctTKKbK6w/iaYH9T1+SUU6WE3biQMTBzEwob6sgAR207+H v/cWa93c3eXnxFpAn5HA4w5/PhzHY/iwc24EGpoWrwbHSq2ClgksBaSWuH3AtBubgFU907W72Pj h9OGHRJU5Rvj4fahyxlfkiw= Received: from mail.maildlp.com (unknown [172.19.163.104]) by canpmsgout01.his.huawei.com (SkyGuard) with ESMTPS id 4gcDbR3M3Wz1T4Kc; Fri, 12 Jun 2026 17:23:47 +0800 (CST) Received: from whupemo500002.china.huawei.com (unknown [7.152.185.250]) by mail.maildlp.com (Postfix) with ESMTPS id 45C434048F; Fri, 12 Jun 2026 17:32:11 +0800 (CST) Received: from localhost.huawei.com (10.90.31.46) by whupemo500002.china.huawei.com (7.152.185.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Fri, 12 Jun 2026 17:32:10 +0800 From: Yushan Wang To: , , , , CC: , , , , , Subject: [PATCH v2 1/3] drivers/perf: hisi: Replace counter number with defined macro Date: Fri, 12 Jun 2026 17:32:05 +0800 Message-ID: <20260612093207.1242000-2-wangyushan12@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20260612093207.1242000-1-wangyushan12@huawei.com> References: <20260612093207.1242000-1-wangyushan12@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: kwepems100002.china.huawei.com (7.221.188.206) To whupemo500002.china.huawei.com (7.152.185.250) The inline number means counter numbers of the PMU. Replace it with already define macro for better readability. Signed-off-by: Yushan Wang --- drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c index f963e4f9e552..59e6dff4032f 100644 --- a/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c @@ -362,7 +362,7 @@ static int hisi_l3c_pmu_check_filter(struct perf_event *event) */ static u32 hisi_l3c_pmu_get_counter_offset(int cntr_idx) { - return L3C_CNTR0_LOWER + L3C_HW_IDX(cntr_idx) * 8; + return L3C_CNTR0_LOWER + L3C_HW_IDX(cntr_idx) * L3C_NR_COUNTERS; } static u64 hisi_l3c_pmu_read_counter(struct hisi_pmu *l3c_pmu, -- 2.33.0