From nobody Mon Sep 15 05:51:41 2025 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E9ACC3DA78 for ; Sat, 14 Jan 2023 14:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230018AbjANOER (ORCPT ); Sat, 14 Jan 2023 09:04:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjANOEO (ORCPT ); Sat, 14 Jan 2023 09:04:14 -0500 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF867EC2 for ; Sat, 14 Jan 2023 06:04:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1673705038; bh=kBGWBKHIIKQIpYxP0OzdkdWOafSEc8bDoiSabz6C4S8=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=Bu/P+uckxIILRoyNCCIE8VRlk2ynL7kwkt5QCnjI8E4VzpnbWqUcgqOZKpswfuiB8 kOUpbmU41aiYEQLmTvpmUvOHUT3UU8nrCF4F+vYZUUp97ihVVKEm6mOjnrD09zU8QX AzjRnY9dHpRAAYvnXOBvwJFJWn9hKSQR6zRNwdM4= Received: by b-2.in.mailobj.net [192.168.90.12] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 14 Jan 2023 15:03:58 +0100 (CET) X-EA-Auth: 1SrSBt70RjsiUzKSXWkgrhGKybdJO3t+s2nn7krxM8MgIPE6VodeGCtCPIciVl4mp7id9IJhJBwpj6IDplEW3+KSCzFkV5SL Date: Sat, 14 Jan 2023 19:33:53 +0530 From: Deepak R Varma To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar , Praveen Kumar Subject: [PATCH] drm/i915/display: Convert i9xx_pipe_crc_auto_source to void Message-ID: MIME-Version: 1.0 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert function i9xx_pipe_crc_auto_source() to return void instead of int since the current implementation always returns 0 to the caller. Issue identified using returnvar Coccinelle semantic patch. Signed-off-by: Deepak R Varma Reviewed-by: Rodrigo Vivi --- Please note: The change is compile tested only. drivers/gpu/drm/i915/display/intel_pipe_crc.c | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/dr= m/i915/display/intel_pipe_crc.c index e9774670e3f6..8d3ea8d7b737 100644 --- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c +++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c @@ -72,14 +72,13 @@ static int i8xx_pipe_crc_ctl_reg(enum intel_pipe_crc_so= urce *source, return 0; } =20 -static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, - enum pipe pipe, - enum intel_pipe_crc_source *source) +static void i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, + enum pipe pipe, + enum intel_pipe_crc_source *source) { struct intel_encoder *encoder; struct intel_crtc *crtc; struct intel_digital_port *dig_port; - int ret =3D 0; =20 *source =3D INTEL_PIPE_CRC_SOURCE_PIPE; =20 @@ -121,8 +120,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_pr= ivate *dev_priv, } } drm_modeset_unlock_all(&dev_priv->drm); - - return ret; } =20 static int vlv_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv, @@ -132,11 +129,8 @@ static int vlv_pipe_crc_ctl_reg(struct drm_i915_privat= e *dev_priv, { bool need_stable_symbols =3D false; =20 - if (*source =3D=3D INTEL_PIPE_CRC_SOURCE_AUTO) { - int ret =3D i9xx_pipe_crc_auto_source(dev_priv, pipe, source); - if (ret) - return ret; - } + if (*source =3D=3D INTEL_PIPE_CRC_SOURCE_AUTO) + i9xx_pipe_crc_auto_source(dev_priv, pipe, source); =20 switch (*source) { case INTEL_PIPE_CRC_SOURCE_PIPE: @@ -200,11 +194,8 @@ static int i9xx_pipe_crc_ctl_reg(struct drm_i915_priva= te *dev_priv, enum intel_pipe_crc_source *source, u32 *val) { - if (*source =3D=3D INTEL_PIPE_CRC_SOURCE_AUTO) { - int ret =3D i9xx_pipe_crc_auto_source(dev_priv, pipe, source); - if (ret) - return ret; - } + if (*source =3D=3D INTEL_PIPE_CRC_SOURCE_AUTO) + i9xx_pipe_crc_auto_source(dev_priv, pipe, source); =20 switch (*source) { case INTEL_PIPE_CRC_SOURCE_PIPE: --=20 2.34.1