From: sashiko-bot@kernel.org
To: "Andi Shyti" <andi.shyti@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/gt: Return bool values from a boolean helper
Date: Fri, 26 Jun 2026 21:55:34 +0000 [thread overview]
Message-ID: <20260626215535.05BE11F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260626215232.861416-1-andi.shyti@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch fails to fully implement the explicit boolean returns claimed in the commit message.
--
commit 0d74cf5750ffd2182532ac4105376be52c64bca2
Author: Andi Shyti <andi.shyti@linux.intel.com>
drm/i915/gt: Return bool values from a boolean helper
This commit updates intel_has_gpu_reset() to return false instead of NULL
when GPU reset is disabled via parameters. The stated goal is to have the
boolean helper return explicit true or false values.
Link: https://lore.kernel.org/r/20260625114442.2912230-1-andi.shyti@linux.intel.com
> diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
> index b2cf672564dd9..6053f3e8aa27c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_reset.c
> +++ b/drivers/gpu/drm/i915/gt/intel_reset.c
> @@ -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);
[Severity: Medium]
Does this fully achieve the goal stated in the commit message?
Looking at intel_has_gpu_reset() in drivers/gpu/drm/i915/gt/intel_reset.c,
intel_get_gpu_reset() returns a function pointer (reset_func).
By returning intel_get_gpu_reset(gt) directly, the code still relies on the C
compiler's implicit pointer-to-bool conversion.
Would it be better to return an explicit boolean value here as well, such as
!!intel_get_gpu_reset(gt) or intel_get_gpu_reset(gt) != NULL, to fully align
with the commit message's intent?
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260626215232.861416-1-andi.shyti@linux.intel.com?part=1
next prev parent reply other threads:[~2026-06-26 21:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-26 21:52 [PATCH v2] drm/i915/gt: Return bool values from a boolean helper Andi Shyti
2026-06-26 21:55 ` sashiko-bot [this message]
2026-06-27 4:58 ` Raag Jadav
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260626215535.05BE11F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andi.shyti@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.