From patchwork Wed Apr 27 03:22:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 66760 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp1955600qge; Tue, 26 Apr 2016 20:23:24 -0700 (PDT) X-Received: by 10.66.79.197 with SMTP id l5mr8598909pax.61.1461727404277; Tue, 26 Apr 2016 20:23:24 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sa8si2624048pac.61.2016.04.26.20.23.23; Tue, 26 Apr 2016 20:23:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752824AbcD0DXP (ORCPT + 29 others); Tue, 26 Apr 2016 23:23:15 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:35299 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751920AbcD0DXM (ORCPT ); Tue, 26 Apr 2016 23:23:12 -0400 Received: by mail-pa0-f42.google.com with SMTP id iv1so14120510pac.2 for ; Tue, 26 Apr 2016 20:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0MOTalbgr1sNIxwMYt4y8so3yL7mIqfIvpUJ4//yoD8=; b=ViAf04rUC6UJiSaIxGYHVn8EK/yIFG/XdHHAqFXWv1gmfIMWLF7o01jq3h1W/FEwAj b5aYCna9bfKndGJvTMIoYMtuw5HdVzUqNAipD/L43hQEInMP3Sp5SHodIgfPo9kIr0B5 MFvW9f858o5h13dJ2BqMlMN5lfqf23ZslFJys= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=0MOTalbgr1sNIxwMYt4y8so3yL7mIqfIvpUJ4//yoD8=; b=ULgWksIZrkQwTl3Yh6zart5IZISB+OcAfOvjro1x64AmG1eKYLsC7ZNpjaYE85+Kgl omp0grp9TyjOLNrln5ddLPjYYiALwFM0u3/JhpiWhGpSsIoPdTaELU1YzFxlDj24JVoa H3l+aLaF0sVgtjy2jrFuvyIGnamYBb8XLp57jS5ziJZLmJCkw9S0KedK7FNlzrh1vL35 ipZs1L/dZaHt3/lDbtJVYmfUfpw32EXRIX/2qWVqx0AcbjNk4yscX68yOE6J2QVhUTWm Lsc/8M0X0e7WzF/DwqVqPY3n6+kjsRDPrN4jHYDt525tOGe+MDkByyuxV0NRwY/LAih9 mJkw== X-Gm-Message-State: AOPr4FWHlieuHctMfF5TBjiUgKY0lxKa015G7kxxva+ryKCYpAEwscXECbKKE5lDMZ3DW89z X-Received: by 10.66.145.35 with SMTP id sr3mr8501057pab.82.1461727391786; Tue, 26 Apr 2016 20:23:11 -0700 (PDT) Received: from localhost ([122.167.143.140]) by smtp.gmail.com with ESMTPSA id 76sm1790386pfz.44.2016.04.26.20.23.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Apr 2016 20:23:11 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, arnd.bergmann@linaro.org, Viresh Kumar , linux-kernel@vger.kernel.org Subject: [PATCH V2 2/7] PM / OPP: Mark cpumask as const in dev_pm_opp_set_sharing_cpus() Date: Wed, 27 Apr 2016 08:52:22 +0530 Message-Id: <9a4fef0ecf8329541140de9bb6ccb393b2ec21db.1461727086.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dev_pm_opp_set_sharing_cpus() isn't supposed to update the cpumask passed as its parameter, and so it should always have been marked 'const'. Do it now. Signed-off-by: Viresh Kumar --- drivers/base/power/opp/cpu.c | 3 ++- include/linux/pm_opp.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) -- 2.7.1.410.g6faf27b diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c index 55cbf9bd8707..5469e7730ff2 100644 --- a/drivers/base/power/opp/cpu.c +++ b/drivers/base/power/opp/cpu.c @@ -287,7 +287,8 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_get_sharing_cpus); * that this function is *NOT* called under RCU protection or in contexts where * mutex cannot be locked. */ -int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) +int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, + const cpumask_var_t cpumask) { struct opp_device *opp_dev; struct opp_table *opp_table; diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index a2df8f6fcc25..0c08ed3836b1 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -65,7 +65,7 @@ void dev_pm_opp_put_prop_name(struct device *dev); int dev_pm_opp_set_regulator(struct device *dev, const char *name); void dev_pm_opp_put_regulator(struct device *dev); int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq); -int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask); +int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, const cpumask_var_t cpumask); #else static inline unsigned long dev_pm_opp_get_voltage(struct dev_pm_opp *opp) { @@ -179,7 +179,7 @@ static inline int dev_pm_opp_set_rate(struct device *dev, unsigned long target_f return -ENOTSUPP; } -static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) +static inline int dev_pm_opp_set_sharing_cpus(struct device *cpu_dev, const cpumask_var_t cpumask) { return -ENOTSUPP; }