From patchwork Fri Feb 1 06:15:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10791839 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7287214E1 for ; Fri, 1 Feb 2019 06:15:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6385F312A9 for ; Fri, 1 Feb 2019 06:15:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 57AFD312C4; Fri, 1 Feb 2019 06:15:58 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,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 0409C312A9 for ; Fri, 1 Feb 2019 06:15:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbfBAGP5 (ORCPT ); Fri, 1 Feb 2019 01:15:57 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:32969 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfBAGP5 (ORCPT ); Fri, 1 Feb 2019 01:15:57 -0500 Received: by mail-pl1-f196.google.com with SMTP id z23so2680603plo.0 for ; Thu, 31 Jan 2019 22:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5LRFuPEyKq3EzFrX7KUyuTOgSVNw77Yo4U+tkF/rdBw=; b=NVS0O+3nfN4m7YXiUDPq9aDSUFNnYrUgZIaweslK2RonDnychwZ3k1Nh+XWdjXlndB l/LKV3UEP5UPu00vLzsL1S6BWNoITlJSZ//LarAmFduzZT3GwbyMvZzjz47A3OLTtRFb rQ+bMGyxbsNhY9530ya1635UeN3O8c3owBnKg= 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:mime-version :content-transfer-encoding; bh=5LRFuPEyKq3EzFrX7KUyuTOgSVNw77Yo4U+tkF/rdBw=; b=DAW741SfNeFCinJxs1DIaqr5WGNxBeZQvNAWsZ0c7QWRNvOGbYTl+OSlWObZ0CaPM3 S3IekyZBckIxwHaMXI4XL8a6ObpQEtqQHJfq7cbGcbSLa4rV3IAQtHIgFCi5d6md12u8 MnWrC8aozj0P0Jev1Uxqbk2xKGBxb1E7Il8cUXJBnCWeb8ioiyWp9mvEZtR/EHC83Y7i MPBMHAxH/hBCNsYpfItvo1Ln/Uu9SEC93T79HeyhdtaaPqx05jMW3/Gj3+HhE+35i0mN Z+3RIDj3dTQtZAM1N0Koc3xQ9CICzaiFSUFqw5NJuF8ud2XPQ51bNFzcJOJWRzcMVOJk Pqsw== X-Gm-Message-State: AJcUukcZzoyPAkTStOo1lCGFAZb2YmBH3LSrLut8z8xNGIwQnl2CrHGT 7QzOj5D3QKjCg4B7NUzP+S/Z8A== X-Google-Smtp-Source: ALg8bN7JTbllLT84uwGoTiEQB2gd5nqeriW5yCgxOAifrfv36bC2gBUxorfR/2ezlpr27Iqm/jDCHg== X-Received: by 2002:a17:902:a60f:: with SMTP id u15mr36242602plq.275.1549001756370; Thu, 31 Jan 2019 22:15:56 -0800 (PST) Received: from localhost ([122.172.102.63]) by smtp.gmail.com with ESMTPSA id f67sm9337844pfc.141.2019.01.31.22.15.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Jan 2019 22:15:54 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] cpufreq: stats: Declare freq-attr right after their callbacks Date: Fri, 1 Feb 2019 11:45:44 +0530 Message-Id: X-Mailer: git-send-email 2.20.1.321.g9e740568ce00 MIME-Version: 1.0 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 Freq attribute for "trans_table" is defined right after its callback (without any blank line between them), but the others are defined separately later on. Keep this consistent and define all attributes right after their callbacks. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq_stats.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c index 1572129844a5..941e63e3e652 100644 --- a/drivers/cpufreq/cpufreq_stats.c +++ b/drivers/cpufreq/cpufreq_stats.c @@ -51,6 +51,7 @@ static ssize_t show_total_trans(struct cpufreq_policy *policy, char *buf) { return sprintf(buf, "%d\n", policy->stats->total_trans); } +cpufreq_freq_attr_ro(total_trans); static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) { @@ -69,6 +70,7 @@ static ssize_t show_time_in_state(struct cpufreq_policy *policy, char *buf) } return len; } +cpufreq_freq_attr_ro(time_in_state); static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, size_t count) @@ -77,6 +79,7 @@ static ssize_t store_reset(struct cpufreq_policy *policy, const char *buf, cpufreq_stats_clear_table(policy->stats); return count; } +cpufreq_freq_attr_wo(reset); static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) { @@ -126,10 +129,6 @@ static ssize_t show_trans_table(struct cpufreq_policy *policy, char *buf) } cpufreq_freq_attr_ro(trans_table); -cpufreq_freq_attr_ro(total_trans); -cpufreq_freq_attr_ro(time_in_state); -cpufreq_freq_attr_wo(reset); - static struct attribute *default_attrs[] = { &total_trans.attr, &time_in_state.attr,