[Intel-gfx] [bug report] drm/i915/uc: prefer intel_gt over i915 in GuC/HuC paths

Dan Carpenter dan.carpenter at oracle.com
Tue Jul 23 15:00:31 UTC 2019


Hello Daniele Ceraolo Spurio,

The patch 84b1ca2f0e68: "drm/i915/uc: prefer intel_gt over i915 in
GuC/HuC paths" from Jul 13, 2019, leads to the following static
checker warning:

	drivers/gpu/drm/i915/gt/uc/intel_huc.c:173 intel_huc_check_status()
	warn: masking a bool

drivers/gpu/drm/i915/gt/uc/intel_huc.c
   161  int intel_huc_check_status(struct intel_huc *huc)
   162  {
   163          struct intel_gt *gt = huc_to_gt(huc);
   164          intel_wakeref_t wakeref;
   165          bool status = false;
                ^^^^^^^^^^^^^^^^^^^
   166  
   167          if (!intel_uc_is_using_huc(&gt->uc))
   168                  return -ENODEV;
   169  
   170          with_intel_runtime_pm(&gt->i915->runtime_pm, wakeref)
   171                  status = intel_uncore_read(gt->uncore, huc->status.reg);
   172  
   173          return (status & huc->status.mask) == huc->status.value;
                        ^^^^^^

It definitely looks like status should be a u32 or something.

   174  }

regards,
dan carpenter


More information about the Intel-gfx mailing list