From patchwork Tue Oct 13 05:27:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 54822 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by patches.linaro.org (Postfix) with ESMTPS id D78B123001 for ; Tue, 13 Oct 2015 05:27:36 +0000 (UTC) Received: by wijq8 with SMTP id q8sf4242263wij.1 for ; Mon, 12 Oct 2015 22:27:36 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=kI6ExPh9O/lu7k7ksJv0sNV+RqZn8NWQ37yTa+uN1Mo=; b=ccmaIsMwx9ASH20Cmq5ZfD/FU13SiPEm+WjSfLrbXzIDkumT/Uh2abPmXErdsFPsNi 3jREuXC26dbFM44abJ2wBtjwsJKypXK0SHmsQi0J894eS6UnfK10Z33Hd2xfBg8R/xuQ VOIzLh81h/los9KCDB8/82GnWQN6sWlf6nwaLrHV9Ogw9iQNZfxGiGCB+J8S7BrGKcY0 s4YJsKtdO4djKT96pmy8q1A9jHWrV1ta0r/888LLdVkhQO7iSvvbP5x5NzJJD0LHuC2W JXAAd62/MD+begm4S96Jn5P1VNxurY70VVhn90/cLf2RlmJlCCJkxA5JCRjPHzzlMphz 3iRA== X-Gm-Message-State: ALoCoQnNKQoSa5SHW/QuA2o4zNYsdd6pu27tcepoWHPaisO0XXvBnMkyc6Q1kRZFy/rLirhRA0Oa X-Received: by 10.180.10.135 with SMTP id i7mr3738779wib.2.1444714056219; Mon, 12 Oct 2015 22:27:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.87.8 with SMTP id l8ls661384lfb.92.gmail; Mon, 12 Oct 2015 22:27:36 -0700 (PDT) X-Received: by 10.25.165.4 with SMTP id o4mr9396644lfe.4.1444714056037; Mon, 12 Oct 2015 22:27:36 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id tb2si946717lbb.176.2015.10.12.22.27.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Oct 2015 22:27:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbbck17 with SMTP id ck17so6703561lbb.1 for ; Mon, 12 Oct 2015 22:27:35 -0700 (PDT) X-Received: by 10.25.86.213 with SMTP id k204mr9191891lfb.36.1444714055878; Mon, 12 Oct 2015 22:27:35 -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.112.59.35 with SMTP id w3csp1910774lbq; Mon, 12 Oct 2015 22:27:35 -0700 (PDT) X-Received: by 10.68.65.70 with SMTP id v6mr39537056pbs.23.1444714054867; Mon, 12 Oct 2015 22:27:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lm3si2383393pab.17.2015.10.12.22.27.34; Mon, 12 Oct 2015 22:27:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751819AbbJMF1d (ORCPT + 30 others); Tue, 13 Oct 2015 01:27:33 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:33525 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751372AbbJMF1b (ORCPT ); Tue, 13 Oct 2015 01:27:31 -0400 Received: by pabrc13 with SMTP id rc13so10030104pab.0 for ; Mon, 12 Oct 2015 22:27:31 -0700 (PDT) X-Received: by 10.66.121.225 with SMTP id ln1mr2682637pab.86.1444714051122; Mon, 12 Oct 2015 22:27:31 -0700 (PDT) Received: from localhost ([223.227.239.124]) by smtp.gmail.com with ESMTPSA id kw10sm1265278pbc.25.2015.10.12.22.27.27 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 12 Oct 2015 22:27:30 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, skannan@codeaurora.org, Viresh Kumar , linux-kernel@vger.kernel.org (open list) Subject: [PATCH Resend] cpufreq: Drop redundant check for inactive policies Date: Tue, 13 Oct 2015 10:57:13 +0530 Message-Id: <2d6d59c2b0654872a32a9b63874b750e6b808cb5.1444713966.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@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.217.173 as permitted sender) smtp.mailfrom=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: , We just made sure policy->cpu is online and this check will always fail as the policy is active. Drop it. Signed-off-by: Viresh Kumar Acked-by: Saravana Kannan Reviewed-by: Saravana Kannan Acked-by: Saravana Kannan --- Resending as a separate patch. drivers/cpufreq/cpufreq.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 58aabe0f2d2c..4fa2215cc6ec 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -843,18 +843,11 @@ static ssize_t store(struct kobject *kobj, struct attribute *attr, down_write(&policy->rwsem); - /* Updating inactive policies is invalid, so avoid doing that. */ - if (unlikely(policy_is_inactive(policy))) { - ret = -EBUSY; - goto unlock_policy_rwsem; - } - if (fattr->store) ret = fattr->store(policy, buf, count); else ret = -EIO; -unlock_policy_rwsem: up_write(&policy->rwsem); unlock: put_online_cpus();