Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2416449rdf; Mon, 6 Nov 2023 13:37:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGFqBKTtjAJRmPWJH8n/KmOppMOKtkee3VfONzrl8PrPCNVXyIu7NVhy9kCNY59uHkagajn X-Received: by 2002:a05:6870:3c09:b0:1ea:d8bb:411a with SMTP id gk9-20020a0568703c0900b001ead8bb411amr1253266oab.6.1699306665195; Mon, 06 Nov 2023 13:37:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699306665; cv=none; d=google.com; s=arc-20160816; b=QGoT3w+VXCu9dUUWZGLZC92mPiryEj2sgVUEvmtGDo0HV3qKTANv50OahwN/berWKm cmxdRgX7uaq+yjzqBCltJa+QShjbDCcAreyKPhH3ppFRVEhfeWTNCqF7Ky/zwyWfmRYU iE8MfBNwnG48WEb9+vHs6aeqxFiNvwWxCB+1du7b7YrqG1Jfl0rldi/5jbouOnNufkKQ 6lOh51vSeqqtkbgW3AfpUkrNtuTWxFlD61K0ltKwU4grH9q9dj9B0GSLf/J1RUS50A09 bHiP8riq+G8ka/MQPWilwPbqXukB6lTdCtzve5UjPlhcQmtqNz8Yo5auNUnY3TXv5P4F zmWw== 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=OphoK9q7a6dBe49RqxvB+ZhnnNOavYr9X32u348/Dmw=; fh=Xb1zoh9AhyNDG3q1Vy8iWavfIeF5KdaI0osP0X5SZ/k=; b=dJKcmgfI+dR5rbTNcdOf7uity8xEmP+4/m1U5ST+Jk4IQJRV9RraIztNCySo8CApYo jcA8gYd4htHGd0YO7YF6gbyYp0JsaYB1QaEBo5+4dm43Jj1CAq6dz7TNPScnMGqJn0jg N1APq+JL6GFmX93uUame+kNQhy9YQmll+Cro7eGC/YAgn7TFwgN7+WWSvvCWaaygoDen RGYVp1QGuasb0jimgAUVFRLnW+UifPUH4ZUEFgvK8w9Cc08hqU7pQ25qgUytmNZKq0wu +3uBFNEZH3CLomBry18InKcMmtooBJYMB3rkKmVUdnfWC2CDRoBRBYnaK+KBw2ZwHNWH K1HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VGFfeDjr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id n189-20020a6327c6000000b00577f4d85fdbsi577953pgn.548.2023.11.06.13.37.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 13:37:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=VGFfeDjr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 874238048E63; Mon, 6 Nov 2023 13:37:42 -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 S233151AbjKFVhc (ORCPT + 99 others); Mon, 6 Nov 2023 16:37:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233156AbjKFVhb (ORCPT ); Mon, 6 Nov 2023 16:37:31 -0500 Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A198D57 for ; Mon, 6 Nov 2023 13:37:28 -0800 (PST) Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-1f055438492so2734780fac.3 for ; Mon, 06 Nov 2023 13:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699306646; x=1699911446; 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=OphoK9q7a6dBe49RqxvB+ZhnnNOavYr9X32u348/Dmw=; b=VGFfeDjrbXEI1xXu64l0H1RKcVFmuJ1caKRQYgQwREIbf4VowDWZy/JDSJBqPkdVSJ tFw9ityfJ5/Xutnjy+vw5c/uj5I+u2z+qASmwHYrWgecywXOurlWo7qED/ionxb7S/+x opLHGGKK4aGHQDaeYoDraqtoStdre6x33lvVHgFW3N3Bt1y+osGf6bIt6UovkHGqYCSW 4ULurTpJXP48+cipwWeDb6R9bjM4ErQXeHnkkj1UkITASBTv5ee7mlY2DRWGB+TN5AI2 hXsE+f99pO5leDs9Csc940FvRcaNletnE+NtaRjPxuRNVHw5QUCBsGAzlnzBx8qoS8Vf MRPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699306646; x=1699911446; 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=OphoK9q7a6dBe49RqxvB+ZhnnNOavYr9X32u348/Dmw=; b=wci0y4jdE1737n2QgOqeWEvSuksOvEYG32GCmhAqEbW2ihxAPXo3+k/WujN5GeoDpr MiO1ff1slAlDHcmo+n38hcvDSJW7JWRe8ZUnzO0klBxsPwQ3EM8FxAX5G5lfRXXm323B ml9ASVXBrcaQOmpSjiTA+ZBJNsSM2Hn6201pT+O4ufrjGQSxsDlx5MAiDX1RNh38ISgp aLGJrc4275Efa455X7bhxIgWYp8tq1IHfp4rTcxQuHnFZZ3RX0LbD8EDU1pf94XmpA7z G8JeiBnmHoyy7L3xrGpM9nagL0f/VNwseliryDnsmndXQ+A2LJTCgJ6u+fdxHc8Ww7QJ N0iA== X-Gm-Message-State: AOJu0YxUPc6hUOjImSWDNWwRcGxthIMum0SnSNkd6KXBIGaeFWSO8lZo tlqG2HB/gLoV7XxnKGf6EOkY5CZAn8oHp0jxWZM= X-Received: by 2002:a05:6871:339e:b0:1e9:b0fa:de48 with SMTP id ng30-20020a056871339e00b001e9b0fade48mr1089412oac.47.1699306645891; Mon, 06 Nov 2023 13:37:25 -0800 (PST) MIME-Version: 1.0 References: <20231103155013.332367-1-singhabhinav9051571833@gmail.com> <3b92b89b-ca72-4012-b4f2-0b19e4ba9153@gmail.com> In-Reply-To: <3b92b89b-ca72-4012-b4f2-0b19e4ba9153@gmail.com> From: Alex Deucher Date: Mon, 6 Nov 2023 16:37:14 -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 13:37:42 -0800 (PST) On Mon, Nov 6, 2023 at 4:20=E2=80=AFPM Abhinav Singh wrote: > > On 11/7/23 00:25, Alex Deucher wrote: > > Applied. This matches what we already do in the other clear state head= ers. > > > > 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/g= pu/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_d= efs[] =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 > >> > Hi Alex, thanks for looking into this. By applied you mean this patch is > accepted and it has been merged? Yes. Once it makes it through our CI system, it will show up in my drm-next tree. Alex