Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1392050
| From | Viresh Kumar <viresh.kumar@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] PM / OPP: pass cpumask by reference |
| Date | 2016-05-02 10:20 +0200 |
| Message-ID | <ruhfb-8nf-5@gated-at.bofh.it> (permalink) |
| References | <rtBpE-72n-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 30-04-16, 13:33, Arnd Bergmann wrote:
> The new use of dev_pm_opp_set_sharing_cpus resulted in a harmless compiler
> warning with CONFIG_CPUMASK_OFFSTACK=y:
>
> drivers/cpufreq/mvebu-cpufreq.c: In function 'armada_xp_pmsu_cpufreq_init':
> include/linux/cpumask.h:550:25: error: passing argument 2 of 'dev_pm_opp_set_sharing_cpus' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
>
> The problem here is that cpumask_var_t gets passed by reference, but
> by declaring a 'const cpumask_var_t' argument, only the pointer is
> constant, not the actual mask. This is harmless because the function
> does not actually modify the mask.
>
> This patch changes the function prototypes for all of the related functions
> to pass a 'struct cpumask *' instead of 'cpumask_var_t', matching what
> most other such functions do in the kernel. This lets us mark all the
> other similar functions as taking a 'const' mask where possible,
> and it avoids the warning without any change in object code.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 947bd567f7a5 ("mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared")
> ---
> drivers/base/power/opp/cpu.c | 10 +++++-----
> include/linux/pm_opp.h | 20 ++++++++++----------
> 2 files changed, 15 insertions(+), 15 deletions(-)
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] PM / OPP: pass cpumask by reference Arnd Bergmann <arnd@arndb.de> - 2016-04-30 13:40 +0200 Re: [PATCH] PM / OPP: pass cpumask by reference Pavel Machek <pavel@ucw.cz> - 2016-05-01 12:10 +0200 Re: [PATCH] PM / OPP: pass cpumask by reference Viresh Kumar <viresh.kumar@linaro.org> - 2016-05-02 10:20 +0200 Re: [PATCH] PM / OPP: pass cpumask by reference Stephen Boyd <sboyd@codeaurora.org> - 2016-05-03 01:00 +0200 Re: [PATCH] PM / OPP: pass cpumask by reference "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-05-06 01:40 +0200
csiph-web