From nobody Tue Dec 30 15:15:15 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 32D10C4332F for ; Tue, 14 Nov 2023 11:34:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232566AbjKNLeU (ORCPT ); Tue, 14 Nov 2023 06:34:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40500 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231991AbjKNLeN (ORCPT ); Tue, 14 Nov 2023 06:34:13 -0500 Received: from 1.mo576.mail-out.ovh.net (1.mo576.mail-out.ovh.net [178.33.251.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA2E1192 for ; Tue, 14 Nov 2023 03:34:08 -0800 (PST) Received: from director6.ghost.mail-out.ovh.net (unknown [10.108.1.93]) by mo576.mail-out.ovh.net (Postfix) with ESMTP id AA1BE2E21F for ; Tue, 14 Nov 2023 11:34:06 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-b2n22 (unknown [10.110.103.249]) by director6.ghost.mail-out.ovh.net (Postfix) with ESMTPS id C796C1FD91; Tue, 14 Nov 2023 11:34:03 +0000 (UTC) Received: from foxhound.fi ([37.59.142.106]) by ghost-submission-6684bf9d7b-b2n22 with ESMTPSA id zqp4KytbU2UpiAAAZEbziQ (envelope-from ); Tue, 14 Nov 2023 11:34:03 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-106R006f8a2c5f3-9a69-4238-9eb7-c409d0b8b06f, 39B655737E19CE8DAD14488E69459E8CEBC9C448) smtp.auth=jose.pekkarinen@foxhound.fi X-OVh-ClientIp: 83.100.46.156 From: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= To: harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, skhan@linuxfoundation.org Cc: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= , airlied@gmail.com, daniel@ffwll.ch, Qingqing.Zhuo@amd.com, charlene.liu@amd.com, stylon.wang@amd.com, yang.lee@linux.alibaba.com, daniel.miess@amd.com, colin.i.king@gmail.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linux.dev Subject: [PATCH] drm/amd/display: fix ptr comparison to 0 Date: Tue, 14 Nov 2023 13:33:56 +0200 Message-Id: <20231114113356.127779-1-jose.pekkarinen@foxhound.fi> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 6570188909338076865 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedrudefvddgvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomheplfhoshorucfrvghkkhgrrhhinhgvnhcuoehjohhsvgdrphgvkhhkrghrihhnvghnsehfohighhhouhhnugdrfhhiqeenucggtffrrghtthgvrhhnpeeftdelueetieetvdettdetueeivedujeefffdvteefkeelhefhleelfeetteejjeenucfkphepuddvjedrtddrtddruddpkeefrddutddtrdegiedrudehiedpfeejrdehledrudegvddruddtieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehjohhsvgdrphgvkhhkrghrihhnvghnsehfohighhhouhhnugdrfhhiqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdpoffvtefjohhsthepmhhoheejiedpmhhouggvpehsmhhtphhouhht Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch will address the following coccinelle warning where a pointer is compared to 0 instead of NULL. drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c:5423:19-20: WARNING= comparing pointer to 0 Fixes: 7966f319c66d9 ("drm/amd/display: Introduce DML2") Signed-off-by: Jos=C3=A9 Pekkarinen --- drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c b/driv= ers/gpu/drm/amd/display/dc/dml2/display_mode_core.c index 510be909cd75..7dceaa486841 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c +++ b/drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c @@ -5420,7 +5420,7 @@ static void CalculateOutputLink( *OutBpp =3D TruncToValidBPP((1 - Downspreading / 100) * 13500, Output= LinkDPLanes, HTotal, HActive, PixelClockBackEnd, ForcedOutputLinkBPP, LinkD= SCEnable, Output, OutputFormat, DSCInputBitPerComponent, NumberOfDSCSlices, (dml= _uint_t)AudioSampleRate, AudioSampleLayout, ODMModeNoDSC, ODMModeDSC, Requi= redSlots); =20 - if (OutBpp =3D=3D 0 && PHYCLKD32PerState < 20000 / 32 && DSCEnable = =3D=3D dml_dsc_enable_if_necessary && ForcedOutputLinkBPP =3D=3D 0) { + if (OutBpp =3D=3D NULL && PHYCLKD32PerState < 20000 / 32 && DSCEnable= =3D=3D dml_dsc_enable_if_necessary && ForcedOutputLinkBPP =3D=3D 0) { *RequiresDSC =3D true; LinkDSCEnable =3D true; *OutBpp =3D TruncToValidBPP((1 - Downspreading / 100) * 13500, Outpu= tLinkDPLanes, HTotal, HActive, PixelClockBackEnd, ForcedOutputLinkBPP, Link= DSCEnable, Output, --=20 2.39.2