From patchwork Mon Apr 17 06:02:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 97505 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1212773qgf; Sun, 16 Apr 2017 23:03:57 -0700 (PDT) X-Received: by 10.84.231.204 with SMTP id g12mr12034980pln.145.1492409037552; Sun, 16 Apr 2017 23:03:57 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g26si10020227pge.96.2017.04.16.23.03.57; Sun, 16 Apr 2017 23:03:57 -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 S933014AbdDQGDu (ORCPT + 12 others); Mon, 17 Apr 2017 02:03:50 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:36533 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932993AbdDQGDr (ORCPT ); Mon, 17 Apr 2017 02:03:47 -0400 Received: by mail-pf0-f172.google.com with SMTP id 194so22275531pfv.3 for ; Sun, 16 Apr 2017 23:03:41 -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=4CQ86N6Dd1pYfyB7qMIpunWt3Pvwfh8awvk19JdwHIc=; b=imLckBT7+cIYH9HBcSqwrQhv8YOaOiBX9Oh+Dzd5eO8EERLzRJXN5NMLWD3PjpLlNs /Qq6F8z8FoeCKei0mgMoietADBw8pj68Xlo004PhNIXtUvwT3GbrU/fjoqyOQXXTbvy3 KBDVex7ttOFFF8lfEJ1uCBvOvUJP3DVW/cGZ0= 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=4CQ86N6Dd1pYfyB7qMIpunWt3Pvwfh8awvk19JdwHIc=; b=K07c7yWDycXHgLfLQwOaestmJgT9NqPY9mQLk/+fqwn5sQz8Nt6u2TG02vCTnfigme NUbixyf193f9Lu9hJcdo3bmn9Ln2OTjjfXPyEYNd+3YVERhaEXDof/Heuzav3V+LxGwC O96bMC1edK3l4ncgH1H5H/5hZlcqrLuIwJ7UPT1eqwAnTc0xr9cQP5WKA6on2c018R8h n9ykKWa2aOlTvhXJiBEtyGcZwGyh5cLoHKnUdbxuB+QimkyGEYFClNGaRCgDw0gD1uJx 4zaifssVq/EuVDGnZySdqqWyi71+TkrLtx1HHGFu1frp1fXfm129cPFyWPMl3aXCD48c hv2Q== X-Gm-Message-State: AN3rC/44g0aCMz00NqyAyPWtFAtocXp9fuI9j5dP6X/B4Bp+yKn3yKCX al8ILcnmL7T6zqHN X-Received: by 10.98.7.1 with SMTP id b1mr10289717pfd.20.1492409021300; Sun, 16 Apr 2017 23:03:41 -0700 (PDT) Received: from localhost ([122.172.121.5]) by smtp.gmail.com with ESMTPSA id b185sm15305163pfa.61.2017.04.16.23.03.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Apr 2017 23:03:40 -0700 (PDT) From: Viresh Kumar To: Javi Merino , Zhang Rui , Eduardo Valentin , 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 Subject: [PATCH V2 17/17] thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device Date: Mon, 17 Apr 2017 11:32:02 +0530 Message-Id: <908063832c268f8add94afd2695b2567bc0912ea.1492408342.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 dfc3638ea939..99ffd9f6cbb9 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; };