Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8769337rwl; Tue, 10 Jan 2023 19:14:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXt26UwotXtx7kn1zbhN287aOvJYq3mrsyNc8lEdJKw154RNhH/0DuluUZCPB2zFxFZg7nLD X-Received: by 2002:a17:906:819:b0:7ad:e67d:f15c with SMTP id e25-20020a170906081900b007ade67df15cmr67539796ejd.48.1673406871454; Tue, 10 Jan 2023 19:14:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673406871; cv=none; d=google.com; s=arc-20160816; b=MbGTGn6SgpIQ3QcIF2kZdqSsxzExLNu6g0rLp4sO1R3B9FqYlRsL/UibHk3z0+9VVk zuFr6rEzovGENJny7ZmUDmKNkL3frMFkkLiUXR2MB9UTkuqPLe5rS6EMloBSJK8x96Wm w8Tep1qhLpK11HxzIj5vdclB22N5+bozxLcDW2PgjcGoZBii0hK7jJ/2eJGTJOoKN5q1 LKSX33FKxv03hlqo0/snrhYSRo0cipo+JgIbcECVxMIdyGC+gheFTWJ9fXUXJyRT+Y8d qhsRgQZVhuKoEB3oU5YuMo9FMQ9jjk4K1H+PwyYRmKJGUjsX2yDKZIUb599nHAWoKFCI 4GyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=AX+YH0kFrQnZ6S7xeXZmTR/bCpZwNmMzUSoBmbHjAZU=; b=Dpm5DHEAcSFg6LIMghtYzhpH0/xDyjRQQUvr2qYfWD4GDWjjm6daBobSpmjRkHsXhq ou1BDQayA1GHy2ctwRMVAM2CCQKjgnMg+2IgsODk1NTlg1PYoSa83yXpsQspL6Z80XwC xyN+WCm0X9NPcUY+4lDlh+YwKQgFrpHFNDCxj0TyiryexMZRgQvzc4T6jAYXuqwFnHog QIs/lHXfS5Ewv4S6W+wqlCshpbfG5z45OHaBM3ojrj6ViYUWcpEazSb9/KW3p1F2LWyO Wbj9PeIKE24NWtwmNKWcrRBIgsF3sj5qg4qVosOEstezTikYpQUDJDzctPNMw9fHvtT9 Bt9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="Ia0Uu+4/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i15-20020a1709064fcf00b007ac60b82ea5si15436660ejw.96.2023.01.10.19.14.18; Tue, 10 Jan 2023 19:14:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="Ia0Uu+4/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232388AbjAKCwN (ORCPT + 55 others); Tue, 10 Jan 2023 21:52:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbjAKCwL (ORCPT ); Tue, 10 Jan 2023 21:52:11 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95EA913D44 for ; Tue, 10 Jan 2023 18:52:06 -0800 (PST) X-UUID: ec4f79ec915a11ed945fc101203acc17-20230111 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=AX+YH0kFrQnZ6S7xeXZmTR/bCpZwNmMzUSoBmbHjAZU=; b=Ia0Uu+4/us99SFnGwoz9ogCRWTtfydfsiD3V2T1x1JyOhTBrR94U5camKTWZKK8XHYtxLrU53i9klCHKi5Ys4ry1/cAOhjC/ts4Z/K50li6vu6QvWjIf/ko9kLlSpalJvaBmerRsn0H5JtA/LCriKt01b17M5gWF+UedzTZGr4w=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:946cee99-e493-4c02-a330-59bbf12cf215,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.17,REQID:946cee99-e493-4c02-a330-59bbf12cf215,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:543e81c,CLOUDID:08a474f5-ff42-4fb0-b929-626456a83c14,B ulkID:2301111052015J7G5SZD,BulkQuantity:0,Recheck:0,SF:38|28|17|19|48,TC:n il,Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OS I:0,OSA:0 X-CID-APTURL: Status:success,Category:nil,Trust:0,Unknown:0,Malicious:0 X-CID-BVR: 0 X-UUID: ec4f79ec915a11ed945fc101203acc17-20230111 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 208919268; Wed, 11 Jan 2023 10:52:01 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Wed, 11 Jan 2023 10:52:00 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 11 Jan 2023 10:52:00 +0800 From: Miles Chen To: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , CK Hu CC: , Miles Chen , , , Subject: [PATCH v2] drm/mediatek: stop using 0 as NULL pointer Date: Wed, 11 Jan 2023 10:44:41 +0800 Message-ID: <20230111024443.24559-1-miles.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use NULL for NULL pointer to fix the following sparse warning: drivers/gpu/drm/mediatek/mtk_drm_gem.c:265:27: sparse: warning: Using plain integer as NULL pointer Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function") Signed-off-by: Miles Chen Reviewed-by: AngeloGioacchino Del Regno --- Change since v1: Add Fixes tag --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c index 47e96b0289f9..06aadd5e7f5b 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c @@ -262,6 +262,6 @@ void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, return; vunmap(vaddr); - mtk_gem->kvaddr = 0; + mtk_gem->kvaddr = NULL; kfree(mtk_gem->pages); } -- 2.18.0