Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Ensure 'passed' variable is always initialized
@ 2023-12-18 16:38 Rodrigo Vivi
  2023-12-18 20:29 ` Matthew Brost
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Rodrigo Vivi @ 2023-12-18 16:38 UTC (permalink / raw)
  To: intel-xe; +Cc: Lucas De Marchi, kernel test robot, Rodrigo Vivi

Although the path should be impossible, some static analyzers
and compilers might not like the fact that there is a path
where 'passed' variable is not initialized.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202312170357.KPSinwPs-lkp@intel.com/
Fixes: ad7d86415578 ("drm/xe: Enable W=1 warnings by default")
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/xe/xe_wait_user_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_wait_user_fence.c b/drivers/gpu/drm/xe/xe_wait_user_fence.c
index b0a7896f7fcb6..b2e76331bfa73 100644
--- a/drivers/gpu/drm/xe/xe_wait_user_fence.c
+++ b/drivers/gpu/drm/xe/xe_wait_user_fence.c
@@ -19,7 +19,7 @@ static int do_compare(u64 addr, u64 value, u64 mask, u16 op)
 {
 	u64 rvalue;
 	int err;
-	bool passed;
+	bool passed = 0;
 
 	err = copy_from_user(&rvalue, u64_to_user_ptr(addr), sizeof(rvalue));
 	if (err)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-19  4:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-18 16:38 [PATCH] drm/xe: Ensure 'passed' variable is always initialized Rodrigo Vivi
2023-12-18 20:29 ` Matthew Brost
2023-12-19  3:36 ` ✓ CI.Patch_applied: success for " Patchwork
2023-12-19  3:36 ` ✗ CI.checkpatch: warning " Patchwork
2023-12-19  3:37 ` ✓ CI.KUnit: success " Patchwork
2023-12-19  3:44 ` ✓ CI.Build: " Patchwork
2023-12-19  3:45 ` ✓ CI.Hooks: " Patchwork
2023-12-19  3:46 ` ✓ CI.checksparse: " Patchwork
2023-12-19  4:21 ` ✓ CI.BAT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox