Message ID | 1fff9a11bc2dae2751ae5a1125e4db059cde7ced.1420181916.git.viresh.kumar@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCRIZROPVQPBBLMGTGSQKGQE2JCCP7Y@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0E94F26CD1 for <linaro@patches.linaro.org>; Fri, 2 Jan 2015 07:05:18 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id x12sf10330600wgg.0 for <linaro@patches.linaro.org>; Thu, 01 Jan 2015 23:05:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=UpkFQeDiCMd6Dkbtabtbr5Hr0rtI3Lt8doVSKoqBLYU=; b=RSEaOy+l7HvPdQ6v1hQlkHdLI0/0VFYiqCF7weFxClZEmsBg05pSGCE5FQ8yEBBGYW hPVNmd+C8Bj2qK+CS2nE1eZTJQ7TLIOlKqSeLHXsvVrOZj+HmCSjT0aoDlNlHdnOCAj5 vq1aU5VT8zWyn6/OjdFTjt8QDcNrMh5torGvNZgQSYaHBCA6EO6Ftu/FwQdKHRQTXSN7 +HPFIGMaselMe2RObkTN1ptwX849yQ6FC+AfainHhn8NyN8ZzSeYxpNuEUF6r1d90hIC bcC4OcO4PCg6P5WDukd48gizsnPBhGvmvYftIHnnjc3UQOMuZITstZ/BmoDgep8bh0h0 Eqyw== X-Gm-Message-State: ALoCoQkcYYv+ulP6ylUxDRpW1hXkDbc3lrn/A3osbNTXvJeph7KhGkwh3NfQuyaE0kIUsOH0mPXt X-Received: by 10.180.228.38 with SMTP id sf6mr7902363wic.5.1420182317370; Thu, 01 Jan 2015 23:05:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.130 with SMTP id b2ls959334laa.27.gmail; Thu, 01 Jan 2015 23:05:16 -0800 (PST) X-Received: by 10.152.121.37 with SMTP id lh5mr35121608lab.93.1420182316850; Thu, 01 Jan 2015 23:05:16 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id yd10si14979332lbb.131.2015.01.01.23.05.16 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:16 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id hv19so15039082lab.14 for <patchwork-forward@linaro.org>; Thu, 01 Jan 2015 23:05:16 -0800 (PST) X-Received: by 10.152.234.35 with SMTP id ub3mr75214745lac.70.1420182316759; Thu, 01 Jan 2015 23:05:16 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp126100lbb; Thu, 1 Jan 2015 23:05:15 -0800 (PST) X-Received: by 10.66.171.37 with SMTP id ar5mr121755895pac.69.1420182314338; Thu, 01 Jan 2015 23:05:14 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id la3si26847561pab.123.2015.01.01.23.05.12; Thu, 01 Jan 2015 23:05:14 -0800 (PST) Received-SPF: none (google.com: linux-pm-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750735AbbABHFL (ORCPT <rfc822;amit.pundir@linaro.org> + 12 others); Fri, 2 Jan 2015 02:05:11 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:52260 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbbABHFK (ORCPT <rfc822;linux-pm@vger.kernel.org>); Fri, 2 Jan 2015 02:05:10 -0500 Received: by mail-pa0-f41.google.com with SMTP id rd3so23749659pab.28 for <linux-pm@vger.kernel.org>; Thu, 01 Jan 2015 23:05:10 -0800 (PST) X-Received: by 10.70.33.71 with SMTP id p7mr119455463pdi.111.1420182309945; Thu, 01 Jan 2015 23:05:09 -0800 (PST) Received: from localhost ([122.167.116.151]) by mx.google.com with ESMTPSA id bn13sm45683892pdb.4.2015.01.01.23.05.08 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 01 Jan 2015 23:05:09 -0800 (PST) From: Viresh Kumar <viresh.kumar@linaro.org> To: Rafael Wysocki <rjw@rjwysocki.net> Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, prarit@redhat.com, skannan@codeaurora.org, Viresh Kumar <viresh.kumar@linaro.org> Subject: [PATCH 04/17] cpufreq: merge 'if' blocks in __cpufreq_remove_dev_prepare() Date: Fri, 2 Jan 2015 12:34:25 +0530 Message-Id: <1fff9a11bc2dae2751ae5a1125e4db059cde7ced.1420181916.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.2.0 In-Reply-To: <cover.1420181916.git.viresh.kumar@linaro.org> References: <cover.1420181916.git.viresh.kumar@linaro.org> In-Reply-To: <cover.1420181916.git.viresh.kumar@linaro.org> References: <cover.1420181916.git.viresh.kumar@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-pm@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4271d68aec41..4309b075df06 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1364,11 +1364,10 @@ static int __cpufreq_remove_dev_prepare(struct device *dev, pr_err("%s: Failed to stop governor\n", __func__); return ret; } - } - if (!cpufreq_driver->setpolicy) strncpy(per_cpu(cpufreq_cpu_governor, cpu), policy->governor->name, CPUFREQ_NAME_LEN); + } down_read(&policy->rwsem); cpus = cpumask_weight(policy->cpus);
There are two 'if' blocks here, checking for !cpufreq_driver->setpolicy and has_target(). Both are actually doing the same thing, merge them. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> --- drivers/cpufreq/cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)