From patchwork Fri Jul 12 09:39:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11041931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D93AB14C0 for ; Fri, 12 Jul 2019 09:40:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8DB028BEB for ; Fri, 12 Jul 2019 09:40:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD82928BF0; Fri, 12 Jul 2019 09:40: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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 6553E28BEB for ; Fri, 12 Jul 2019 09:40:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6828E6E334; Fri, 12 Jul 2019 09:40:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 486F76E334; Fri, 12 Jul 2019 09:40:17 +0000 (UTC) Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MwQCb-1ie6cI24qj-00sKbe; Fri, 12 Jul 2019 11:40:11 +0200 From: Arnd Bergmann To: Harry Wentland , Leo Li , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , Daniel Vetter Subject: [PATCH] drm/amd/display: return 'NULL' instead of 'false' from dcn20_acquire_idle_pipe_for_layer Date: Fri, 12 Jul 2019 11:39:52 +0200 Message-Id: <20190712094009.1535662-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:3cpkDgxIhIsadjRAYBvtn1DUyn+BUx4TJsnFE7RqYAa5qmUsTy6 ZFEWWtos2jSr8XJqGbISEDbpNjknjjyG9gOydIRFynjICGXMb1KjAkon8PG4aAb1JAjEzma AHDoJXR1FwIQHXXfZ6oorG8LKXZJrnCGniYroO08K5/hrWuUrJyWyfGGD6IbPMMiazMUfKK ewxOssRMv/wrh7Cmz9ZMQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:oRQbMjjvoFQ=:No9erCSCNWW+VJd/nxNhyr 6OIu1qjtUork6mvRXgF9CoyGhOzQGkOATDOd+8MhfahUOLpWn+L8svIDug83SSQ/7iAxMuSmx UrNw0VrqwduicMcLa+nRC8oH5lpP8V9RuBpXbsDJNeUIXyD8lhYApZQr7TCs4q5dn6C76CpC5 Gwyg4aMd/cRD2vQ40hhDjZicgD8qQZN++JKALp1vl0SDa2GqIOfJuyoLM/AxVaB9BsLdRxNaK CJdKCFxr2akRoHyPTMTqFffdefAE/NxJOwyLUjcplYD3jclo9o9pNZPorygWG8DnAfIwWcDXG J9R9bPanREK3s4gsxF4LYCrS6CLqyCF71J+3mG11TKA8oRJQXt/cFkUYW9KmDZap0y/dwgy9t T4NQSvQI9ZIYH8HAim4kYVHrDxeQVQrR0Bh64IWpOJLDJclJ5+nQAiAQPRiHr/lbxtuHAH2lh s5xpzuWjhVdhXQRzveJoMYS171SlizoNBgxs01FJSzvR5UWcaASBlmgkPYmTYRPmx1wUYamzE cKu++M6LrFPoQOxxLNx/bTbgdQB1WnxFM1IyEfqcYrloSdTtoIhNTCGaIZcsspJBuLclBNJvI m4DF+ruvt1dNq/hJa1h2QHFX3ww0+kI2F6mWmMR0YP+UHoUMbXCK37CLEFgwuNCmuU+1wZBbB ZuJhpWGiZ20xa0VH1MXAJ2eIfALilxi2CpFAYKbYq9HeYwWNoPg5VCDsJI9Ayyb3HX/+JaWuq skFB7ZWyVD61qKRx4CE6mJxDQGNEBrS8y3JB/w== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Charlene Liu , Arnd Bergmann , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, Nikola Cornij , clang-built-linux@googlegroups.com, Dmytro Laktyushkin , dri-devel@lists.freedesktop.org, Jun Lei , Bhawanpreet Lakha Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP clang complains that 'false' is a not a pointer: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:2428:10: error: expression which evaluates to zero treated as a null pointer constant of type 'struct pipe_ctx *' [-Werror,-Wnon-literal-null-conversion] return false; Changing it to 'NULL' looks like the right thing that will shut up the warning and make it easier to read, while not changing behavior. Fixes: 7ed4e6352c16 ("drm/amd/display: Add DCN2 HW Sequencer and Resource") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 70ac8a95d2db..66aa414ad38f 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -2425,7 +2425,7 @@ struct pipe_ctx *dcn20_acquire_idle_pipe_for_layer( ASSERT(0); if (!idle_pipe) - return false; + return NULL; idle_pipe->stream = head_pipe->stream; idle_pipe->stream_res.tg = head_pipe->stream_res.tg;