From patchwork Wed Apr 19 05:29:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 97600 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp159452qgf; Tue, 18 Apr 2017 22:31:58 -0700 (PDT) X-Received: by 10.98.59.201 with SMTP id w70mr1212792pfj.137.1492579918196; Tue, 18 Apr 2017 22:31:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f35si1321610plh.40.2017.04.18.22.31.57; Tue, 18 Apr 2017 22:31:58 -0700 (PDT) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760030AbdDSFbr (ORCPT + 12 others); Wed, 19 Apr 2017 01:31:47 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34644 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760021AbdDSFbm (ORCPT ); Wed, 19 Apr 2017 01:31:42 -0400 Received: by mail-pf0-f177.google.com with SMTP id c198so7003720pfc.1 for ; Tue, 18 Apr 2017 22:31:42 -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=TcRRIIV4XadGzbLL5B9iDM8jAWOYVIH6WcrXFP60LcI=; b=I85JRbonvefE1vcKw8750w/2OOSX6gZ17z0t92/8BJd9uONP3EgH5riOWYAKsP3g9O 5yc4klxsjdcrESHA/uuHwiYd6dfkCEmSL2fHM/68TG82Yb292R6H8CbvKZ1uWAUp3bbQ HELsoDaFeY1V8IGz9iiAN+7UEVxrbP/4tNEo0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=TcRRIIV4XadGzbLL5B9iDM8jAWOYVIH6WcrXFP60LcI=; b=QjpVnJfiBmavv5ddDApkyNbrDM7gsoZy5QzGSO0kN1hTFHSIFoX0t33FmtRdYztdcC 61oyvq2efkfLE/m3i/S/gkjQmUfJ+kJpfSed2E9gwX6i8dXWkxSuYZNLEDryk+7rDz+w BsCGYZoL0fC66Y21iFu+hIU4LT85YTORxiHBtV4VFQXvH02xWsdhoA41ALv6rekAWgij s1e06w280vpY8JsesCMdL6qrtshHAyXRbOcyE3YkNuYBaDh4EGaVvPxhTAatEvJs/xLQ 02gv+e+SK6pFonh0MZq5cMKY078HkLP8+fhOGZrqkqk68Pj/S7TQ97M6V+IKk2LAf39h qNDA== X-Gm-Message-State: AN3rC/60R3IXsl8C/cDrzrLpewT+qUc1VapeI1Fh8kA4GDeTm38NsLge b5IVVN3qauxlfZsi X-Received: by 10.98.204.93 with SMTP id a90mr1237360pfg.6.1492579897077; Tue, 18 Apr 2017 22:31:37 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id f6sm1674483pfe.57.2017.04.18.22.31.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 22:31:36 -0700 (PDT) From: Viresh Kumar To: Javi Merino , Zhang Rui , Eduardo Valentin , Lukasz Luba , Amit Daniel Kachhap , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, Rafael Wysocki , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Punit Agrawal Subject: [PATCH V3 17/17] thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device Date: Wed, 19 Apr 2017 10:59:12 +0530 Message-Id: <56b3e4d4209787d3b2292f04c90f1fd969fdf90c.1492579345.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.12.0.432.g71c3a4f4ba37 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org This shrinks the size of the structure on arm64 by 8 bytes by avoiding padding of 4 bytes at two places. Also add missing doc comment for freq_table Signed-off-by: Viresh Kumar --- drivers/thermal/cpu_cooling.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) -- 2.12.0.432.g71c3a4f4ba37 diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index dc73405b04f2..05073c33ba20 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -75,17 +75,18 @@ struct time_in_idle { * struct cpufreq_cooling_device - data for cooling device with cpufreq * @id: unique integer value corresponding to each cpufreq_cooling_device * registered. - * @cdev: thermal_cooling_device pointer to keep track of the - * registered cooling device. - * @policy: cpufreq policy. + * @last_load: load measured by the latest call to cpufreq_get_requested_power() * @cpufreq_state: integer value representing the current state of cpufreq * cooling devices. * @clipped_freq: integer value representing the absolute value of the clipped * frequency. * @max_level: maximum cooling level. One less than total number of valid * cpufreq frequencies. + * @freq_table: Freq table in descending order of frequencies + * @cdev: thermal_cooling_device pointer to keep track of the + * registered cooling device. + * @policy: cpufreq policy. * @node: list_head to link all cpufreq_cooling_device together. - * @last_load: load measured by the latest call to cpufreq_get_requested_power() * @idle_time: idle time stats * @plat_get_static_power: callback to calculate the static power * @@ -94,14 +95,14 @@ struct time_in_idle { */ struct cpufreq_cooling_device { int id; - struct thermal_cooling_device *cdev; - struct cpufreq_policy *policy; + u32 last_load; unsigned int cpufreq_state; unsigned int clipped_freq; unsigned int max_level; struct freq_table *freq_table; /* In descending order */ + struct thermal_cooling_device *cdev; + struct cpufreq_policy *policy; struct list_head node; - u32 last_load; struct time_in_idle *idle_time; get_static_t plat_get_static_power; };