From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755921AbcEEXb2 (ORCPT ); Thu, 5 May 2016 19:31:28 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:55584 "HELO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752786AbcEEXb1 (ORCPT ); Thu, 5 May 2016 19:31:27 -0400 From: "Rafael J. Wysocki" To: Arnd Bergmann Cc: Viresh Kumar , Nishanth Menon , Stephen Boyd , Len Brown , Pavel Machek , Greg Kroah-Hartman , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PM / OPP: pass cpumask by reference Date: Fri, 06 May 2016 01:34:40 +0200 Message-ID: <8109630.bu5WkkmZiA@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1462016049-1976580-1-git-send-email-arnd@arndb.de> References: <1462016049-1976580-1-git-send-email-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, April 30, 2016 01:33:29 PM 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 > Fixes: 947bd567f7a5 ("mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared") Applied with all the ACKs, thanks!