From patchwork Tue Oct 21 17:19:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 39198 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CD6AA2039B for ; Tue, 21 Oct 2014 17:19:25 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id w7sf1052614lbi.2 for ; Tue, 21 Oct 2014 10:19: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:subject:date :message-id: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=+zmIi7L8Y97V+wHTjJROsILtXyMpVNqbctu3eEKbvPg=; b=RxNLA/BJcYmcNiwQUzdC96aHVbwRoEl1eArCjnjmyGlvIY2b+nF9ANhqJQkbkyUkI/ BfWwvfKg4ufbxY9X4SE93Ybw0PB16Mro6VL/X5gPwyHn3yxO1eeWV+o1LIUUAS17zAVu enD5lLDORgA43CxLNZ256JAcOdeY84U5/l4SChGyFeld5EEl0A+R2zdSLvNa+5fftVRa xu/k9n42f4HpFqh+nHUT1uK+cbhtcohdjTQp0bBx469Gjy1rkbeFzCpFeayEhdqJCCzu 6mD6qczhSctxPkLOmNPZjOCe2uZqoe9OeSWIy4eyn0pvaAI0PPkFGyBjZ4gVgFhh0duh EOYA== X-Gm-Message-State: ALoCoQm+CppDcfEeHCZOnA4rxE8EEOQURKFfywSxl0fcNeheA9MN7wLK9U7lkGMRsc5LswgoZ60X X-Received: by 10.194.206.10 with SMTP id lk10mr803853wjc.3.1413911964619; Tue, 21 Oct 2014 10:19:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.10 with SMTP id m10ls82364laj.72.gmail; Tue, 21 Oct 2014 10:19:24 -0700 (PDT) X-Received: by 10.112.148.199 with SMTP id tu7mr36737806lbb.7.1413911964413; Tue, 21 Oct 2014 10:19:24 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id l10si19994714lbd.29.2014.10.21.10.19.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 10:19:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by mail-lb0-f175.google.com with SMTP id u10so1385834lbd.6 for ; Tue, 21 Oct 2014 10:19:24 -0700 (PDT) X-Received: by 10.112.167.38 with SMTP id zl6mr36153055lbb.34.1413911964311; Tue, 21 Oct 2014 10:19: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.112.84.229 with SMTP id c5csp545209lbz; Tue, 21 Oct 2014 10:19:23 -0700 (PDT) X-Received: by 10.152.9.137 with SMTP id z9mr36795563laa.14.1413911963937; Tue, 21 Oct 2014 10:19:23 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id y8si19941579lag.85.2014.10.21.10.19.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 10:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id q1so1443670lam.8 for ; Tue, 21 Oct 2014 10:19:23 -0700 (PDT) X-Received: by 10.152.116.68 with SMTP id ju4mr36194156lab.13.1413911963831; Tue, 21 Oct 2014 10:19:23 -0700 (PDT) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id uh7sm4791085lac.1.2014.10.21.10.19.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Oct 2014 10:19:22 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Chris Ball Subject: [PATCH 03/15] mmc: core: Remove redundant check while selecting powerclass Date: Tue, 21 Oct 2014 19:19:01 +0200 Message-Id: <1413911953-19012-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413911953-19012-1-git-send-email-ulf.hansson@linaro.org> References: <1413911953-19012-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@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.175 as permitted sender) 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: , The validation of the buswidth and the MMC spec version in __mmc_select_powerclass() is redundant, let's remove it. Signed-off-by: Ulf Hansson --- drivers/mmc/core/mmc.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 87ee28f..2da3a53 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -768,14 +768,6 @@ static int __mmc_select_powerclass(struct mmc_card *card, unsigned int pwrclass_val = 0; int err = 0; - /* Power class selection is supported for versions >= 4.0 */ - if (card->csd.mmca_vsn < CSD_SPEC_VER_4) - return 0; - - /* Power class values are defined only for 4/8 bit bus */ - if (bus_width == EXT_CSD_BUS_WIDTH_1) - return 0; - switch (1 << host->ios.vdd) { case MMC_VDD_165_195: if (host->ios.clock <= MMC_HIGH_26_MAX_DTR)