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: 9697871 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DEF4460224 for ; Tue, 25 Apr 2017 10:30:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7E34285E9 for ; Tue, 25 Apr 2017 10:30:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCC8F28609; Tue, 25 Apr 2017 10:30:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6650C285E9 for ; Tue, 25 Apr 2017 10:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1429623AbdDYKaC (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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; };