# Re: \[PATCH v14 3/3\] cpufreq: mediatek-hw: Add support for CPUFREQ HW

- From: Viresh Kumar \<viresh.kumar@linaro.org\>
- Date: 2021-08-30 05:11:16 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/08/1491802
- Thread: https://ratatoskr.run/linux-mediatek/2021/08/1491221/t.md

```text
On 28-08-21, 23:01, Hector Yuan wrote:
> +static int mtk_cpu_resources_init(struct platform_device *pdev,
> +				  struct cpufreq_policy *policy,
> +				  const u16 *offsets)
> +{
> +	struct mtk_cpufreq_data *data;
> +	struct device *dev = &pdev->dev;
> +	void __iomem *base;
> +	int ret, i;
> +	int index;
> +
> +	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
> +	if (!data)
> +		return -ENOMEM;
> +
> +	index = of_perf_domain_get_sharing_cpumask(policy->cpu, "performance-domains",
> +						   "#performance-domain-cells",
> +						   policy->cpus);

You pass CPU here, while the first patch accepts index. Does this even work? Or
work just by chance ?

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
