From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B17D4C43458 for ; Fri, 26 Jun 2026 21:52:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FD0E10F71D; Fri, 26 Jun 2026 21:52:39 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2BFD310F71D; Fri, 26 Jun 2026 21:52:38 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 27F62600AA; Fri, 26 Jun 2026 21:52:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35F311F000E9; Fri, 26 Jun 2026 21:52:36 +0000 (UTC) From: Andi Shyti To: dri-devel , intel-gfx Cc: Jani Nikula , Raag Jadav , Andi Shyti , Andi Shyti , Sebastian Brzezinka Subject: [PATCH v2] drm/i915/gt: Return bool values from a boolean helper Date: Fri, 26 Jun 2026 23:52:32 +0200 Message-ID: <20260626215232.861416-1-andi.shyti@linux.intel.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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 Reviewed-by: Sebastian Brzezinka Link: https://lore.kernel.org/r/20260625114442.2912230-1-andi.shyti@linux.intel.com --- v1 -> v2 - don't use '!!' when returning function pointers. (Jani) drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index b2cf672564dd..6053f3e8aa27 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); } -- 2.53.0