mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-15 13:14:59 -05:00
drm/xe: Use ARRAY_SIZE in guc_waklv_init()
Prefer using ARRAY_SIZE where needed and just passing 1 instead of calculating the size of one element. Cc: Jonathan Cavitt <jonathan.cavitt@intel.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202508130158.eogeBZQT-lkp@intel.com/ Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Link: https://lore.kernel.org/r/20250912-guc-ads-array-size-v1-1-a6555392a1f8@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
@@ -339,7 +339,7 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
|
||||
if (XE_GT_WA(gt, 13011645652)) {
|
||||
u32 data = 0xC40;
|
||||
|
||||
guc_waklv_enable(ads, &data, sizeof(data) / sizeof(u32), &offset, &remain,
|
||||
guc_waklv_enable(ads, &data, 1, &offset, &remain,
|
||||
GUC_WA_KLV_NP_RD_WRITE_TO_CLEAR_RCSM_AT_CGP_LATE_RESTORE);
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ static void guc_waklv_init(struct xe_guc_ads *ads)
|
||||
0x0,
|
||||
0xF,
|
||||
};
|
||||
guc_waklv_enable(ads, data, sizeof(data) / sizeof(u32), &offset, &remain,
|
||||
guc_waklv_enable(ads, data, ARRAY_SIZE(data), &offset, &remain,
|
||||
GUC_WA_KLV_RESTORE_UNSAVED_MEDIA_CONTROL_REG);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user