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: <20191024121235.GC11828@phenom.ffwll.local>
Date:   Thu, 24 Oct 2019 14:12:35 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Wambui Karuga <wambui.karugax@...il.com>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        ck.hu@...iatek.com, p.zabel@...gutronix.de, airlied@...ux.ie,
        daniel@...ll.ch
Subject: Re: [Outreachy][PATCH] drm/mediatek: remove cast to pointers passed
 to kfree

On Wed, Oct 23, 2019 at 02:11:07PM +0300, Wambui Karuga wrote:
> Remove unnecessary casts to pointer types passed to kfree.
> Issue detected by coccinelle:
> @@
> type t1;
> expression *e;
> @@
> 
> -kfree((t1 *)e);
> +kfree(e);
> 
> Signed-off-by: Wambui Karuga <wambui.karugax@...il.com>

Applied to drm-misc-next, thanks for your patch.
-Daniel

> ---
>  drivers/gpu/drm/mediatek/mtk_drm_gem.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> index ca672f1d140d..b04a3c2b111e 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> @@ -271,7 +271,7 @@ void *mtk_drm_gem_prime_vmap(struct drm_gem_object *obj)
>  			       pgprot_writecombine(PAGE_KERNEL));
>  
>  out:
> -	kfree((void *)sgt);
> +	kfree(sgt);
>  
>  	return mtk_gem->kvaddr;
>  }
> @@ -285,5 +285,5 @@ void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr)
>  
>  	vunmap(vaddr);
>  	mtk_gem->kvaddr = 0;
> -	kfree((void *)mtk_gem->pages);
> +	kfree(mtk_gem->pages);
>  }
> -- 
> 2.23.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ