From patchwork Thu Jul 17 05:18:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 33769 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 93A86201F1 for ; Thu, 17 Jul 2014 05:20:02 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id r2sf7118700igi.8 for ; Wed, 16 Jul 2014 22:20:02 -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 :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=LLp/Iurd/yWfRUJ2xyGNK1ALHfyh49X9F8fumKd1Eos=; b=OxxaM/nTpGduqxbMjLbN6PRemw0pjvsUSkekWDLjPOFe1flgEitno00GT6peP6DUF0 I4XKKRKx0+ikmz8Q7fmvm4ozDDfhOqgwjXfNqlVLLIl1rn+K8VbY3bC0zyjNCGJjSkKL S0DmbxsaKb67/tnDI3UC+2Em1+p0qGOolJYqcaBwr5o/M+5ZMAyiFqYzkaOEGGH0CqK5 RS+b8ujubx8QDN32WcA6D+VxcbuFQMPC3/p05fdTeerDeAlDPnbzrY58UtJkcmtXY79f Lc+M6+Y3qXIUQtJmMcL3ukqWh5dhdaPQi90FL34IYsEOd1EquAgUMGM8t8tzTJkOERIO lCGA== X-Gm-Message-State: ALoCoQk/OvW5/ly1hOmUEuoCbmAxONafK+oE6uVhD+vevmAH+iuSF0RQIX8tCJPeQz2U9NcQ3Uly X-Received: by 10.42.62.73 with SMTP id x9mr112509ich.15.1405574402134; Wed, 16 Jul 2014 22:20:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.239 with SMTP id l102ls586774qgd.81.gmail; Wed, 16 Jul 2014 22:20:02 -0700 (PDT) X-Received: by 10.52.184.199 with SMTP id ew7mr12070458vdc.44.1405574402035; Wed, 16 Jul 2014 22:20:02 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id py3si1315104vdb.107.2014.07.16.22.20.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 16 Jul 2014 22:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.176 as permitted sender) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id ik5so3500410vcb.7 for ; Wed, 16 Jul 2014 22:20:01 -0700 (PDT) X-Received: by 10.221.34.13 with SMTP id sq13mr36208688vcb.16.1405574401930; Wed, 16 Jul 2014 22:20:01 -0700 (PDT) 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.221.37.5 with SMTP id tc5csp5968vcb; Wed, 16 Jul 2014 22:20:01 -0700 (PDT) X-Received: by 10.68.194.202 with SMTP id hy10mr34437515pbc.94.1405574401147; Wed, 16 Jul 2014 22:20:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id mu3si623908pdb.77.2014.07.16.22.20.00; Wed, 16 Jul 2014 22:20:00 -0700 (PDT) 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 S1752780AbaGQFUA (ORCPT + 15 others); Thu, 17 Jul 2014 01:20:00 -0400 Received: from mail-qc0-f172.google.com ([209.85.216.172]:54912 "EHLO mail-qc0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752635AbaGQFT7 (ORCPT ); Thu, 17 Jul 2014 01:19:59 -0400 Received: by mail-qc0-f172.google.com with SMTP id l6so1707111qcy.3 for ; Wed, 16 Jul 2014 22:19:58 -0700 (PDT) X-Received: by 10.140.109.118 with SMTP id k109mr51990203qgf.98.1405574398889; Wed, 16 Jul 2014 22:19:58 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id v6sm2749433qat.16.2014.07.16.22.19.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 16 Jul 2014 22:19:58 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, arvind.chauhan@arm.com, srivatsa@mit.edu, skannan@codeaurora.org, ybu@qti.qualcomm.com, Viresh Kumar Subject: [PATCH V1 Resend 2/4] cpufreq: don't restore policy->cpus on failure to move kobj Date: Thu, 17 Jul 2014 10:48:26 +0530 Message-Id: X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: 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.220.176 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: , List-Help: , List-Archive: List-Unsubscribe: , While hot-unplugging policy->cpu, we call cpufreq_nominate_new_policy_cpu() to nominate next owner of policy, i.e. policy->cpu. If we fail to move policy kobject under the new policy->cpu, we try to update policy->cpus with the old policy->cpu. This would have been required in case old-cpu is removed from policy->cpus in the first place. But its not done before calling cpufreq_nominate_new_policy_cpu(), but during the POST_DEAD notification which happens quite late in the hot-unplugging path. So, this is just some useless code hanging around, get rid of it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 6f02485..e572d51 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1322,11 +1322,6 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy, ret = kobject_move(&policy->kobj, &cpu_dev->kobj); if (ret) { pr_err("%s: Failed to move kobj: %d\n", __func__, ret); - - down_write(&policy->rwsem); - cpumask_set_cpu(old_cpu, policy->cpus); - up_write(&policy->rwsem); - ret = sysfs_create_link(&cpu_dev->kobj, &policy->kobj, "cpufreq");