mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/xe: Utilize for_each_gt_with_type() for type-specific GT loops
Convert existing loops with Coccinelle via the following semantic patch:
@@
identifier GT, XE, ID;
iterator name for_each_gt, for_each_gt_with_type;
@@
- for_each_gt(GT, XE, ID) {
+ for_each_gt_with_type(GT, XE, ID, BIT(XE_GT_TYPE_MAIN)) {
- if (xe_gt_is_media_type(GT))
- continue;
...
}
@@
identifier GT, XE, ID;
iterator name for_each_gt, for_each_gt_with_type;
@@
- for_each_gt(GT, XE, ID) {
+ for_each_gt_with_type(GT, XE, ID, BIT(XE_GT_TYPE_MEDIA)) {
- if (xe_gt_is_main_type(GT))
- continue;
...
}
@@
identifier GT, XE, ID;
iterator name for_each_gt, for_each_gt_with_type;
@@
- for_each_gt(GT, XE, ID) {
+ for_each_gt_with_type(GT, XE, ID, BIT(XE_GT_TYPE_MAIN)) {
- if (!xe_gt_is_main_type(GT))
- continue;
...
}
@@
identifier GT, XE, ID;
iterator name for_each_gt, for_each_gt_with_type;
@@
- for_each_gt(GT, XE, ID) {
+ for_each_gt_with_type(GT, XE, ID, BIT(XE_GT_TYPE_MEDIA)) {
- if (xe_gt_is_media_type(GT))
- continue;
...
}
No functional change expected.
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patch.msgid.link/20260305-gt-type-loops-v1-2-aa42e9fc3f06@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
This commit is contained in:
parent
9f3e77cf20
commit
57c554332c
2 changed files with 2 additions and 8 deletions
Loading…
Add table
Add a link
Reference in a new issue