From patchwork Mon Jan 25 15:44:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101123 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1433513lbb; Mon, 25 Jan 2016 07:45:25 -0800 (PST) X-Received: by 10.66.150.228 with SMTP id ul4mr26889937pab.15.1453736725464; Mon, 25 Jan 2016 07:45:25 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rt5si34279567pab.98.2016.01.25.07.45.25; Mon, 25 Jan 2016 07:45:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754597AbcAYPpX (ORCPT + 11 others); Mon, 25 Jan 2016 10:45:23 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:63503 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753348AbcAYPpU (ORCPT ); Mon, 25 Jan 2016 10:45:20 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPA (Nemesis) id 0MEsqA-1aL2Pz1KGI-00G136; Mon, 25 Jan 2016 16:44:49 +0100 From: Arnd Bergmann To: "Rafael J. Wysocki" , Viresh Kumar Cc: linux-arm-kernel@lists.infradead.org, Joe Perches , Fabian Frederick , Arnd Bergmann , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: pxa2xx: fix pxa_cpufreq_change_voltage prototype Date: Mon, 25 Jan 2016 16:44:38 +0100 Message-Id: <1453736683-1959283-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:dbfSYnoeK4O2SQJoDECVJkufbx2QWsxU/Zbj2ux3NUW/u+JdcNo erofeisJzrgxWpnVVc+0sOAOpudZDiYJ19S/P4mxDn0V/H9nj1PFFFt0FI/Rloxej7/7PP6 e+2rA5HJud9p2zp4NtajPsq60LrXKtIHGgJMhSr6jjn5KgWny2kM5fo4dnVmX8FmS4KOIHz gXmyXp7eOf57JUxfk9Wqg== X-UI-Out-Filterresults: notjunk:1; V01:K0:J9n8pS3/5+8=:C1iLJumPqtuOMBC/cs7xZM yc1Q7zpQtRg7FYyMTe5RPI2L2Uxj7bMBK2X80D2MIEsddyQAT1SnmP5fOcL3lc9cSWj62jt1E Re/FTpc4mRzqVTdc8ETmipzdktPQqaUD60h3c5rsx9yUMBFzevgKNds19j5ebKOjQvDP+hsvP 0HwThhFhsF7m6GNF3rcigIFDUL2jOlOPpjYctgviunCeOcTOqEV4gKwVFknSp7LgrRkYZfpnx UX16+X+zBBLSybuHyCdLbAERTluya4PYNOnXFn6RmA5AMRr+7GWfFfV6BeEsOrY9M4WYxIMb2 iepTl8S5QWJzL3eAtdSY0Gb3+NbnBarhtzpRdx3T+rzqj5ZIK5DeuMYZPVszglz/qa5lHKcUM /M6NPV2bOk5G0STyKpQbcHxpms+oHqzcijYqT/bbNu4UsBSPQ5aW2WSrbhf4T3pHBYFcoA7FM NG0mY1a0ZJFXsS8rQRsj14mPQDvXXrL2tUn0w+IDxsbzD5lNbKeCrFQNmgAwaJFIR5eZ/Q6K+ 4fIC90vs86saYPBGGj/kCaZM3NxocK0ksOYU3cXhVYrfS8KMluPBdaNIxxV3O/IFp+7BzILIm 5DQn/OLrwnYoAwcmuqiprqTuoYZh/NVjCAGc68b5pzrwIHG/00AsY+vVxgggQBw7+0yK3TUW1 Ohq5S34zgwpIky+GlebkcJYviPSr/BvbKrqQptueHVKMEYh2zHcFrGIp/5X9XACPZa8I= Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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(-) -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Acked-by: Viresh Kumar 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; }