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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 10:31:44 +0100
From:   Philipp Zabel <p.zabel@...gutronix.de>
To:     Vasyl Gomonovych <gomonovych@...il.com>, ck.hu@...iatek.com,
        airlied@...ux.ie, matthias.bgg@...il.com,
        dri-devel@...ts.freedesktop.org
Cc:     linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/mediatek: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

On Tue, 2017-11-21 at 23:31 +0100, Vasyl Gomonovych wrote:
> Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)).
> 
> drivers/gpu/drm/mediatek/mtk_drm_gem.c:223:9-16: WARNING: ERR_CAST can be used with mtk_gem
> Generated by: scripts/coccinelle/api/err_cast.cocci
> 
> Signed-off-by: Vasyl Gomonovych <gomonovych@...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 f595ac816b55..5766b42fc174 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c
> @@ -220,7 +220,7 @@ struct drm_gem_object *mtk_gem_prime_import_sg_table(struct drm_device *dev,
>  	mtk_gem = mtk_drm_gem_init(dev, attach->dmabuf->size);
>  
>  	if (IS_ERR(mtk_gem))
> -		return ERR_PTR(PTR_ERR(mtk_gem));
> +		return ERR_CAST(mtk_gem));
>  
>  	expected = sg_dma_address(sg->sgl);
>  	for_each_sg(sg->sgl, s, sg->nents, i) {

Acked-by: Philipp Zabel <p.zabel@...gutronix.de>

regards
Philipp

Powered by blists - more mailing lists