From patchwork Fri Sep 13 12:59:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 20057 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C2E87202E6 for ; Fri, 13 Sep 2013 13:03:24 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf1210937veb.11 for ; Fri, 13 Sep 2013 06:03:24 -0700 (PDT) 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 :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ngNnoBoCMncRepZJNuXgBTXw6xXT8uws38W3bS8C1BU=; b=cPp2dikaxG56qJDfKT7Uj1H0Rl9qXmBan4qHI/YeqnpwhFeunaKBhSUzS0jfDdQU39 nEhNrBeTDzt44O3fqPixNBxnG2otd7+syGe5678jvq0Y+Ge1ELLwzhOV5SOozfySSkfv z6QGF728lkEyxoD22cuHgJb2FryNJrBC2aOhOq7fnuTZowPR6v1T6VAUGyVLmOWd3s8D yaE+wwgaWWcUaKMvmJUzntl5PClmMumQ2n2S4P3XS0/sc20yn/5jfRyTemDhERLHFLS2 0r/g/EMmAELFLmbJa9NXhb1pML0yEae9TC3oMMf0LzzzjnDJ/rL8aqGN2AZcqqgEr5ZA coMA== X-Gm-Message-State: ALoCoQls3lBo3IRK3wgzM8lclNcMfssXyJZFQDQDL8XLcSJm52+bQTwlJR19vi3vRfmcwfJEYmnp X-Received: by 10.236.80.42 with SMTP id j30mr4901569yhe.29.1379077404514; Fri, 13 Sep 2013 06:03:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.231 with SMTP id y7ls1089256qeu.39.gmail; Fri, 13 Sep 2013 06:03:24 -0700 (PDT) X-Received: by 10.58.118.130 with SMTP id km2mr11848487veb.0.1379077404275; Fri, 13 Sep 2013 06:03:24 -0700 (PDT) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx.google.com with ESMTPS id y4si3106419vcx.24.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:24 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.47; Received: by mail-vb0-f47.google.com with SMTP id h10so869742vbh.6 for ; Fri, 13 Sep 2013 06:03:24 -0700 (PDT) X-Received: by 10.58.171.4 with SMTP id aq4mr1566689vec.26.1379077404191; Fri, 13 Sep 2013 06:03:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp79394vcz; Fri, 13 Sep 2013 06:03:22 -0700 (PDT) X-Received: by 10.66.27.175 with SMTP id u15mr14966675pag.146.1379077402232; Fri, 13 Sep 2013 06:03:22 -0700 (PDT) Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by mx.google.com with ESMTPS id ql10si7410091pbb.100.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:22 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.43 is neither permitted nor denied by best guess record for domain of viresh.kumar@linaro.org) client-ip=209.85.220.43; Received: by mail-pa0-f43.google.com with SMTP id hz10so2502587pad.16 for ; Fri, 13 Sep 2013 06:03:21 -0700 (PDT) X-Received: by 10.67.5.132 with SMTP id cm4mr1564355pad.186.1379077401810; Fri, 13 Sep 2013 06:03:21 -0700 (PDT) Received: from localhost ([122.167.78.148]) by mx.google.com with ESMTPSA id nv6sm11660137pbc.6.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 13 Sep 2013 06:03:21 -0700 (PDT) From: Viresh Kumar To: rjw@sisk.pl Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, cpufreq@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Viresh Kumar Subject: [PATCH 003/228] cpufreq: remove __cpufreq_remove_dev() Date: Fri, 13 Sep 2013 18:29:09 +0530 Message-Id: <9efdaeff9bbdd0f9df3b0edd7b274535708de3dd.1379063063.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.47 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Nobody except cpufreq_remove_dev() is calling __cpufreq_remove_dev() and so we don't need separate routines here. Lets merge code from __cpufreq_remove_dev() to cpufreq_remove_dev() and get rid of __cpufreq_remove_dev(). Reviewed-by: Srivatsa S. Bhat Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6a8cae9..e217d8f 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1343,36 +1343,26 @@ static int __cpufreq_remove_dev_finish(struct device *dev, } /** - * __cpufreq_remove_dev - remove a CPU device + * cpufreq_remove_dev - remove a CPU device * * Removes the cpufreq interface for a CPU device. * Caller should already have policy_rwsem in write mode for this CPU. * This routine frees the rwsem before returning. */ -static inline int __cpufreq_remove_dev(struct device *dev, - struct subsys_interface *sif, - bool frozen) -{ - int ret; - - ret = __cpufreq_remove_dev_prepare(dev, sif, frozen); - - if (!ret) - ret = __cpufreq_remove_dev_finish(dev, sif, frozen); - - return ret; -} - static int cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif) { unsigned int cpu = dev->id; - int retval; + int ret; if (cpu_is_offline(cpu)) return 0; - retval = __cpufreq_remove_dev(dev, sif, false); - return retval; + ret = __cpufreq_remove_dev_prepare(dev, sif, false); + + if (!ret) + ret = __cpufreq_remove_dev_finish(dev, sif, false); + + return ret; } static void handle_update(struct work_struct *work)