From patchwork Sun Oct 11 17:21:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 54744 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id 1763A2304F for ; Sun, 11 Oct 2015 17:22:01 +0000 (UTC) Received: by wijq8 with SMTP id q8sf24746673wij.1 for ; Sun, 11 Oct 2015 10:22:00 -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=mOAESgJRnrvzcalt87aNoXf3sTRMfB25mKMNMoB97QE=; b=UljahBuOBoS2T+IDG3doOfklZ0Gj7b6xK8o55piPrIeZk+N9mbroub3Yy4nRsyCBbE LyS6fcRBULxjE0ewVbZtyHE3SHPnfvI3Fo35kKqSO6SEcN29OC5q3+hAT8LO7y48Ig8i fyML8Xd9gUS9UZtALjiWE4wkxPYO+Rn6C9oxbRX1q5r0VHifg87ueJlkd/JIKq01Vl4n PGYh6fHYm+bYvLZcrldVVvt9QyZjPvgpScUI+9s02cqHQ2lBxGE5SPfinDUhAP9ek0nt 3fFHGfk8RUcfUR/3Wls6Qyz/4BkOr3ZcV2OqdKTX8szMX1HszxMPfxEN/TytQ6M+7DvJ B2Jg== X-Gm-Message-State: ALoCoQkfdaAxb5vvwGxI4v9xm6FmkNdKZPmuMG9U2Nzp6ExUyJLeYUEfqCbXqaWfBCTbZC2QvL6U X-Received: by 10.180.85.133 with SMTP id h5mr1927905wiz.1.1444584120394; Sun, 11 Oct 2015 10:22:00 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.32.207 with SMTP id g198ls408506lfg.18.gmail; Sun, 11 Oct 2015 10:22:00 -0700 (PDT) X-Received: by 10.112.141.228 with SMTP id rr4mr10741445lbb.48.1444584120115; Sun, 11 Oct 2015 10:22:00 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id f79si8414801lfg.45.2015.10.11.10.22.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Oct 2015 10:22:00 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbk10 with SMTP id k10so11215448lbb.0 for ; Sun, 11 Oct 2015 10:22:00 -0700 (PDT) X-Received: by 10.25.205.198 with SMTP id d189mr7051260lfg.72.1444584119999; Sun, 11 Oct 2015 10:21:59 -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 w3csp1144066lbq; Sun, 11 Oct 2015 10:21:59 -0700 (PDT) X-Received: by 10.68.197.196 with SMTP id iw4mr29254594pbc.153.1444584119022; Sun, 11 Oct 2015 10:21:59 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jo6si19638082pbc.90.2015.10.11.10.21.58; Sun, 11 Oct 2015 10:21:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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 S1752349AbbJKRVw (ORCPT + 12 others); Sun, 11 Oct 2015 13:21:52 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:35189 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752326AbbJKRVt (ORCPT ); Sun, 11 Oct 2015 13:21:49 -0400 Received: by pabve7 with SMTP id ve7so74365267pab.2 for ; Sun, 11 Oct 2015 10:21:48 -0700 (PDT) X-Received: by 10.66.235.194 with SMTP id uo2mr22565825pac.41.1444584108745; Sun, 11 Oct 2015 10:21:48 -0700 (PDT) Received: from localhost ([120.59.64.42]) by smtp.gmail.com with ESMTPSA id xa4sm13743043pac.28.2015.10.11.10.21.45 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 11 Oct 2015 10:21:48 -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 5/5] cpufreq: Drop redundant check for inactive policies Date: Sun, 11 Oct 2015 22:51:14 +0530 Message-Id: <2d6d59c2b0654872a32a9b63874b750e6b808cb5.1444583718.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 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.217.172 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 --- 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();