From: Viresh Kumar <viresh.kumar@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-arm-kernel@lists.infradead.org,
Joe Perches <joe@perches.com>, Fabian Frederick <fabf@skynet.be>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
Date: Mon, 25 Jan 2016 22:05:23 +0530 [thread overview]
Message-ID: <20160125163523.GD3322@vireshk> (raw)
In-Reply-To: <1453736683-1959283-1-git-send-email-arnd@arndb.de>
On 25-01-16, 16:44, Arnd Bergmann wrote:
> There are two definitions of pxa_cpufreq_change_voltage, with slightly
> different prototypes after one of them had its argument marked 'const'.
> Now the other one (for !CONFIG_REGULATOR) produces a harmless warning:
>
> drivers/cpufreq/pxa2xx-cpufreq.c: In function 'pxa_set_target':
> drivers/cpufreq/pxa2xx-cpufreq.c:291:36: warning: passing argument 1 of 'pxa_cpufreq_change_voltage' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> ret = pxa_cpufreq_change_voltage(&pxa_freq_settings[idx]);
> ^
> drivers/cpufreq/pxa2xx-cpufreq.c:205:12: note: expected 'struct pxa_freqs *' but argument is of type 'const struct pxa_freqs *'
> static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
> ^
>
> This changes the prototype in the same way as the other, which
> avoids the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 03c229906311 ("cpufreq: pxa: make pxa_freqs arrays const")
> ---
> drivers/cpufreq/pxa2xx-cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
> index efe3b215fd34..46fee1539cc8 100644
> --- a/drivers/cpufreq/pxa2xx-cpufreq.c
> +++ b/drivers/cpufreq/pxa2xx-cpufreq.c
> @@ -202,7 +202,7 @@ static void __init pxa_cpufreq_init_voltages(void)
> }
> }
> #else
> -static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
> +static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)
> {
> return 0;
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
WARNING: multiple messages have this Message-ID (diff)
From: viresh.kumar@linaro.org (Viresh Kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype
Date: Mon, 25 Jan 2016 22:05:23 +0530 [thread overview]
Message-ID: <20160125163523.GD3322@vireshk> (raw)
In-Reply-To: <1453736683-1959283-1-git-send-email-arnd@arndb.de>
On 25-01-16, 16:44, Arnd Bergmann wrote:
> There are two definitions of pxa_cpufreq_change_voltage, with slightly
> different prototypes after one of them had its argument marked 'const'.
> Now the other one (for !CONFIG_REGULATOR) produces a harmless warning:
>
> drivers/cpufreq/pxa2xx-cpufreq.c: In function 'pxa_set_target':
> drivers/cpufreq/pxa2xx-cpufreq.c:291:36: warning: passing argument 1 of 'pxa_cpufreq_change_voltage' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
> ret = pxa_cpufreq_change_voltage(&pxa_freq_settings[idx]);
> ^
> drivers/cpufreq/pxa2xx-cpufreq.c:205:12: note: expected 'struct pxa_freqs *' but argument is of type 'const struct pxa_freqs *'
> static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
> ^
>
> This changes the prototype in the same way as the other, which
> avoids the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 03c229906311 ("cpufreq: pxa: make pxa_freqs arrays const")
> ---
> drivers/cpufreq/pxa2xx-cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
> index efe3b215fd34..46fee1539cc8 100644
> --- a/drivers/cpufreq/pxa2xx-cpufreq.c
> +++ b/drivers/cpufreq/pxa2xx-cpufreq.c
> @@ -202,7 +202,7 @@ static void __init pxa_cpufreq_init_voltages(void)
> }
> }
> #else
> -static int pxa_cpufreq_change_voltage(struct pxa_freqs *pxa_freq)
> +static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq)
> {
> return 0;
> }
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
next prev parent reply other threads:[~2016-01-25 16:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-25 15:44 [PATCH] cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype Arnd Bergmann
2016-01-25 15:44 ` Arnd Bergmann
2016-01-25 16:35 ` Viresh Kumar [this message]
2016-01-25 16:35 ` Viresh Kumar
2016-01-27 22:56 ` Rafael J. Wysocki
2016-01-27 22:56 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160125163523.GD3322@vireshk \
--to=viresh.kumar@linaro.org \
--cc=arnd@arndb.de \
--cc=fabf@skynet.be \
--cc=joe@perches.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.