From patchwork Tue Dec 12 11:20:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10106715 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 38A35602B3 for ; Tue, 12 Dec 2017 11:21:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E58129B6F for ; Tue, 12 Dec 2017 11:21:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1305B29B7F; Tue, 12 Dec 2017 11:21:20 +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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5FD4029B7D for ; Tue, 12 Dec 2017 11:21:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E31226E1F5; Tue, 12 Dec 2017 11:21:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id B86FA6E1F5 for ; Tue, 12 Dec 2017 11:21:14 +0000 (UTC) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20171212112107epoutp02bdf60f29983bb62f9fa28660d510746c~-iB8xY5Qq2716927169epoutp02y; Tue, 12 Dec 2017 11:21:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20171212112107epoutp02bdf60f29983bb62f9fa28660d510746c~-iB8xY5Qq2716927169epoutp02y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1513077667; bh=J5wg6+lTENaMgmT2UGT+XxE+vKdPQn8AXiPZY7NkBEg=; h=From:To:Cc:Subject:Date:References:From; b=WrjwnAO7fQKwYVCQL7ZaTAHMepBnitEW096Js23H7dlBkdRDVb18xOJJaYBLkWhhq Ak5VdK7g8ZQXn2ijddecRzBCYMFoKw/u0tzJ2sZ4WrL4csIxBSUHRL8QMpDQ6kpcqp QQ2xVKSiSsrVQzGsF97CUZeyfzxg4GaoQNMYwqQU= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20171212112107epcas1p40c374f895fd770ff4ad958762f57f509~-iB8kynRW2131821318epcas1p41; Tue, 12 Dec 2017 11:21:07 +0000 (GMT) Received: from epcas1p4.samsung.com ( [182.195.41.48]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 6F.25.04317.3ABBF2A5; Tue, 12 Dec 2017 20:21:07 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20171212112106epcas1p27964954fbcc2622be9a81bd7efa31d37~-iB8WBpBi0807108071epcas1p2X; Tue, 12 Dec 2017 11:21:06 +0000 (GMT) X-AuditID: b6c32a39-e27ff700000010dd-44-5a2fbba311da Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E2.34.04148.2ABBF2A5; Tue, 12 Dec 2017 20:21:06 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P0U009NFI6SHB70@mmp2.samsung.com>; Tue, 12 Dec 2017 20:21:06 +0900 (KST) From: Sylwester Nawrocki To: a.hajda@samsung.com Subject: [PATCH] drm/bridge: analogix: Remove unreachable code from analogic_dp_core.c Date: Tue, 12 Dec 2017 12:20:37 +0100 Message-id: <20171212112037.13107-1-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.14.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLIsWRmVeSWpSXmKPExsWy7bCmge7i3fpRBhPPc1jcWneO1aL33Ekm i6aOt6wWV76+Z7P4fuMsm8XlXXPYLA6/aWd1YPe43NfL5LH92wNWj/vdx5k8/s7az+LRt2UV o8fnTXIBbFFcNimpOZllqUX6dglcGbePvWEsWMld8eL3c5YGxiucXYycHBICJhIvN21jBbGF BHYwSkw4qN7FyAVkf2eU+LX7PxNM0eMtD9ghEhsYJfY+b2aDcH4xSjz8dIkdpIpNwFCi92gf I4gtIiAusejcVCaQImaB7YwSnx7fASsSFoiQOH9+NQuIzSKgKtH0Yh7YCl4Ba4l1KyczQ6yT l3i/4D4jSLOEwE9WiRdPOtkhEi4Suxu2s0DYwhKvjm8BinMA2dISl47aQtT3M0qcWNMM1TyD UeJO+wSoJ6wlDh+/CPYpswCfxLuvPawQzbwSHW1CECUeEh/ewMx3lDj9ez8TJGBiJbZs3MQ4 gVFyASPDKkax1ILi3PTUYsMCU73ixNzi0rx0veT83E2M4EjUstzBeOyczyFGAQ5GJR7eDV16 UUKsiWXFlbmHGCU4mJVEeLub9KOEeFMSK6tSi/Lji0pzUosPMUpzsCiJ84quvxYhJJCeWJKa nZpakFoEk2Xi4JRqYGSt0thyuHbjpkMH3z6+kHLoufnnNdOLPFl1hbWWXFure0fw6mn2I7aF 9hM69C/49p6SPnVbX2tGsv1bq63//1vrPp/NV6M4VXrKupd8ZlX9q5WMAo7EXV5haSnjLrrt p5iKmsYy27YzFRMLmmdd5rF6wRJRo7o+kPl0/PT8gBVlKwVzd2t7eSixFGckGmoxFxUnAgDh lXpVwAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrFJMWRmVeSWpSXmKPExsVy+t9jQd1Fu/WjDBrnGFvcWneO1aL33Ekm i6aOt6wWV76+Z7P4fuMsm8XlXXPYLA6/aWd1YPe43NfL5LH92wNWj/vdx5k8/s7az+LRt2UV o8fnTXIBbFFcNimpOZllqUX6dglcGbePvWEsWMld8eL3c5YGxiucXYycHBICJhKPtzxg72Lk 4hASWMcocWR7DyuE84tR4vPjk6wgVWwChhK9R/sYQWwRAXGJReemMoEUMQtsZ5S4+mcbE0hC WCBC4vz51SwgNouAqkTTi3lgcV4Ba4l1KyczQ6yTl3i/4D7jBEauBYwMqxglUwuKc9Nzi40K DPNSy/WKE3OLS/PS9ZLzczcxAkNk22Gtvh2M95fEH2IU4GBU4uHd0KUXJcSaWFZcmXuIUYKD WUmEt7tJP0qINyWxsiq1KD++qDQntfgQozQHi5I47+28Y5FCAumJJanZqakFqUUwWSYOTqkG RumcTY5XAtMsshY3vLl0Yr+BY73QYauJkR/mZLxybWZPvxt7dMaXMxtlXcwuOHC0cfbdXHjz sfAWjmkdO65YKCVGF//ar8vALHRypm7C/A/iMZb9Bm1XQjfVG0W+NfY1ECneU7dx2anbmu32 qadlo2UOFOz7rxZ3dX/OWmaGk1trzryuDA+3UmIpzkg01GIuKk4EACw7eLoNAgAA X-CMS-MailID: 20171212112106epcas1p27964954fbcc2622be9a81bd7efa31d37 X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20171212112106epcas1p27964954fbcc2622be9a81bd7efa31d37 X-RootMTR: 20171212112106epcas1p27964954fbcc2622be9a81bd7efa31d37 References: Cc: airlied@linux.ie, jeffy.chen@rock-chips.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sylwester Nawrocki X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch removes an unreachable code found by the SVACE static analysis: UNREACHABLE_CODE: This statement in the source code might be unreachable during program execution. [unreachable] unreachable at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:787 retval != 0 is always false because at this program point the variable retval is always equal to 0 at drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:786 Signed-off-by: Sylwester Nawrocki --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 5dd3f1cd074a..263e8215b3de 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -727,7 +727,6 @@ static int analogix_dp_set_link_train(struct analogix_dp_device *dp, static int analogix_dp_config_video(struct analogix_dp_device *dp) { - int retval = 0; int timeout_loop = 0; int done_count = 0; @@ -783,10 +782,7 @@ static int analogix_dp_config_video(struct analogix_dp_device *dp) usleep_range(1000, 1001); } - if (retval != 0) - dev_err(dp->dev, "Video stream is not detected!\n"); - - return retval; + return 0; } static void analogix_dp_enable_scramble(struct analogix_dp_device *dp,