Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp452037pxb; Thu, 30 Sep 2021 09:26:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY4Uw7LmxGF7ebOcrUHgTAGYOposimVpYApkKC5gY8olZlOSeNEDUmOlrgAUeg0wFRG7qH X-Received: by 2002:a62:1717:0:b0:440:527f:6664 with SMTP id 23-20020a621717000000b00440527f6664mr5122086pfx.73.1633019199846; Thu, 30 Sep 2021 09:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633019199; cv=none; d=google.com; s=arc-20160816; b=v1NLXpGZLZgQYHwIpOtEfE1ecPMSb2CaafIL20C+CJ8XRhIVpxYpuSHt3b5Aj17lbW VGJJcZczu/cWOHJjn283Qii3aEQb6nkcre6YFF1xMmqt3C+hAiU4heSY058anA9m5vz3 yRkTf11Ev7tfRIRQaoAJyO/zEnUQBKxR3yr9UQEcbxOfT+fjQmKV6HfS4jEZyMUPi//i mBmC8Mh0qjEkb3O9oqQAbJl5FqXLthmMpVolGJ58ILXFU95hZM9NbLvJ7RpB5j2uOJTk SWQXEXfdap27GIvhbl2hP0CRL8xGdmWmrWNj/O075Fj/fS47kHRtOCHJg+xDv/pN3dlE IbgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MYlWrYJSRipx37VggZDKfl4CkPm2s63WSdSMR6UsoRk=; b=Qg19pTikSTLCk8ahRnaFRDQUL40+uZ7lZAeHeH0rkAXi6RzTcgQcLuMcLdmX4QS0hx LNSBykVnn6NqEOpHp82+I61ByHsCiH5AQrcK4kY1+256lrMSeeRXjrCN6u6ithn8Y/tX 5ztc+9f2SyLsSnEHeTnQmeWVd8VWOn2cNI9CyWsl9aBqiq7/9awjr3Vx8lWhQdu/fj50 cF7R/H1dMPdfqMhw4HJUc25TLhDuwNTkhYchPu+JBZgKmcAMg55mUf1sM1RG3YbkSBTQ vQxkdCK9lRMPmn3yhxnLQvKJ1Bm6f+IDvhvtJxVO+hNFjNDpQg4Jn0cYupJpxcjHkIyX o9LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t630z/tB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si4214481pgj.623.2021.09.30.09.26.26; Thu, 30 Sep 2021 09:26:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="t630z/tB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350259AbhI3QZc (ORCPT + 99 others); Thu, 30 Sep 2021 12:25:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:48604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349659AbhI3QZb (ORCPT ); Thu, 30 Sep 2021 12:25:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B0D3C61139; Thu, 30 Sep 2021 16:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633019028; bh=SFAuczdPhuuWJXLs0XfQ/hIiVtLdDPdd1uYoA5KobTw=; h=From:To:Cc:Subject:Date:From; b=t630z/tBR0JsvcDkaupuV6XlaWMEW+/eHqaJUiVwvD83oi7YkijX9RN+M1o+yJ5bG ziAJANnhmGQaXAlrigMwECfvl+E9hk/uV6sqO8EagLzYN60qIWNFQ93rdFJ2lds7Hj IssDWkkngoQgSVTzeAD3bej+vrLPM07TcDfCAQXipkOodUXqcr291Kb1ey0tMx/wJP f4ezOH2JT6+OFB/UnDhnrjrSQgVQYC+a8hsRKvcJfA84QvvxjTR2TNYM4no4CBPYgw xDjFVdXShUZSH8x1Wgs2bLHhMOZCPy/rcg1bBSPq+H+FOo4ZLPokMw28p6//9WZfMN C447b766TxUdQ== From: Nathan Chancellor To: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "Pan, Xinhui" Cc: Nick Desaulniers , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Nathan Chancellor Subject: [PATCH] drm/amd: Return NULL instead of false in dcn201_acquire_idle_pipe_for_layer() Date: Thu, 30 Sep 2021 09:23:03 -0700 Message-Id: <20210930162302.2344542-1-nathan@kernel.org> X-Mailer: git-send-email 2.33.0.591.gddb1055343 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_resource.c:1017: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; ^~~~~ 1 error generated. Use NULL instead of false since the function is returning a pointer rather than a boolean. Fixes: ff7e396f822f ("drm/amd/display: add cyan_skillfish display support") Link: https://github.com/ClangBuiltLinux/linux/issues/1470 Signed-off-by: Nathan Chancellor --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c index aec276e1db65..8523a048e6f6 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn201/dcn201_resource.c @@ -1014,7 +1014,7 @@ static struct pipe_ctx *dcn201_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; base-commit: b47b99e30cca8906753c83205e8c6179045dd725 -- 2.33.0.591.gddb1055343