drm/xe/guc: Introduce the GuC Buffer Cache
Hello Michal Wajdeczko,
Commit 696bfdf273ea ("drm/xe/guc: Introduce the GuC Buffer Cache") from Dec 20, 2024 (linux-next), leads to the following Smatch static checker warning:
drivers/gpu/drm/xe/xe_guc_buf.c:81 xe_guc_buf_reserve() warn: sizeof(NUMBER)?
drivers/gpu/drm/xe/xe_guc_buf.c
76 struct xe_guc_buf xe_guc_buf_reserve(struct xe_guc_buf_cache *cache, u32 dwords)
77 {
78 struct drm_suballoc *sa;
79
80 if (cache->sam)
--> 81 sa = __xe_sa_bo_new(cache->sam, dwords * sizeof(32), GFP_ATOMIC);
^^^^^^^^^^^^Probably you meant sizeof u32? It's the same either way, of course...
82 else
83 sa = ERR_PTR(-EOPNOTSUPP);
84
85 return (struct xe_guc_buf){ .sa = sa };
86 }regards,
dan carpenter