From patchwork Mon Sep 5 13:38:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 75408 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp84473qgf; Mon, 5 Sep 2016 06:52:26 -0700 (PDT) X-Received: by 10.28.156.144 with SMTP id f138mr10187120wme.86.1473083546110; Mon, 05 Sep 2016 06:52:26 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id tg15si24986085wjb.292.2016.09.05.06.52.25; Mon, 05 Sep 2016 06:52:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 35F80A7564; Mon, 5 Sep 2016 15:52:25 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pxLA3xLd2QHS; Mon, 5 Sep 2016 15:52:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C943D4B99D; Mon, 5 Sep 2016 15:49:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E87DB4B656 for ; Mon, 5 Sep 2016 15:38:50 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XwRwHcCClkEk for ; Mon, 5 Sep 2016 15:38:50 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id F3F604B71E for ; Mon, 5 Sep 2016 15:38:35 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u85DbUXP023684; Mon, 5 Sep 2016 22:37:34 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u85DbUXP023684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473082655; bh=Jb3JiGBqmhjQhBZyeRPjM/gYAVxwPu5W3q6PryinKSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cEuB3i9AocYO13D/V6SGoVzVUZSMxSWQ0cs1rt/AnTvVNXNsa534+DOCZ4RZKceqF HMDRsp+YG5Mcp6U9jHgzaVhz4jB+H+E1Z1GDfOz79zf17E6yBnVjLQuS+GK9ezYp/p GOZ9g2idxMPd1bxXLZDOHRjQ0XJlWLOm52j3i4IggoOOjHWRl5xVrHF4myBA01IK2w uZ9mQlCycBfyP4TWuGEmGPr2O3FT0BwHHDS2BNrh6jfwwbL4Gw5zASy5v/RO4MYXsC PgE2FZ0dAsfPpKCoefFFo4HMrewPGlB8ZR/T1NeR//L2jpio5kMezosPRNvMAW0O0E vvvHM5Z28iH4A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 5 Sep 2016 22:38:39 +0900 Message-Id: <1473082723-17048-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1473082723-17048-1-git-send-email-yamada.masahiro@socionext.com> References: <1473082723-17048-1-git-send-email-yamada.masahiro@socionext.com> Cc: Marek Vasut , Stephen Warren , Stefan Agner , Stefan Roese Subject: [U-Boot] [PATCH v2 3/7] usb: squash lines for immediate return X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" ehci_*_remove() is just a wrapper of ehci_deregister(). xhci_fsl_remove() can be simpler as well. Signed-off-by: Masahiro Yamada --- drivers/usb/host/ehci-atmel.c | 8 +------- drivers/usb/host/ehci-fsl.c | 8 +------- drivers/usb/host/ehci-marvell.c | 8 +------- drivers/usb/host/ehci-mx6.c | 8 +------- drivers/usb/host/ehci-pci.c | 8 +------- drivers/usb/host/ehci-zynq.c | 8 +------- drivers/usb/host/xhci-fsl.c | 7 +------ 7 files changed, 7 insertions(+), 48 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index d65bbe9..cd460a2 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -130,13 +130,7 @@ static int ehci_atmel_probe(struct udevice *dev) static int ehci_atmel_remove(struct udevice *dev) { - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; + return ehci_deregister(dev); } static const struct udevice_id ehci_usb_ids[] = { diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index f5e3ae7..fb65480 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -120,13 +120,7 @@ static int ehci_fsl_probe(struct udevice *dev) static int ehci_fsl_remove(struct udevice *dev) { - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; + return ehci_deregister(dev); } static const struct udevice_id ehci_usb_ids[] = { diff --git a/drivers/usb/host/ehci-marvell.c b/drivers/usb/host/ehci-marvell.c index 5b0f46a..2ecf282 100644 --- a/drivers/usb/host/ehci-marvell.c +++ b/drivers/usb/host/ehci-marvell.c @@ -96,13 +96,7 @@ static int ehci_mvebu_probe(struct udevice *dev) static int ehci_mvebu_remove(struct udevice *dev) { - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; + return ehci_deregister(dev); } static const struct udevice_id ehci_usb_ids[] = { diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c index 602fec5..a785bb8 100644 --- a/drivers/usb/host/ehci-mx6.c +++ b/drivers/usb/host/ehci-mx6.c @@ -453,13 +453,7 @@ static int ehci_usb_probe(struct udevice *dev) static int ehci_usb_remove(struct udevice *dev) { - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; + return ehci_deregister(dev); } static const struct udevice_id mx6_usb_ids[] = { diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c index f21a1fa..2228f91 100644 --- a/drivers/usb/host/ehci-pci.c +++ b/drivers/usb/host/ehci-pci.c @@ -128,13 +128,7 @@ static int ehci_pci_probe(struct udevice *dev) static int ehci_pci_remove(struct udevice *dev) { - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; + return ehci_deregister(dev); } static const struct udevice_id ehci_pci_ids[] = { diff --git a/drivers/usb/host/ehci-zynq.c b/drivers/usb/host/ehci-zynq.c index 76642cd..1fe00bfe 100644 --- a/drivers/usb/host/ehci-zynq.c +++ b/drivers/usb/host/ehci-zynq.c @@ -75,13 +75,7 @@ static int ehci_zynq_probe(struct udevice *dev) static int ehci_zynq_remove(struct udevice *dev) { - int ret; - - ret = ehci_deregister(dev); - if (ret) - return ret; - - return 0; + return ehci_deregister(dev); } static const struct udevice_id ehci_zynq_ids[] = { diff --git a/drivers/usb/host/xhci-fsl.c b/drivers/usb/host/xhci-fsl.c index bdcd4f1..6ff450c 100644 --- a/drivers/usb/host/xhci-fsl.c +++ b/drivers/usb/host/xhci-fsl.c @@ -129,15 +129,10 @@ static int xhci_fsl_probe(struct udevice *dev) static int xhci_fsl_remove(struct udevice *dev) { struct xhci_fsl_priv *priv = dev_get_priv(dev); - int ret; fsl_xhci_core_exit(&priv->ctx); - ret = xhci_deregister(dev); - if (ret) - return ret; - - return 0; + return xhci_deregister(dev); } static const struct udevice_id xhci_usb_ids[] = {