From patchwork Fri Jul 18 15:37:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dirk.brandewie@gmail.com X-Patchwork-Id: 4586281 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83E30C0514 for ; Fri, 18 Jul 2014 15:37:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 97FCE2011D for ; Fri, 18 Jul 2014 15:37:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1295720160 for ; Fri, 18 Jul 2014 15:37:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422803AbaGRPhq (ORCPT ); Fri, 18 Jul 2014 11:37:46 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:37713 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422773AbaGRPhp (ORCPT ); Fri, 18 Jul 2014 11:37:45 -0400 Received: by mail-pd0-f174.google.com with SMTP id fp1so5207779pdb.19 for ; Fri, 18 Jul 2014 08:37:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iqnDtA17HZRQBdpHqRvc7cDCIL0/n55VT7L5BNdXbZQ=; b=IH15DWM/RLsD0MxQiYyz5YnWRzjmxikmyFTshdkk2wpP7cM4Ql0E3qp5ErjlaeXO+c +ei83gJTkyWi5d7z8NP6wMUeaRZykGGmbVWENLxXmHfICoqNPONG65zvhhUfKfvsi8p/ soPVUvFoR05VojVf3TI68N4Y6yVLDGLpOXchvYxCHratxDb7fmGORBQsnp4Reffv5CCY OzC6CoC8AmOywoS6D4V6bOqWg2D1yk2F6jNhaiVWbwN3Oezq5I1byrDVUbi0cYsMEeqv 2VbPCrgh15sq1yWVVWylMOa/cDrk2vjRyI5kTRCXcPKwTQCRCS7gIKqQEuYW4bBb/kO1 uspw== X-Received: by 10.66.253.35 with SMTP id zx3mr6204465pac.105.1405697865045; Fri, 18 Jul 2014 08:37:45 -0700 (PDT) Received: from echolake.localdomain (static-50-43-41-81.bvtn.or.frontiernet.net. [50.43.41.81]) by mx.google.com with ESMTPSA id be7sm7894439pdb.37.2014.07.18.08.37.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 08:37:44 -0700 (PDT) From: dirk.brandewie@gmail.com X-Google-Original-From: dirk.j.brandewie@intel.com To: linux-pm@vger.kernel.org Cc: rjw@rjwysocki.net, Stratos Karafotis , Dirk Brandewie Subject: [PATCH 04/11] cpufreq: intel_pstate: Fit code in a single line where possible Date: Fri, 18 Jul 2014 08:37:20 -0700 Message-Id: <1405697848-13546-5-git-send-email-dirk.j.brandewie@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1405697848-13546-1-git-send-email-dirk.j.brandewie@intel.com> References: <1405697848-13546-1-git-send-email-dirk.j.brandewie@intel.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Stratos Karafotis We can fit these lines in a single one, under the 80 characters limit. Signed-off-by: Stratos Karafotis Signed-off-by: Dirk Brandewie --- drivers/cpufreq/intel_pstate.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index e9f3048..424c5a9 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -205,11 +205,7 @@ static inline void intel_pstate_busy_pid_reset(struct cpudata *cpu) pid_d_gain_set(&cpu->pid, pid_params.d_gain_pct); pid_i_gain_set(&cpu->pid, pid_params.i_gain_pct); - pid_reset(&cpu->pid, - pid_params.setpoint, - 100, - pid_params.deadband, - 0); + pid_reset(&cpu->pid, pid_params.setpoint, 100, pid_params.deadband, 0); } static inline void intel_pstate_reset_all_pid(void) @@ -235,8 +231,7 @@ static int pid_param_get(void *data, u64 *val) *val = *(u32 *)data; return 0; } -DEFINE_SIMPLE_ATTRIBUTE(fops_pid_param, pid_param_get, - pid_param_set, "%llu\n"); +DEFINE_SIMPLE_ATTRIBUTE(fops_pid_param, pid_param_get, pid_param_set, "%llu\n"); struct pid_param { char *name; @@ -355,8 +350,7 @@ static void __init intel_pstate_sysfs_expose_params(void) intel_pstate_kobject = kobject_create_and_add("intel_pstate", &cpu_subsys.dev_root->kobj); BUG_ON(!intel_pstate_kobject); - rc = sysfs_create_group(intel_pstate_kobject, - &intel_pstate_attr_group); + rc = sysfs_create_group(intel_pstate_kobject, &intel_pstate_attr_group); BUG_ON(rc); } @@ -515,8 +509,7 @@ static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max) cpu->pstate.min_pstate, cpu->pstate.turbo_pstate); min_perf = fp_toint(mul_fp(int_tofp(max_perf), limits.min_perf)); - *min = clamp_t(int, min_perf, - cpu->pstate.min_pstate, max_perf); + *min = clamp_t(int, min_perf, cpu->pstate.min_pstate, max_perf); } static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) @@ -713,8 +706,7 @@ static int intel_pstate_init_cpu(unsigned int cpunum) init_timer_deferrable(&cpu->timer); cpu->timer.function = intel_pstate_timer_func; - cpu->timer.data = - (unsigned long)cpu; + cpu->timer.data = (unsigned long)cpu; cpu->timer.expires = jiffies + HZ/100; intel_pstate_busy_pid_reset(cpu); intel_pstate_sample(cpu);