Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp577397rdf; Fri, 3 Nov 2023 08:51:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG0BKxO2eJ0U//FDizS9aqKx35fNoZ6P3GZ38iD0g6K46J/0tqBwD/o7zED6LjwO8MvCrUO X-Received: by 2002:a17:90a:1a51:b0:27d:4278:ba53 with SMTP id 17-20020a17090a1a5100b0027d4278ba53mr19508204pjl.47.1699026713615; Fri, 03 Nov 2023 08:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699026713; cv=none; d=google.com; s=arc-20160816; b=fwV9BtPVP6jIZv2atrvId56LtWpHMAaxs74JYv0IZymA0h8EBzxBJ1wbkgRVdLdbBD Oxj1NkADUhJvsnaRxSSuPCHQxEfRJu7oUMjJlt66ihcs9SAoZc8NjHBTq7DF20Gm4o81 M6Pm3MxPXTpM1L/7cPirTfJgBXiDm9pm7SY7EGhP5f5dAdz93w+tLOB5/Ioe1Khs8Pzb NyfPN79RjEWaIuV9hG6WNHQ7v3ewSwiFROAGV6WbHwhptRG+5PD4yBzzvGvARPKvDj4z JswtFjz8nSod6lcEREThyA8YcBdzLC8Oo3LdMQqQ1dNCem5j1oDcgbrnAiAANKkPgTWw 29gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UzPpHStW8fd1Sa/XvvRvmDs3ZUV3eU14pMhnuEaZyXo=; fh=PLpaYtTMlSMwbLJpWvBp43xl+nNEfhzfzc6AkGXhWEw=; b=fjqeGlbpQkPCdrV6Xr3wFs2uwBUUWj8PCwKTuyae3+9Gy0h9yi74W7uTQzsbAOBCpx m/4PFyInkAKw00r0EWpby3FwSfyTgF10H0RJ0940QvdPGzOEsm5Wh/cB2lBlYBoZduCY y+yYS9moO2wJqvBMVvPWe/GwlD8AW0iA+XnMAORJCN5JdlAEouhiSc6lwlAeeZ7by8F4 6EI7n+7oouy2pnVru6qHw3yLqbPJdPuPMgfK309KnuZ3fnr4am7S8HUArlcy6iv2zjBf WYygfDmc6q6ewUOdmXhmmIQbiarhEUAqh6+H/kp6unZKnajXop44VxG2eB644PbUpnzy RoUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cREISMtW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q8-20020a17090aa00800b0028053fade75si1837087pjp.131.2023.11.03.08.51.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 08:51:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cREISMtW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 3367E8063CC4; Fri, 3 Nov 2023 08:51:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343787AbjKCPue (ORCPT + 99 others); Fri, 3 Nov 2023 11:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbjKCPud (ORCPT ); Fri, 3 Nov 2023 11:50:33 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A420111 for ; Fri, 3 Nov 2023 08:50:29 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2800db61af7so569616a91.0 for ; Fri, 03 Nov 2023 08:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699026628; x=1699631428; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=UzPpHStW8fd1Sa/XvvRvmDs3ZUV3eU14pMhnuEaZyXo=; b=cREISMtWJKHXHFQztpIJTiakUSN3wCAbVIa17Q75U0wFlsvwzmR2vqY3IJ3lZZ7ruz Szw7J7+TH/3vcCn1wKK8f4TLBmUsqG+BB6RHSq74CTRv3yOcMRO2JH8RhH4GUxZka0WC hNSo1WbE7P6FyEdJtq0EYeNasSQJokcqB8c3PDZuy5R90e0bAFGqpesDb71jaDvJLrCB 8glIzc/0yFwNF7G4+/zFAHKbAGwNNt0EEURqcrlcBrgbmnYo61JxQvykgm50mLPlnUE6 qcJhiMk4vkp/JjC1isij5nePOwFRw64UGhcth4vAPlNQjyIimZBvIBOWAHGrNcEfBcH1 Y86g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699026628; x=1699631428; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UzPpHStW8fd1Sa/XvvRvmDs3ZUV3eU14pMhnuEaZyXo=; b=WnYDVWIzstFIRKJAqhulhG3PvqYpk7YXqdCiNln6taFt5+dG8ahQH6LkQPVQoFYSzD wEEPQxrRE17a1O+Bx5K6leV9l14g4Cro42IukIuaPp8q6C8JtriDUIAkWyd/HS53Hv4F 3viPzgyo82vqBq2DPPh7YoGTpgheTNvL4ClSt0ie+xDqbh0a2Iy1hexOI6C8m6VO7jfo VdmrdT8AVSzRZ1OLfX2tIn7GRQ3mgYTq7YmepXCSAPG3yjdn+gekc53sxMENlDp7YgJ+ Rehk1RD2MIBGAhzbKWuXcm0eq6paQljEHIVhFyyIBFPKJzOFxpJ1dIFAVVcrN3FTx/hD 72Zg== X-Gm-Message-State: AOJu0YwhGo9dih1tAJqv29/RExXcpEur596WJ+/Ql7b4+mc65+VE9v/U XMSyU4QZaOJOvdwWQqfgJjzygZfC0NZ8wGli X-Received: by 2002:a17:90a:7064:b0:27d:32d8:5f23 with SMTP id f91-20020a17090a706400b0027d32d85f23mr21154782pjk.2.1699026628449; Fri, 03 Nov 2023 08:50:28 -0700 (PDT) Received: from abhinav.. ([103.75.161.210]) by smtp.gmail.com with ESMTPSA id v3-20020a17090ad58300b00274922d4b38sm1469858pju.27.2023.11.03.08.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 08:50:28 -0700 (PDT) From: Abhinav Singh To: alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Abhinav Singh Subject: [PATCH] drivers: gpu: Fix warning using plain integer as NULL Date: Fri, 3 Nov 2023 21:20:13 +0530 Message-Id: <20231103155013.332367-1-singhabhinav9051571833@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 08:51:09 -0700 (PDT) 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[] = {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[] = { @@ -1060,7 +1060,7 @@ static const u32 SECT_CLEAR_def_1[] = static const struct cs_extent_def SECT_CLEAR_defs[] = { {SECT_CLEAR_def_1, 0x0000ffc0, 3 }, - { 0, 0, 0 } + { NULL, 0, 0 } }; static const u32 SECT_CTRLCONST_def_1[] = { @@ -1070,11 +1070,11 @@ static const u32 SECT_CTRLCONST_def_1[] = static const struct cs_extent_def SECT_CTRLCONST_defs[] = { {SECT_CTRLCONST_def_1, 0x0000f3fc, 2 }, - { 0, 0, 0 } + { NULL, 0, 0 } }; static const struct cs_section_def evergreen_cs_data[] = { { SECT_CONTEXT_defs, SECT_CONTEXT }, { SECT_CLEAR_defs, SECT_CLEAR }, { SECT_CTRLCONST_defs, SECT_CTRLCONST }, - { 0, SECT_NONE } + { NULL, SECT_NONE } }; -- 2.39.2