diff options
author | Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> | 2024-03-20 14:03:25 +0530 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2024-03-21 06:00:54 -0700 |
commit | f20b7671dffd8515b6a2a996c6796bd990e9cf8d (patch) | |
tree | 559e709b807a045973351312fe41ea1538df6ae6 | |
parent | ee3b1e31d55cefe8d7995c6bbdfc028a068576d8 (diff) | |
download | lwn-f20b7671dffd8515b6a2a996c6796bd990e9cf8d.tar.gz lwn-f20b7671dffd8515b6a2a996c6796bd990e9cf8d.zip |
drm/xe: Use USEC_PER_MSEC rather than the hard coding
Use USEC_PER_MSEC rather than the hard coded value of 1000.
Static analyzer Reported "casting either timeout_ms or
1000U to type u64" to avoid overflow-before-widen.
Using USEC_PER_MSEC seems better and will help with static analyzer
report cleanup.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240320083325.3258720-1-himal.prasad.ghimiray@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
-rw-r--r-- | drivers/gpu/drm/xe/xe_pcode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c index b324dc2a5deb..627e094c7cbe 100644 --- a/drivers/gpu/drm/xe/xe_pcode.c +++ b/drivers/gpu/drm/xe/xe_pcode.c @@ -74,7 +74,7 @@ static int pcode_mailbox_rw(struct xe_gt *gt, u32 mbox, u32 *data0, u32 *data1, xe_mmio_write32(gt, PCODE_MAILBOX, PCODE_READY | mbox); err = xe_mmio_wait32(gt, PCODE_MAILBOX, PCODE_READY, 0, - timeout_ms * 1000, NULL, atomic); + timeout_ms * USEC_PER_MSEC, NULL, atomic); if (err) return err; |