Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2334322rdf; Mon, 6 Nov 2023 10:56:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IESWLPvgJ7VqvNgSicK3rUSbQcxK4HwxoZ6AcM8f2t4bL1eEDLOmqAPHMyQXyNQTVOqxs7Y X-Received: by 2002:a17:903:2344:b0:1cc:5a74:b1df with SMTP id c4-20020a170903234400b001cc5a74b1dfmr25593457plh.2.1699296965390; Mon, 06 Nov 2023 10:56:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699296965; cv=none; d=google.com; s=arc-20160816; b=qqHAPEfcfsLTDueuOdAHxAtBER/LUd//+lNNuTyu4k+/+6LKOvb0F/2cYAOiIBhtaZ corOJpYsmdkDhvWfxSDw+AgIs0S+buNbjsF04w3qkoceWgYfQOU3QKWb6ohtX02fR5Nr g/AoeQo3kzXMAGtQX9k9umHFOejd5TA7BQYwXml2JGvXsNJKd69snBMmyYsy1labRAG0 GNfv/X3R+YTJUI3SI8lsa9qHxcQkhpqHyZUBUcedZIwR//kgf28EXbAUuWZ6NFYxqwK8 n/rrU/v5jtW9f8LT1elAixlT6iTTzgIrqOiReX7Ubgcl3rhcnN3WMz7bbz6FuQI9zKP7 z64g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zlsdHfJoSxj4C6+EWFlQXpykD0ggHxFHCNPoza6FO40=; fh=Xb1zoh9AhyNDG3q1Vy8iWavfIeF5KdaI0osP0X5SZ/k=; b=d1r3axEbMwMXW3wpoZrfhZWvsU5yZsD4eMIgAujY26lMP1y1CadIyfImmtxwGVRlKv 0PDMAm5qRebdPPvRlmENvQFBWZibXUQgl+HYWKz7EuqeRjx1fFlEPo4+fdaquLh8xxJ7 9UHm14mwfJulXSnNSJrJR0uZzA/IrgGy7EQ6Lu2L4Mf0oxzMydds8bjd3qtWGfLiqbA8 esf59jhX/bwJ3IUzOfN4Xh52nrU407VNnhZg2trSsAd8NTGQrel6iH5bn4eY8Og87HDk oPgL8lnruLasqwJlkkHpwo2bLmnkTnLeP3Jo73hNfXRrJf2DDr2gsjIf0rO9P54GmuWI R4XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JEGcXYXy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kb7-20020a170903338700b001cc08c9d692si7970529plb.559.2023.11.06.10.56.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 10:56:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JEGcXYXy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CA7C680774BE; Mon, 6 Nov 2023 10:56:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232271AbjKFSzw (ORCPT + 99 others); Mon, 6 Nov 2023 13:55:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231801AbjKFSzu (ORCPT ); Mon, 6 Nov 2023 13:55:50 -0500 Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 053DCA2 for ; Mon, 6 Nov 2023 10:55:48 -0800 (PST) Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3b5714439b3so2243813b6e.3 for ; Mon, 06 Nov 2023 10:55:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699296947; x=1699901747; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zlsdHfJoSxj4C6+EWFlQXpykD0ggHxFHCNPoza6FO40=; b=JEGcXYXyC4CScc6ZVrFZfPw3v2Ua+dUG1k89AoVlg9pCjHT9Eu1SYR8vDvl5K5skV4 5OfBi8W2OWMoTR0K3iZexKjr/jTviaGAnQn7QaaKKkl/HNn1Ne2A373UYXxhqfbMPAnL CX3m2yAOaJP5AqvWKZ9325igVybv8MMni7edKw4Z5AoGUY3KLVGgRyoXAjmNsOAv18Qk 2apf4OjyTMz3tPgeZPborCJDuMLa/78nfHQYutcwIq1O8OIkLmwfT0G7T7akqPPnbVVB Lv9kGcqez+dlD5leu12QzoE8VfcjMCbMIf2ywtmtPFkZIMg9K6/A6SOYxsEf7s1b987C guow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699296947; x=1699901747; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zlsdHfJoSxj4C6+EWFlQXpykD0ggHxFHCNPoza6FO40=; b=tpPjS/CuvNWzqANzPQJGuRJF+o1u1cpsIg85pWY9t8U+Cb3EGyyNMw14FwOlTN5ZO+ /cnfoVaDsKv3fEvajd2N1lcOA6oEoq1o4g2Dkv0QDwneSTklw8vmPUSTmhY08BAScM+o BveqnXHd00xVlMCmXjk/Q12RPV57DYnI75LwZneRonb4uJNIHI2AHEud3PGkpPxh5ndY PpOMjXVZ7lPsKI0L9LwOjqpbxKU7gsb3S/X8NQ8oKc4gYmABvgisQmkiIjG/X0emyokK CHnRDk6BEh/AmnzIfA2O3C4/pqBUqznnAeWxQm37d5j/yZ9Ud39kdHvnVC1Rxn8ZvjEp mFcw== X-Gm-Message-State: AOJu0YyQxskubzuHDTPDU0l54mpzx8YBjfVZO4r3qJvXqvUgZuY1Uxbm a8pK3LwXeipaSmwBPvFbvSdF8+j9d0Fy1IaYYoM= X-Received: by 2002:a05:6871:a002:b0:1e9:8885:b537 with SMTP id vp2-20020a056871a00200b001e98885b537mr555442oab.41.1699296947029; Mon, 06 Nov 2023 10:55:47 -0800 (PST) MIME-Version: 1.0 References: <20231103155013.332367-1-singhabhinav9051571833@gmail.com> In-Reply-To: <20231103155013.332367-1-singhabhinav9051571833@gmail.com> From: Alex Deucher Date: Mon, 6 Nov 2023 13:55:36 -0500 Message-ID: Subject: Re: [PATCH] drivers: gpu: Fix warning using plain integer as NULL To: Abhinav Singh Cc: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, linux-kernel-mentees@lists.linuxfoundation.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 06 Nov 2023 10:56:03 -0800 (PST) Applied. This matches what we already do in the other clear state headers. Alex On Fri, Nov 3, 2023 at 12:00=E2=80=AFPM Abhinav Singh wrote: > > sparse static analysis tools generate a warning with this message > "Using plain integer as NULL pointer". In this case this warning is > being shown because we are trying to intialize a pointer to NULL using > integer value 0. > > Signed-off-by: Abhinav Singh > --- > drivers/gpu/drm/radeon/clearstate_evergreen.h | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/radeon/clearstate_evergreen.h b/drivers/gpu/= drm/radeon/clearstate_evergreen.h > index 63a1ffbb3ced..3b645558f133 100644 > --- a/drivers/gpu/drm/radeon/clearstate_evergreen.h > +++ b/drivers/gpu/drm/radeon/clearstate_evergreen.h > @@ -1049,7 +1049,7 @@ static const struct cs_extent_def SECT_CONTEXT_defs= [] =3D > {SECT_CONTEXT_def_5, 0x0000a29e, 5 }, > {SECT_CONTEXT_def_6, 0x0000a2a5, 56 }, > {SECT_CONTEXT_def_7, 0x0000a2de, 290 }, > - { 0, 0, 0 } > + { NULL, 0, 0 } > }; > static const u32 SECT_CLEAR_def_1[] =3D > { > @@ -1060,7 +1060,7 @@ static const u32 SECT_CLEAR_def_1[] =3D > static const struct cs_extent_def SECT_CLEAR_defs[] =3D > { > {SECT_CLEAR_def_1, 0x0000ffc0, 3 }, > - { 0, 0, 0 } > + { NULL, 0, 0 } > }; > static const u32 SECT_CTRLCONST_def_1[] =3D > { > @@ -1070,11 +1070,11 @@ static const u32 SECT_CTRLCONST_def_1[] =3D > static const struct cs_extent_def SECT_CTRLCONST_defs[] =3D > { > {SECT_CTRLCONST_def_1, 0x0000f3fc, 2 }, > - { 0, 0, 0 } > + { NULL, 0, 0 } > }; > static const struct cs_section_def evergreen_cs_data[] =3D { > { SECT_CONTEXT_defs, SECT_CONTEXT }, > { SECT_CLEAR_defs, SECT_CLEAR }, > { SECT_CTRLCONST_defs, SECT_CTRLCONST }, > - { 0, SECT_NONE } > + { NULL, SECT_NONE } > }; > -- > 2.39.2 >