Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp488045pxb; Thu, 30 Sep 2021 10:12:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9ZNwSsrn1UueJAtRSlBHfzAWfMgkBRSS8rCp79m7PmCsDgS0/buC8GqHVp3+4uAgU4oNp X-Received: by 2002:a17:906:ce24:: with SMTP id sd4mr361938ejb.315.1633021939190; Thu, 30 Sep 2021 10:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633021939; cv=none; d=google.com; s=arc-20160816; b=ZzbWB7UOVJg3ijBs9QcvRKW2w6vhprGh2oSmgT7yT7lm1aN4rqGluWl5W1nvq/xL39 lo/jcwN9e19cZvpi54A0QRxLwu+du1fo2rPI8z+PY1V5gXltPZR00UHduh9//kPbbAjO IKmxl2CZm/g2NScBOrqgKX3TiX+i5JwrJhe2iL0EpfmT7sbXJc5A8qaEwY4vVTdQKz41 oJaW/BwRTQ7s1Xxh7dK7o2WVVJmjjnFpnDDgYdGAfp3yqBWYtLhj/2qGCLzwFbp9whcx AI3wsmApTT3VKznsK32Er/682iIJTM3lT4TAnE1tHcujRUyvLUJsZcSPkoaN5W5//SFV TxWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yQogwYZrvFu5Jfwlkrcfq3WvY8WdwXPWkmnjzSEdhJA=; b=SJHWK40Psl2W+NEFnUlnth1RX5Ou8VSBSztlDzeJrFwZ88MhfqS6R0VDyTitWLdf+8 RggP9CE7X8m17OwkC9lemLXlT5crsJSFntdxl08hls3j4iVGBxuy9Tlxh9Fu3xIi4gBB dMPWCij86Ve8gHlHn6NyC+0NUuZNm3bT54uTOIUncKmFFm1v+EP/hSWxoUQ9dwZUpGbs mGSYk0/JxhH3dfVRgdVMTdz55YtJC9zv06EluCX7rMwic/MDwWcwhdWSyPgdYE2wiqhd kZImyhEstKNgaUXfXY943tGYz4ry9tWmPczSs38d8tZ9Bn+JO5ayzBqMeUyBO+/WVpkO oedA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BnTi5yVX; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si3874337edv.43.2021.09.30.10.11.30; Thu, 30 Sep 2021 10:12:19 -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=@gmail.com header.s=20210112 header.b=BnTi5yVX; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349693AbhI3RLo (ORCPT + 99 others); Thu, 30 Sep 2021 13:11:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344773AbhI3RLn (ORCPT ); Thu, 30 Sep 2021 13:11:43 -0400 Received: from mail-oi1-x22a.google.com (mail-oi1-x22a.google.com [IPv6:2607:f8b0:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21B34C06176A for ; Thu, 30 Sep 2021 10:10:01 -0700 (PDT) Received: by mail-oi1-x22a.google.com with SMTP id 24so8236374oix.0 for ; Thu, 30 Sep 2021 10:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yQogwYZrvFu5Jfwlkrcfq3WvY8WdwXPWkmnjzSEdhJA=; b=BnTi5yVXAfDjmWTBRPXF8NGo1YE+5AZtAQsVeFujbgn52DpBNG/u8BQCEA6yTZObMG wehpKbgoGdQ9/QTuH+G5l39mHnrCNXaZC3HRFNjQuNBadU1z9yvSWHC06Gx7uhyZHMFc mib9yjTtb6lr7ZhK1la1hOWvhyIRII+nMOl9PVfm9aUTXNvmW0hANEbfugTvEBEmSatI xaTq4+hIWVdNRE4a/lKOUOeV8VynnBZxyRIZFtxa6m7GTlSsM8qRTDLXcILWujx6ipOb JRUqVVydfpl1D/YwKGad+pUGCOBKPdk/EgzL3PB30/ZwSzU2g7QUYKe9HVgDJt3wcLmo BDHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yQogwYZrvFu5Jfwlkrcfq3WvY8WdwXPWkmnjzSEdhJA=; b=s7zMmeZIyW9m9A7euH768pQhp1Aq5FmG8zY+2uJgY31qjoC0luUpDgHIUuzmonOTmC 8AI8QjLIyA0pcnLO9a91koooyuB52qOBRWjuDtDzyQ71Dk84U+nY2xap9OWgtzJwqtOm FLs6Y4up621Vj0X2s7gmjqrxg8c5vDspE9KU7byENoPKAlKCXt2mXO8CBZz78uacelqE LDd160sy9rKWH6EZ9g+4xCVFRuSoiAW85LoQRYoThPMWC1UT1YeISUMnMo5JVHeVPQzj gN//QS60eBMngdnDdI6Ocnf4ooc7LawbvJWlEXoVPKobjIT4+Ru7lLyPb7H+7dN9b/cE SnwQ== X-Gm-Message-State: AOAM531TeDWTKdbeNBBFfr44lIvj3XQz8QBaMMm12B7jZk99lhom3Gb/ +Tgx7XMkfOOk1fSaa8BwwufabD7jK99C2oZf2E4= X-Received: by 2002:aca:706:: with SMTP id 6mr283505oih.5.1633021800478; Thu, 30 Sep 2021 10:10:00 -0700 (PDT) MIME-Version: 1.0 References: <20210930162302.2344542-1-nathan@kernel.org> In-Reply-To: <20210930162302.2344542-1-nathan@kernel.org> From: Alex Deucher Date: Thu, 30 Sep 2021 13:09:49 -0400 Message-ID: Subject: Re: [PATCH] drm/amd: Return NULL instead of false in dcn201_acquire_idle_pipe_for_layer() To: Nathan Chancellor Cc: Harry Wentland , Leo Li , Alex Deucher , =?UTF-8?Q?Christian_K=C3=B6nig?= , "Pan, Xinhui" , Nick Desaulniers , amd-gfx list , Maling list - DRI developers , LKML , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied. Thanks! Alex On Thu, Sep 30, 2021 at 12:23 PM Nathan Chancellor wrote: > > 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 >