hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IBC4SJ
--------------------------------
In the x86 architecture, the return value of topology_cluster_cpumask must be a const modification variable.
The compilation alarm caused by the constant is rectified.
Signed-off-by: Xiangwei Li liwei728@huawei.com --- drivers/devfreq/hisi_uncore_freq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/devfreq/hisi_uncore_freq.c b/drivers/devfreq/hisi_uncore_freq.c index 89af7aa9a095..d815133b647e 100644 --- a/drivers/devfreq/hisi_uncore_freq.c +++ b/drivers/devfreq/hisi_uncore_freq.c @@ -367,7 +367,7 @@ static int hisi_uncore_devfreq_register(struct hisi_uncore_freq *uncore) static int hisi_uncore_mark_related_cpus(struct hisi_uncore_freq *uncore, char *property, int (get_topo_id)(int cpu), - struct cpumask *(get_cpumask)(int cpu)) + const struct cpumask *(get_cpumask)(int cpu)) { unsigned int i, cpu; size_t len; @@ -419,7 +419,7 @@ static int get_cluster_id(int cpu) return topology_cluster_id(cpu); }
-static struct cpumask *get_cluster_cpumask(int cpu) +static const struct cpumask *get_cluster_cpumask(int cpu) { return topology_cluster_cpumask(cpu); }