From patchwork Mon Jun 20 17:56:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9188415 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 A34CD607D1 for ; Mon, 20 Jun 2016 18:06:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 98B9C27BFC for ; Mon, 20 Jun 2016 18:06:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D53227C14; Mon, 20 Jun 2016 18:06:09 +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 3765027BFC for ; Mon, 20 Jun 2016 18:06:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3Yc-0004BX-2m; Mon, 20 Jun 2016 18:04:22 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3Vc-0007M1-MV for linux-arm-kernel@bombadil.infradead.org; Mon, 20 Jun 2016 18:01:16 +0000 Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]) by merlin.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bF3Vb-0001qd-7v for linux-arm-kernel@lists.infradead.org; Mon, 20 Jun 2016 18:01:15 +0000 Received: by mail-pf0-x234.google.com with SMTP id h14so41119698pfe.1 for ; Mon, 20 Jun 2016 11:00:54 -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=+yqRA+26HqvULi4zy92VgoIE5p2ZHBSHbshQdiLYU6M=; b=kT44fHykJhyPVJjBeJPCmGEBece4ZOPD+mNDup/Pra5mQwDeJHwbiWJiUXA1YEeyXH 3cv2phTyHycB6TvHu7OSaqxhbiEbGeABJIBQM3X5aMrsmEBRDV5+ZRf0fqPSYKyRzYdt k+gKfEZDAHvSJFBDnvjGN/FWwks9kGRRwWgls= 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=+yqRA+26HqvULi4zy92VgoIE5p2ZHBSHbshQdiLYU6M=; b=C5PgcbLSzwZwxKYZij3U6G+PgRHLwD6cQs9dQPInw1dMGgJt3ZkIZv6npTbjNgPmfh 9z6RDw/JaisVAWmJSWXwtmeQCLi5cN8if+5CB3W/pDo6WFswnfMGAKXvkkuw35AAmZAz ms/2ITccoWMF9Mw40Y4LVQCPaRvQ0nOVyZMbNdZp6IW2p8T5KJAjQAfRdgeUkTjqIxX9 tnawL5rvblG7uc9tJ3520RLxFmcLGbD6/JnvtjjUZWTI7fUHhyYriDFnYdZi5/KrdJVn PV5HBHLmUcFYvZgWBIdFfM7Zp17nS1SPRC30IIDPPwWw4NNYwJC9C/OtDAa/JN9MN1Lt UsYw== X-Gm-Message-State: ALyK8tIS3nKtOzzBXhAO1kOCimRjMAXx/df8jHKAEMpFhQVxmvKiBuSXiqYuodW4XcHwMcr8 X-Received: by 10.98.40.4 with SMTP id o4mr23135129pfo.165.1466445654193; Mon, 20 Jun 2016 11:00:54 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id c189sm60250353pfg.19.2016.06.20.11.00.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 11:00:53 -0700 (PDT) From: Douglas Anderson To: ulf.hansson@linaro.org, Heiko Stuebner Subject: [PATCH v3 13/15] phy: rockchip-emmc: Minor code cleanup in rockchip_emmc_phy_power_on/off() Date: Mon, 20 Jun 2016 10:56:52 -0700 Message-Id: <1466445414-11974-14-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1466445414-11974-1-git-send-email-dianders@chromium.org> References: <1466445414-11974-1-git-send-email-dianders@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_140115_409512_0E321B9E X-CRM114-Status: GOOD ( 13.50 ) 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: Douglas Anderson , 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, kishon@ti.com, linux-rockchip@lists.infradead.org, robh+dt@kernel.org, groeck@chromium.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 Acked-by: Kishon Vijay Abraham I Reviewed-by: Shawn Lin Tested-by: Heiko Stuebner --- Changes in v3: - Add collected tags Changes in v2: - Move code cleanup before set phyctrl_frqsel based on card clock (Shawn) drivers/phy/phy-rockchip-emmc.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/phy/phy-rockchip-emmc.c b/drivers/phy/phy-rockchip-emmc.c index 2d059c046978..23fe50864526 100644 --- a/drivers/phy/phy-rockchip-emmc.c +++ b/drivers/phy/phy-rockchip-emmc.c @@ -169,20 +169,14 @@ static int rockchip_emmc_phy_power(struct rockchip_emmc_phy *rk_phy, static int rockchip_emmc_phy_power_off(struct phy *phy) { struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); - int ret = 0; /* Power down emmc phy analog blocks */ - ret = rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF); - if (ret) - return ret; - - return 0; + return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_OFF); } static int rockchip_emmc_phy_power_on(struct phy *phy) { struct rockchip_emmc_phy *rk_phy = phy_get_drvdata(phy); - int ret = 0; /* DLL operation: 200 MHz */ regmap_write(rk_phy->reg_base, @@ -213,11 +207,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(rk_phy, PHYCTRL_PDB_PWR_ON); - if (ret) - return ret; - - return 0; + return rockchip_emmc_phy_power(rk_phy, PHYCTRL_PDB_PWR_ON); } static const struct phy_ops ops = {