From patchwork Tue Jun 7 22:44:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9162773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3620960467 for ; Tue, 7 Jun 2016 22:48:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27FB928360 for ; Tue, 7 Jun 2016 22:48:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CB3D2836E; Tue, 7 Jun 2016 22:48:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C4DE428360 for ; Tue, 7 Jun 2016 22:48:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAPmJ-0007H3-UL; Tue, 07 Jun 2016 22:47:19 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bAPkn-0005jC-0I for linux-arm-kernel@bombadil.infradead.org; Tue, 07 Jun 2016 22:45:45 +0000 Received: from mail-pf0-x230.google.com ([2607:f8b0:400e:c00::230]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bAPkl-0003V0-0Q for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2016 22:45:44 +0000 Received: by mail-pf0-x230.google.com with SMTP id t190so8176711pfb.3 for ; Tue, 07 Jun 2016 15:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vtgu6eWrQOXiH6NJEbpq3VesUlWdnxUB0viJRNtQRS8=; b=mwQPVOFoA8ho0+t72u3Kux49/pWJxBqyi6sFpSyZ1pPf6pASGHd9FE9GWO+VZfGStF BfDZ/5fAyUATwI/OUsoSmddjOhD6Ek18F5Tf/a2zN5YrCpnfr9FrkJ7EgsRd5KheA3zs zJkTrtZqHZogIT2A1QaFFfJ+8MfGIgEkNsYVY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vtgu6eWrQOXiH6NJEbpq3VesUlWdnxUB0viJRNtQRS8=; b=LSk+hT7dbPZpnviAWl+0z+WnXb7PTxevBkZ3Xao98OGVYXf3vbI7QRV/A3v4uUjfa5 lBONXsYk+ePvpHbps7Dvot3gHsKk6wxivOnhx1mLMhf/j0gw+rjdGSf3DSs+UHHbO3BH oZ34aeu75KOWcU057yWqjiMZA6Ebbf5PXkGfcBVbWbxJCu2XpyFVh2Wezc/63s3utV1S A115nmf0Ko1u5NvgXW+FwSHvm71wa5y42TOXX9jRfJWMrpErjSMLlM2Lt0KUqqHJt67h rcFfDMbjtPOfB2I+FNJ3mkrDocE0QvdC6n2akLHXsi/97BBK9TbEaNzs+2p0Ejr147ng mVvw== X-Gm-Message-State: ALyK8tIkrcP2KyFDvymcvGc5Eu69QC3rYz/CwZkhdf83MX7li8LAL3h+5vudtjgqNaeTlyHa X-Received: by 10.98.91.196 with SMTP id p187mr1941519pfb.58.1465339518016; Tue, 07 Jun 2016 15:45:18 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id 4sm37641782pfm.15.2016.06.07.15.45.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Jun 2016 15:45:17 -0700 (PDT) From: Douglas Anderson To: ulf.hansson@linaro.org, kishon@ti.com, Heiko Stuebner , robh+dt@kernel.org Subject: [PATCH 10/11] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_off() Date: Tue, 7 Jun 2016 15:44:43 -0700 Message-Id: <1465339484-969-11-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1465339484-969-1-git-send-email-dianders@chromium.org> References: <1465339484-969-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160607_184543_141718_C8728C2F X-CRM114-Status: GOOD ( 12.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, xzy.xu@rock-chips.com, linux-kernel@vger.kernel.org, shawn.lin@rock-chips.com, briannorris@chromium.org, linux-mmc@vger.kernel.org, adrian.hunter@intel.com, Douglas Anderson , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There's no reason to store the return value of rockchip_emmc_phy_power() in a variable nor to check it. Just return it. Signed-off-by: Douglas Anderson --- drivers/phy/phy-rockchip-emmc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index 0fce7359d468..188e4c387ba8 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -227,8 +227,6 @@ static int rockchip_emmc_phy_power_off(struct phy *phy) static int rockchip_emmc_phy_power_on(struct phy *phy) { struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); - int ret = 0; - /* Drive impedance: 50 Ohm */ regmap_write(rk_phy->reg_base, @@ -252,11 +250,7 @@ static int rockchip_emmc_phy_power_on(struct phy *phy) PHYCTRL_OTAPDLYSEL_SHIFT)); /* Power up emmc phy analog blocks */ - ret = rockchip_emmc_phy_power(phy, PHYCTRL_PDB_PWR_ON); - if (ret) - return ret; - - return 0; + return rockchip_emmc_phy_power(phy, PHYCTRL_PDB_PWR_ON); } static const struct phy_ops ops = {