The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] drm/v3d: Use kvcalloc
@ 2022-03-12 15:26 Harshit Mogalapalli
  2022-03-12 22:27 ` Joe Perches
  2022-03-28 12:25 ` Melissa Wen
  0 siblings, 2 replies; 5+ messages in thread
From: Harshit Mogalapalli @ 2022-03-12 15:26 UTC (permalink / raw)
  Cc: harshit.m.mogalapalli, dan.carpenter, Emma Anholt, David Airlie,
	Daniel Vetter, dri-devel, linux-kernel

kvcalloc is same as kvmalloc_array + __GFP_ZERO.

Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
---
 drivers/gpu/drm/v3d/v3d_gem.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
index c7ed2e1cbab6..f7d37228461e 100644
--- a/drivers/gpu/drm/v3d/v3d_gem.c
+++ b/drivers/gpu/drm/v3d/v3d_gem.c
@@ -308,9 +308,8 @@ v3d_lookup_bos(struct drm_device *dev,
 		return -EINVAL;
 	}
 
-	job->bo = kvmalloc_array(job->bo_count,
-				 sizeof(struct drm_gem_cma_object *),
-				 GFP_KERNEL | __GFP_ZERO);
+	job->bo = kvcalloc(job->bo_count, sizeof(struct drm_gem_cma_object *),
+			   GFP_KERNEL);
 	if (!job->bo) {
 		DRM_DEBUG("Failed to allocate validated BO pointers\n");
 		return -ENOMEM;
-- 
2.31.1


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

end of thread, other threads:[~2022-03-29 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-12 15:26 [PATCH] drm/v3d: Use kvcalloc Harshit Mogalapalli
2022-03-12 22:27 ` Joe Perches
2022-03-13  6:05   ` Harshit Mogalapalli
2022-03-28 12:25 ` Melissa Wen
2022-03-29 12:01   ` Harshit Mogalapalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox