From patchwork Tue Apr 25 10:27:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 98193 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1880259qgf; Tue, 25 Apr 2017 03:30:06 -0700 (PDT) X-Received: by 10.98.147.202 with SMTP id r71mr28493711pfk.43.1493116206714; Tue, 25 Apr 2017 03:30:06 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h15si21874159plk.313.2017.04.25.03.30.06; Tue, 25 Apr 2017 03:30:06 -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 S1429623AbdDYKaC (ORCPT + 14 others); Tue, 25 Apr 2017 06:30:02 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:36213 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1429613AbdDYK2c (ORCPT ); Tue, 25 Apr 2017 06:28:32 -0400 Received: by mail-pg0-f41.google.com with SMTP id g2so26443748pge.3 for ; Tue, 25 Apr 2017 03:28:26 -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=s8Wn/O1CFjJKAncQshZzqT3KYQRIDDjPvI8whQ7DTEw=; b=RwmGVpgBMFmVb2HYFxlHVTFhPnB7OEWCTTww/ZC+TitDatj91t1VtqIkBfEtm71Ung Dye3nIfDEpYBdsdcvwbN8iFZ6dYARNgSc7rFQrxjomnizioQId546nE7DacnjZDllDs3 vQOkrhBb48jBFjQ5ZH4eqUyH1i5kyGhdLFBc8= 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=s8Wn/O1CFjJKAncQshZzqT3KYQRIDDjPvI8whQ7DTEw=; b=quMVLs9Ifuv0t0dGqHBhgXUnOYO/Qd0WD1fLYi7KCSELsM3tspM8T93Fq0iT1iuhvQ akv8DXFzG1iHf67Tdi6rXKULcBOFjWG7aCv8bDpxjSLPKsLzTzuQk7AWs8usalZXL4rR 5HT8gVaHshZ7LSADafjhhkCgnFhGD9SznTP0WkKX2Hz/z0bBjSujt755GBagcrFkjBz3 kj0Crml46ah1K779aVwt/JLOVOno2v2lcNNvIYnNLnX+etiIV6Bex9eIKuEOGC8bltuf hhct2LAgg8vdsE6dVQqrw3cdeX92gWH31lTcSrWz8BottjzWMsTJvGAHmXXEBn52UpKN s/gw== X-Gm-Message-State: AN3rC/5OlY+cnMKfR7uH2d0NqdBzoLrctluYFeiofNlYXG7onQjRc+I9 mqEZJyuYBzN95UJB X-Received: by 10.98.218.68 with SMTP id w4mr28309313pfl.246.1493116106317; Tue, 25 Apr 2017 03:28:26 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id 133sm23083350pfv.127.2017.04.25.03.28.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Apr 2017 03:28:25 -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 V4 17/17] thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device Date: Tue, 25 Apr 2017 15:57:24 +0530 Message-Id: <6a883ddf73cd5ed8bc929e8b688f1e61e020508f.1493115651.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 Tested-by: Lukasz Luba --- 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 9cbf7bdbeb7a..1305020790b2 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; };