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: 168925 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp633336ilk; Fri, 12 Jul 2019 02:40:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV0cMS4tO0SKtUOllmvoDxgCTp0FeJueWjLxhr4ynNq0K5nrsmKTlm+bfAyfasl2jwvMAT X-Received: by 2002:a17:90a:ba93:: with SMTP id t19mr10336217pjr.139.1562924420475; Fri, 12 Jul 2019 02:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562924420; cv=none; d=google.com; s=arc-20160816; b=HqsGVVI9Rk2dmpTUs2WfEszcyoMKdzbFrcs4cB7/LuKAdGkXfhwQEcJ53l6jk4+2y4 ujaawrLSubLHh6slHtFgw6DzIFMLtcAJ5jK+pYmf2ogkwjyMmEmS1YvtBulvpikXVA9b AhX6+yr3V2mS9h1IaG/+f/HyW7s9RrlPSILHH/wUNTsY0o5R7L8Q1z+zpFFsVzx7+Q1x qHPjsxbuhCWDBZGF+KRXpVQtl6QQEXU8TflpGUmaKsZH0f22fnXnyZUBznMEFq6lkixC Pyuy5GLxFuh5rXUBPmC6KYPp8Yo6Mhiz6NuVvKGvAckQk3dyhB2Gru7sgn/xJ0sHSPkF B9fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=G8F7PqBsiLo5bGyIzx6TV3pQXiaJy1E/8e00OQXYpy8=; b=xnC9VnSYeSgZyV0LCHCNH7jKuT9xS4pdbkeIVTKaIR7qCfw7trlItvgGPbMBk990fL JTuyW8C5nmaAs/qoFOZEtTi00lt2KIdfn8bD/bSNZVDs/GFg7g8la1ACI1kv8G1COGZa EJxeK+ccxX7BCCekWTmu8Li9XKaQAIv5BTsUuUyryTkWjNfCRNY0yrObsrrcWGhC99+n IZLu7rB1Rl1S4KgUXEn7dO5yVwgB2U9sHw1Ow+CZYuQAVUdPVCM52OCCnTdKPdxLjxuz 7eWNNeJw4yCANQ0yKjSXQHPZbkBFoEXizbbl97wSoVjZ6pUf0rthuAqGpOcVDH4IV0SD jrCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id u185si7628191pgd.561.2019.07.12.02.40.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Jul 2019 02:40:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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=B6?= =?utf-8?q?nig?= , "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-Spam-Flag: NO 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" 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 --- 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;