drm/i915/huc: fix status check
diff mbox series

Message ID 20190723153733.19401-1-daniele.ceraolospurio@intel.com
State New
Headers show
Series
  • drm/i915/huc: fix status check
Related show

Commit Message

Daniele Ceraolo Spurio July 23, 2019, 3:37 p.m. UTC
Fix botched refactoring of the code that uncorrectly split a check on a
bool, treating it as a u32.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 84b1ca2f0e68 ("drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/uc/intel_huc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson July 23, 2019, 3:41 p.m. UTC | #1
Quoting Daniele Ceraolo Spurio (2019-07-23 16:37:33)
> Fix botched refactoring of the code that uncorrectly split a check on a
> bool, treating it as a u32.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 84b1ca2f0e68 ("drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths")
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(who feels rather silly for skimming over it)
-Chris
Chris Wilson July 23, 2019, 4:19 p.m. UTC | #2
Quoting Chris Wilson (2019-07-23 16:41:07)
> Quoting Daniele Ceraolo Spurio (2019-07-23 16:37:33)
> > Fix botched refactoring of the code that uncorrectly split a check on a
> > bool, treating it as a u32.
> > 
> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> > Fixes: 84b1ca2f0e68 ("drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths")
> > Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> (who feels rather silly for skimming over it)

Applied, thanks for the report and quick fix.
-Chris

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/gt/uc/intel_huc.c b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
index bc14439173d7..ab6c1564b6a7 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_huc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_huc.c
@@ -162,7 +162,7 @@  int intel_huc_check_status(struct intel_huc *huc)
 {
 	struct intel_gt *gt = huc_to_gt(huc);
 	intel_wakeref_t wakeref;
-	bool status = false;
+	u32 status = 0;
 
 	if (!intel_uc_is_using_huc(&gt->uc))
 		return -ENODEV;