From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757465AbcAYQf2 (ORCPT ); Mon, 25 Jan 2016 11:35:28 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33696 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbcAYQf0 (ORCPT ); Mon, 25 Jan 2016 11:35:26 -0500 Date: Mon, 25 Jan 2016 22:05:23 +0530 From: Viresh Kumar To: Arnd Bergmann Cc: "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, Joe Perches , Fabian Frederick , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype Message-ID: <20160125163523.GD3322@vireshk> References: <1453736683-1959283-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1453736683-1959283-1-git-send-email-arnd@arndb.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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