[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200813131208.GA20157@9b632a8c9f6b>
Date: Thu, 13 Aug 2020 21:12:08 +0800
From: kernel test robot <lkp@...el.com>
To: Markus Elfring <Markus.Elfring@....de>,
nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
Ben Skeggs <bskeggs@...hat.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>
Cc: kbuild-all@...ts.01.org, Julia Lawall <Julia.Lawall@...6.fr>,
kernel-janitors@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Denis Efremov <efremov@...ux.com>
Subject: [PATCH] drm/nouveau/gem: fix err_cast.cocci warnings
From: kernel test robot <lkp@...el.com>
drivers/gpu/drm/nouveau/nouveau_gem.c:589:9-16: WARNING: ERR_CAST can be used with mem
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
Generated by: scripts/coccinelle/api/err_cast.cocci
CC: Markus Elfring <elfring@...rs.sourceforge.net>
Signed-off-by: kernel test robot <lkp@...el.com>
---
url: https://github.com/0day-ci/linux/commits/Markus-Elfring/drm-nouveau-gem-Use-vmemdup_user-rather-than-duplicating-its-implementation/20200812-150757
base: git://anongit.freedesktop.org/drm-intel for-linux-next
nouveau_gem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -586,7 +586,7 @@ u_memcpya(uint64_t user, unsigned nmemb,
size *= nmemb;
mem = vmemdup_user(userptr, size);
if (IS_ERR(mem))
- return ERR_PTR(PTR_ERR(mem));
+ return ERR_CAST(mem);
return mem;
}
Powered by blists - more mailing lists