From patchwork Mon Aug 3 03:06:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 51840 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by patches.linaro.org (Postfix) with ESMTPS id 14B11229FD for ; Mon, 3 Aug 2015 03:07:32 +0000 (UTC) Received: by lbcjj5 with SMTP id jj5sf39659916lbc.1 for ; Sun, 02 Aug 2015 20:07:31 -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=aNRvtJJkqpiNX+gkuNMjxqRZYH//a/qGxejw3miFrCk=; b=YYKevkXU5FtR7nAGucETjBmqU79pJPIHHiPSKhAXByfsewDkmaDVBfCYuYCzbvoGoO o/ujzN3gYRmVXrGqNfpX2bPBI0bjE5PtGzYt79p1IVhEx+X+wmxCE00pX5Nevy7cTomN AIP9NlC9LtHIxSxCrxterCFTTSQaz6lYCtGVr8sbP6s18g4f6O88iaab3IGnSDbDYE0h oQt/esM4bAHF0+6KnScVWZqRs13yiQvAJLc/7SCeALfyQLw5JRrP5tYQKhLM8ekQuhrG qSGninkVO98YdCeuri7mFKWC4Wvx4SgfzZH33M+jmLQ/iAj3R92R+C+bKffwhzh5rLIw kVPw== X-Gm-Message-State: ALoCoQm2FgWmZfw1jkhxp+c8maJJSCp0MWvLqi2QoDVwFAIadi5VdscXt97MGseO3TFjiFV21mUD X-Received: by 10.194.19.33 with SMTP id b1mr2114170wje.6.1438571251039; Sun, 02 Aug 2015 20:07:31 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.37.7 with SMTP id u7ls451292laj.105.gmail; Sun, 02 Aug 2015 20:07:30 -0700 (PDT) X-Received: by 10.152.44.130 with SMTP id e2mr14719273lam.14.1438571250842; Sun, 02 Aug 2015 20:07:30 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id qb5si10828515lbb.28.2015.08.02.20.07.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Aug 2015 20:07:30 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbbyj8 with SMTP id yj8so70702963lbb.0 for ; Sun, 02 Aug 2015 20:07:30 -0700 (PDT) X-Received: by 10.112.198.74 with SMTP id ja10mr14618211lbc.19.1438571250673; Sun, 02 Aug 2015 20:07:30 -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.7.198 with SMTP id l6csp1626743lba; Sun, 2 Aug 2015 20:07:29 -0700 (PDT) X-Received: by 10.70.131.48 with SMTP id oj16mr31335786pdb.48.1438571248240; Sun, 02 Aug 2015 20:07:28 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si23931296pas.144.2015.08.02.20.07.26; Sun, 02 Aug 2015 20:07:28 -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 S1752848AbbHCDHM (ORCPT + 28 others); Sun, 2 Aug 2015 23:07:12 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:35107 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752815AbbHCDHD (ORCPT ); Sun, 2 Aug 2015 23:07:03 -0400 Received: by pdrg1 with SMTP id g1so68032276pdr.2 for ; Sun, 02 Aug 2015 20:07:03 -0700 (PDT) X-Received: by 10.70.103.200 with SMTP id fy8mr17618038pdb.164.1438571222946; Sun, 02 Aug 2015 20:07:02 -0700 (PDT) Received: from localhost ([122.171.186.190]) by smtp.gmail.com with ESMTPSA id ow5sm15618543pdb.30.2015.08.02.20.07.01 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 02 Aug 2015 20:07:02 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Viresh Kumar , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 7/7] cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor() Date: Mon, 3 Aug 2015 08:36:20 +0530 Message-Id: <0e4db9528298798f7fcbec4ea79fe6f6e5518784.1438571116.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.4.0 In-Reply-To: References: In-Reply-To: References: 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.180 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: , Driver is guaranteed to be present on a call to cpufreq_parse_governor() and there is no need to check for !cpufreq_driver. Drop it. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index a80bd68bbd74..a05cc75cc45d 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -520,9 +520,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy, { int err = -EINVAL; - if (!cpufreq_driver) - goto out; - if (cpufreq_driver->setpolicy) { if (!strncasecmp(str_governor, "performance", CPUFREQ_NAME_LEN)) { *policy = CPUFREQ_POLICY_PERFORMANCE; @@ -557,7 +554,6 @@ static int cpufreq_parse_governor(char *str_governor, unsigned int *policy, mutex_unlock(&cpufreq_governor_mutex); } -out: return err; }