kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] drm/nouveau/gem: Use vmemdup_user() rather than duplicating its implementation
       [not found] <12ebdcbe-8a8a-958a-af05-a0593d9756b2@web.de>
  2020-08-13 13:12 ` [PATCH] drm/nouveau/gem: fix err_cast.cocci warnings kernel test robot
@ 2020-08-13 13:12 ` kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-13 13:12 UTC (permalink / raw)
  To: Markus Elfring, nouveau, dri-devel, Ben Skeggs, Daniel Vetter,
	David Airlie
  Cc: Julia Lawall, kernel-janitors, kbuild-all, LKML, Denis Efremov

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

Hi Markus,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip tegra-drm/drm/tegra/for-next linus/master drm/drm-next drm-exynos/exynos-drm-next v5.8 next-20200812]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

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
config: x86_64-randconfig-c002-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


coccinelle warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/nouveau/nouveau_gem.c:589:9-16: WARNING: ERR_CAST can be used with mem

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34067 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] drm/nouveau/gem: fix err_cast.cocci warnings
       [not found] <12ebdcbe-8a8a-958a-af05-a0593d9756b2@web.de>
@ 2020-08-13 13:12 ` kernel test robot
  2020-08-13 13:12 ` [PATCH] drm/nouveau/gem: Use vmemdup_user() rather than duplicating its implementation kernel test robot
  1 sibling, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-08-13 13:12 UTC (permalink / raw)
  To: Markus Elfring, nouveau, dri-devel, Ben Skeggs, Daniel Vetter,
	David Airlie
  Cc: Julia Lawall, kernel-janitors, kbuild-all, LKML, Denis Efremov

From: kernel test robot <lkp@intel.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@users.sourceforge.net>
Signed-off-by: kernel test robot <lkp@intel.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;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-13 13:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <12ebdcbe-8a8a-958a-af05-a0593d9756b2@web.de>
2020-08-13 13:12 ` [PATCH] drm/nouveau/gem: fix err_cast.cocci warnings kernel test robot
2020-08-13 13:12 ` [PATCH] drm/nouveau/gem: Use vmemdup_user() rather than duplicating its implementation kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).