From nobody Thu Dec 18 19:11:26 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36493C83F01 for ; Wed, 30 Aug 2023 19:08:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239444AbjH3TIo (ORCPT ); Wed, 30 Aug 2023 15:08:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244815AbjH3OJT (ORCPT ); Wed, 30 Aug 2023 10:09:19 -0400 X-Greylist: delayed 411 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 30 Aug 2023 07:09:11 PDT Received: from forward205b.mail.yandex.net (forward205b.mail.yandex.net [178.154.239.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B418122 for ; Wed, 30 Aug 2023 07:09:11 -0700 (PDT) Received: from forward102b.mail.yandex.net (forward102b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d102]) by forward205b.mail.yandex.net (Yandex) with ESMTP id 19E0E69B3D for ; Wed, 30 Aug 2023 17:02:51 +0300 (MSK) Received: from mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net [IPv6:2a02:6b8:c0c:332f:0:640:4ab4:0]) by forward102b.mail.yandex.net (Yandex) with ESMTP id E46DD60058; Wed, 30 Aug 2023 17:02:17 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id G2SS5ILDSOs0-K05UNMia; Wed, 30 Aug 2023 17:02:17 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=itb.spb.ru; s=mail; t=1693404137; bh=4UuCYf2z5ERazgVTAra1HLGpzXEpox1UP/x9Vsz8zxY=; h=Message-Id:Date:Cc:Subject:To:From; b=qEiA2dnxfjTOmXj1MmyZwpY7734vhltXUdpITsPx4rEhCe7hqAVGl1NEvXOE14Y7D 6GEi4E0oTDexaCQv7HAB5GsalD798LJnUL4sq7BWgkrzpFWO0+feO1XvoOTjHXbJAY mq3pVuXQ3yesVGiumsFbtoqtKoisQqnqj3qSYDFQ= Authentication-Results: mail-nwsmtp-smtp-production-main-84.iva.yp-c.yandex.net; dkim=pass header.i=@itb.spb.ru From: Dembskiy Igor To: Alex Deucher Cc: Dembskiy Igor , Harry Wentland , Leo Li , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, hersen wu , Alexey Khoroshilov , lvc-project@linuxtesting.org Subject: [PATCH] drm/amd/display: remove useless check in should_enable_fbc() Date: Wed, 30 Aug 2023 17:01:03 +0300 Message-Id: <20230830140103.311752-1-dii@itb.spb.ru> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" It does not make sense to compare a pointer to array element with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 65d38262b3e8 ("drm/amd/display: fbc state could not reach while enab= le fbc") Signed-off-by: Dembskiy Igor Reviewed-by: Harry Wentland --- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/= drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c index 6966420dfbac..e87cf54ec658 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c @@ -1992,9 +1992,6 @@ static bool should_enable_fbc(struct dc *dc, =20 pipe_ctx =3D &res_ctx->pipe_ctx[i]; =20 - if (!pipe_ctx) - continue; - /* fbc not applicable on underlay pipe */ if (pipe_ctx->pipe_idx !=3D underlay_idx) { *pipe_idx =3D i; --=20 2.34.1