From patchwork Thu Mar 16 05:29:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 9627167 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 062E3604A9 for ; Thu, 16 Mar 2017 05:31:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBD16285F5 for ; Thu, 16 Mar 2017 05:31:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDF6728637; Thu, 16 Mar 2017 05:31:31 +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=unavailable 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 60C4B285F5 for ; Thu, 16 Mar 2017 05:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750885AbdCPFba (ORCPT ); Thu, 16 Mar 2017 01:31:30 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35989 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751069AbdCPFax (ORCPT ); Thu, 16 Mar 2017 01:30:53 -0400 Received: by mail-pf0-f172.google.com with SMTP id o126so18998291pfb.3 for ; Wed, 15 Mar 2017 22:30:52 -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=dkL0TZqzCW2AOQ4TGC9HfU7Su82X/avgNwGi9Z+OtAw=; b=gBk7tQ2l3/emWYqDwnAmKGHALDGvl6aeXl4MMD3XIM3Q5e98r0rjsX+5o7B6uhWCZT YS9ukoyGqrRJr/aO7y8fuLjVt7EUMpSqJPXwhihGVb6Ac8Nvq9W8j11DQIn3MrstJVI5 AbbFwEiXMPeJZAm9s1frF0HzXyl55j3A5ajaM= 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=dkL0TZqzCW2AOQ4TGC9HfU7Su82X/avgNwGi9Z+OtAw=; b=iQkIisIitHRvyj6AP7XNDDJXdJ6uMrWTn/wcP2uqQOgyQ2qAvI5bsoWCNI7jpMS5K2 aeo4f7TOhHAH1oh8DJ+FByXoGY9iVpWs5zclje0OX2/9ttbQ6VCD5pZ7yMUv9py6e55Q cNDo5ko9Wkn/55DBUK+iuCrlQbTBXgXzHvMElvIeDEpL0SPFsYEn/QthZRz22DrsJH49 9tjnFRsuDmIdLj0J19Wgua30QlWjrQ9GvraBpCfC9WI37BLpTg2f93fGzC77dxFRfNla BbjvRkOSP+Pjyk+w1UbzDcaJBTBklNnPJn4eyVPtZAmOTa4J1vglyJRRyULusC8ArpTi xPVw== X-Gm-Message-State: AFeK/H2WomgJ2wRw5EIX4DkfDUhU0hDIaIaNPjQ9nBqdxtw87ZFbuShHVYDc/N6cPIJhQqlg X-Received: by 10.98.223.133 with SMTP id d5mr8209520pfl.222.1489642251725; Wed, 15 Mar 2017 22:30:51 -0700 (PDT) Received: from localhost ([122.171.239.200]) by smtp.gmail.com with ESMTPSA id z189sm7491547pgb.3.2017.03.15.22.30.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Mar 2017 22:30:51 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Javi Merino , Zhang Rui , Eduardo Valentin , Amit Daniel Kachhap , Viresh Kumar Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot Subject: [PATCH 17/17] thermal: cpu_cooling: Rearrange struct cpufreq_cooling_device Date: Thu, 16 Mar 2017 10:59:52 +0530 Message-Id: <57676b8e5f4e21ae1645b8cc2a2ddb5f059262bc.1489640000.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.7.1.410.g6faf27b 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 --- 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 768a95bcc392..f31c753ac08f 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; };