lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <952d3e1711e873d95e25ed8f08c330e803b9b5f9.camel@mediatek.com>
Date: Wed, 21 Aug 2024 02:14:51 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>, "daniel@...ll.ch"
	<daniel@...ll.ch>, "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
	"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>, "kdipendra88@...il.com"
	<kdipendra88@...il.com>, "airlied@...ux.ie" <airlied@...ux.ie>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-mediatek@...ts.infradead.org"
	<linux-mediatek@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] staging: drivers: gpu: drm: mediatek: Fix warning: Using
 plain integer as NULL pointer in mtk_drm_gem.c

Hi, Dipendra:

On Sat, 2024-08-10 at 11:07 +0000, Dipendra Khadka wrote:
>  	 
> External email : Please do not click links or open attachments until you have verified the sender or the content.
>  sparse reported following warking:
> 
> '''
> drivers/gpu/drm/mediatek/mtk_drm_gem.c:290:27: warning: Using plain integer as NULL pointer
> '''
> 
> This patch changes integer 0 to NULL.

In latest kernel [1], this has been fixed.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/mediatek/mtk_gem.c?h=v6.11-rc4#n286

And it's fixed in last year. So remember to send patch based on latest kernel.

Regards,
CK

> 
> Signed-off-by: Dipendra Khadka <kdipendra88@...il.com>
> ---
>  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 f8fd8b98c30e..885ce6ac7bad 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> @@ -287,6 +287,6 @@ void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
>  		return;
>  
>  	vunmap(vaddr);
> -	mtk_gem->kvaddr = 0;
> +	mtk_gem->kvaddr = NULL;
>  	kfree(mtk_gem->pages);
>  }
> -- 
> 2.43.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ