From patchwork Mon Nov 12 15:58:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 1728911 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C228EDFE80 for ; Mon, 12 Nov 2012 15:59:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752097Ab2KLP7S (ORCPT ); Mon, 12 Nov 2012 10:59:18 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:53899 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752004Ab2KLP7R (ORCPT ); Mon, 12 Nov 2012 10:59:17 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id qACFxEuk020765; Mon, 12 Nov 2012 09:59:14 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qACFxEjg002775; Mon, 12 Nov 2012 09:59:14 -0600 Received: from dlelxv23.itg.ti.com (172.17.1.198) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Mon, 12 Nov 2012 09:59:13 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id qACFxDKA029172; Mon, 12 Nov 2012 09:59:13 -0600 Received: from localhost (h64-15.vpn.ti.com [172.24.64.15]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id qACFxAw26597; Mon, 12 Nov 2012 09:59:10 -0600 (CST) From: Eduardo Valentin To: CC: , , , Eduardo Valentin Subject: [PATCH 1/1] thermal: cpu cooling: use const parameter while registering Date: Mon, 12 Nov 2012 11:58:50 -0400 Message-ID: <1352735930-8025-1-git-send-email-eduardo.valentin@ti.com> X-Mailer: git-send-email 1.7.7.1.488.ge8e1c MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- 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 cc1c930..e5e7153 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -345,7 +345,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; }