From patchwork Sun Dec 2 14:45:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Rui X-Patchwork-Id: 1830811 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B55643FCA5 for ; Sun, 2 Dec 2012 14:45:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753528Ab2LBOp5 (ORCPT ); Sun, 2 Dec 2012 09:45:57 -0500 Received: from mga03.intel.com ([143.182.124.21]:52515 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630Ab2LBOp4 (ORCPT ); Sun, 2 Dec 2012 09:45:56 -0500 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 02 Dec 2012 06:45:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.84,201,1355126400"; d="scan'208";a="175055694" Received: from unknown (HELO rzhang1-mobl4.ccr.corp.intel.com) ([10.255.21.163]) by AZSMGA002.ch.intel.com with ESMTP; 02 Dec 2012 06:45:54 -0800 From: Zhang Rui To: linux-pm@vger.kernel.org Cc: Eduardo Valentin , Zhang Rui Subject: [PATCH 31/34] thermal: cpu cooling: use const parameter while registering Date: Sun, 2 Dec 2012 22:45:05 +0800 Message-Id: <1354459508-3707-31-git-send-email-rui.zhang@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1354459508-3707-1-git-send-email-rui.zhang@intel.com> References: <1354459508-3707-1-git-send-email-rui.zhang@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Eduardo Valentin There are predefined cpu_masks that are const data structures. This patch changes the cpu cooling register function so that those const cpu_masks can be used, without compilation warnings. include/linux/cpumask.h * The following particular system cpumasks and operations manage * possible, present, active and online cpus. * * cpu_possible_mask- has bit 'cpu' set iff cpu is populatable * cpu_present_mask - has bit 'cpu' set iff cpu is populated * cpu_online_mask - has bit 'cpu' set iff cpu available to scheduler * cpu_active_mask - has bit 'cpu' set iff cpu available to migration * Signed-off-by: Eduardo Valentin Signed-off-by: Zhang Rui --- drivers/thermal/cpu_cooling.c | 2 +- include/linux/cpu_cooling.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index 6f94c2c..836828e 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -313,7 +313,7 @@ static struct notifier_block thermal_cpufreq_notifier_block = { * @clip_cpus: cpumask of cpus where the frequency constraints will happen. */ struct thermal_cooling_device *cpufreq_cooling_register( - struct cpumask *clip_cpus) + const struct cpumask *clip_cpus) { struct thermal_cooling_device *cool_dev; struct cpufreq_cooling_device *cpufreq_dev = NULL; diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h index 8515301..b30cc79c 100644 --- a/include/linux/cpu_cooling.h +++ b/include/linux/cpu_cooling.h @@ -35,7 +35,7 @@ * @clip_cpus: cpumask of cpus where the frequency constraints will happen */ struct thermal_cooling_device *cpufreq_cooling_register( - struct cpumask *clip_cpus); + const struct cpumask *clip_cpus); /** * cpufreq_cooling_unregister - function to remove cpufreq cooling device. @@ -44,7 +44,7 @@ struct thermal_cooling_device *cpufreq_cooling_register( void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); #else /* !CONFIG_CPU_THERMAL */ static inline struct thermal_cooling_device *cpufreq_cooling_register( - struct cpumask *clip_cpus) + const struct cpumask *clip_cpus) { return NULL; }