From patchwork Mon Sep 5 13:38:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 75406 Delivered-To: patch@linaro.org Received: by 10.140.106.11 with SMTP id d11csp83086qgf; Mon, 5 Sep 2016 06:48:33 -0700 (PDT) X-Received: by 10.28.87.14 with SMTP id l14mr14869898wmb.71.1473083313187; Mon, 05 Sep 2016 06:48:33 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id t187si17494413wma.147.2016.09.05.06.48.32; Mon, 05 Sep 2016 06:48:33 -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 45D84A752D; Mon, 5 Sep 2016 15:48:21 +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 MQKdM6j0SrRp; Mon, 5 Sep 2016 15:48:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CFC5F4B98B; Mon, 5 Sep 2016 15:47:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BC094B979 for ; Mon, 5 Sep 2016 15:38:21 +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 yjHzWlWyd4qN for ; Mon, 5 Sep 2016 15:38:11 +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 1FA114B9AD for ; Mon, 5 Sep 2016 15:38:09 +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 u85DbUXO023684; Mon, 5 Sep 2016 22:37:33 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u85DbUXO023684 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1473082653; bh=nzxSJrRCCAEKwYy0Qrj3LitvpsFySRJbjn5dI805MYk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tQPEQXQ6tM3TVPyZPD6L01mjIDLaXO7Dirq9QA+jSh/p6QBkEX+XpqMbJnaa4xwnn i6oggP9ysaSf+lgpenRdx1BMe1PG9+uiSHe52HUAu2vt7mECY048ZcOh2NGl2RLDoM CbZ/jV2lJm/nMVdkYBtQvFYfwcpMylNV8dVl6+pL0+/fQfydbCg373405Uisd4Z16o ka8yd7eja1UcLG3G0AIBkwCWBcnf3erSDZ5SsbDAZY3oKSUw1kZQtEMOD6xRp8aiVV 7a9WtRcFnR+PZma6HWrv8HY0t4Kwva9CVjE9qHhK059D6ZqTHmtwo4m1UvDJSps+i8 qDCfGCohYj87w== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 5 Sep 2016 22:38:38 +0900 Message-Id: <1473082723-17048-3-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 , Tom Warren Subject: [U-Boot] [PATCH v2 2/7] video: 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" ptn3460_attach() and display_update_config_from_edid() will become a simple wrapper function. For vidconsole_post_probe(), it is common coding style to let a probe method return the value of a resister function. Signed-off-by: Masahiro Yamada --- drivers/video/bridge/ptn3460.c | 7 +------ drivers/video/tegra124/display.c | 8 +------- drivers/video/vidconsole-uclass.c | 6 +----- 3 files changed, 3 insertions(+), 18 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/video/bridge/ptn3460.c b/drivers/video/bridge/ptn3460.c index 2e2ae7c..f9d3720 100644 --- a/drivers/video/bridge/ptn3460.c +++ b/drivers/video/bridge/ptn3460.c @@ -11,14 +11,9 @@ static int ptn3460_attach(struct udevice *dev) { - int ret; - debug("%s: %s\n", __func__, dev->name); - ret = video_bridge_set_active(dev, true); - if (ret) - return ret; - return 0; + return video_bridge_set_active(dev, true); } struct video_bridge_ops ptn3460_ops = { diff --git a/drivers/video/tegra124/display.c b/drivers/video/tegra124/display.c index 2f1f0df..d8999c3 100644 --- a/drivers/video/tegra124/display.c +++ b/drivers/video/tegra124/display.c @@ -326,13 +326,7 @@ static int display_update_config_from_edid(struct udevice *dp_dev, int *panel_bppp, struct display_timing *timing) { - int ret; - - ret = display_read_timing(dp_dev, timing); - if (ret) - return ret; - - return 0; + return display_read_timing(dp_dev, timing); } static int display_init(struct udevice *dev, void *lcdbase, diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c index c8cc05e..e9a90b1 100644 --- a/drivers/video/vidconsole-uclass.c +++ b/drivers/video/vidconsole-uclass.c @@ -190,7 +190,6 @@ static int vidconsole_post_probe(struct udevice *dev) { struct vidconsole_priv *priv = dev_get_uclass_priv(dev); struct stdio_dev *sdev = &priv->sdev; - int ret; if (!priv->tab_width_frac) priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8; @@ -206,11 +205,8 @@ static int vidconsole_post_probe(struct udevice *dev) sdev->putc = vidconsole_putc; sdev->puts = vidconsole_puts; sdev->priv = dev; - ret = stdio_register(sdev); - if (ret) - return ret; - return 0; + return stdio_register(sdev); } UCLASS_DRIVER(vidconsole) = {