diff mbox series

[1/3] perf/amlogic: Fix config1/config2 parsing issue

Message ID 20230209115403.521868-1-jiucheng.xu@amlogic.com (mailing list archive)
State New, archived
Headers show
Series [1/3] perf/amlogic: Fix config1/config2 parsing issue | expand

Commit Message

Jiucheng Xu Feb. 9, 2023, 11:54 a.m. UTC
The 3th argument of for_each_set_bit is incorrect, fix them.

Fixes: 2016e2113d35 ("perf/amlogic: Add support for Amlogic meson G12 SoC DDR PMU driver")
Signed-off-by: Jiucheng Xu <jiucheng.xu@amlogic.com>
---
 drivers/perf/amlogic/meson_ddr_pmu_core.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


base-commit: e8a709dc2a9156f223ec953ae70a919e87ad7e9a

Comments

Will Deacon March 27, 2023, 3:01 p.m. UTC | #1
On Thu, 9 Feb 2023 19:54:01 +0800, Jiucheng Xu wrote:
> The 3th argument of for_each_set_bit is incorrect, fix them.
> 
> 

Applied first patch only to will (for-next/perf), thanks!

[1/3] perf/amlogic: Fix config1/config2 parsing issue
      https://git.kernel.org/will/c/c61e5720f232

Cheers,
diff mbox series

Patch

diff --git a/drivers/perf/amlogic/meson_ddr_pmu_core.c b/drivers/perf/amlogic/meson_ddr_pmu_core.c
index b84346dbac2c..0b24dee1ed3c 100644
--- a/drivers/perf/amlogic/meson_ddr_pmu_core.c
+++ b/drivers/perf/amlogic/meson_ddr_pmu_core.c
@@ -156,10 +156,14 @@  static int meson_ddr_perf_event_add(struct perf_event *event, int flags)
 	u64 config2 = event->attr.config2;
 	int i;
 
-	for_each_set_bit(i, (const unsigned long *)&config1, sizeof(config1))
+	for_each_set_bit(i,
+			 (const unsigned long *)&config1,
+			 BITS_PER_TYPE(config1))
 		meson_ddr_set_axi_filter(event, i);
 
-	for_each_set_bit(i, (const unsigned long *)&config2, sizeof(config2))
+	for_each_set_bit(i,
+			 (const unsigned long *)&config2,
+			 BITS_PER_TYPE(config2))
 		meson_ddr_set_axi_filter(event, i + 64);
 
 	if (flags & PERF_EF_START)