Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe/query: zero the engine info
@ 2024-01-30 15:51 Nirmoy Das
  2024-01-30 17:33 ` Matthew Brost
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Nirmoy Das @ 2024-01-30 15:51 UTC (permalink / raw)
  To: intel-xe; +Cc: Nirmoy Das

Use kzalloc like other routines for better consistency.

Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 drivers/gpu/drm/xe/xe_query.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index 9b35673b286c..02a4e2c083e4 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -198,7 +198,7 @@ static int query_engines(struct xe_device *xe,
 		return -EINVAL;
 	}
 
-	engines = kmalloc(size, GFP_KERNEL);
+	engines = kzalloc(size, GFP_KERNEL);
 	if (!engines)
 		return -ENOMEM;
 
@@ -212,14 +212,10 @@ static int query_engines(struct xe_device *xe,
 			engines->engines[i].instance.engine_instance =
 				hwe->logical_instance;
 			engines->engines[i].instance.gt_id = gt->info.id;
-			engines->engines[i].instance.pad = 0;
-			memset(engines->engines[i].reserved, 0,
-			       sizeof(engines->engines[i].reserved));
 
 			i++;
 		}
 
-	engines->pad = 0;
 	engines->num_engines = i;
 
 	if (copy_to_user(query_ptr, engines, size)) {
-- 
2.42.0


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

end of thread, other threads:[~2024-01-31  5:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 15:51 [PATCH] drm/xe/query: zero the engine info Nirmoy Das
2024-01-30 17:33 ` Matthew Brost
2024-01-31  5:21   ` Nirmoy Das
2024-01-30 21:30 ` ✓ CI.Patch_applied: success for " Patchwork
2024-01-30 21:30 ` ✓ CI.checkpatch: " Patchwork
2024-01-30 21:31 ` ✓ CI.KUnit: " Patchwork
2024-01-30 21:38 ` ✓ CI.Build: " Patchwork
2024-01-30 21:39 ` ✓ CI.Hooks: " Patchwork
2024-01-30 21:40 ` ✓ CI.checksparse: " Patchwork
2024-01-30 22:24 ` ✓ CI.BAT: " Patchwork

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