mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-17 14:16:00 -05:00
drm/xe: Use __counted_by for flexible arrays
Good practice to use __counted_by in kernel coding for flexible arrays. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241018030039.1077842-1-matthew.brost@intel.com
This commit is contained in:
@@ -143,7 +143,7 @@ struct xe_exec_queue {
|
||||
/** @hw_engine_group_link: link into exec queues in the same hw engine group */
|
||||
struct list_head hw_engine_group_link;
|
||||
/** @lrc: logical ring context for this exec queue */
|
||||
struct xe_lrc *lrc[];
|
||||
struct xe_lrc *lrc[] __counted_by(width);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -63,7 +63,7 @@ struct xe_sched_job {
|
||||
|
||||
struct xe_sched_job_snapshot {
|
||||
u16 batch_addr_len;
|
||||
u64 batch_addr[];
|
||||
u64 batch_addr[] __counted_by(batch_addr_len);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user