]> git.hungrycats.org Git - linux/commitdiff
drm/i915/gt: Return bool values from a boolean helper
authorAndi Shyti <andi.shyti@linux.intel.com>
Fri, 26 Jun 2026 21:52:32 +0000 (23:52 +0200)
committerAndi Shyti <andi.shyti@linux.intel.com>
Fri, 3 Jul 2026 09:25:26 +0000 (11:25 +0200)
intel_has_gpu_reset() returns logically correct values by
returning a function pointer when GPU reset is supported and
NULL otherwise. However, as a boolean helper, it is more
appropriate to return explicit true or false values.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Reviewed-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20260626215232.861416-1-andi.shyti@linux.intel.com
drivers/gpu/drm/i915/gt/intel_reset.c

index b2cf672564dd9c0db94a3e70147c67d064aa6773..6053f3e8aa27c1bcc6cb6ef0c38c14e8cdfa90a0 100644 (file)
@@ -797,7 +797,7 @@ static int __intel_gt_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask
 bool intel_has_gpu_reset(const struct intel_gt *gt)
 {
        if (!gt->i915->params.reset)
-               return NULL;
+               return false;
 
        return intel_get_gpu_reset(gt);
 }