Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp651748rwb; Sat, 14 Jan 2023 06:18:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXumQz1E3+w8DPVP+bWaaRBDtOZnnpg1OENM8q63zgUyuneBCMCWkzgTrCpBVaOCUBQSW2Bj X-Received: by 2002:a17:90a:d144:b0:227:17e:32a with SMTP id t4-20020a17090ad14400b00227017e032amr24386770pjw.18.1673705882612; Sat, 14 Jan 2023 06:18:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673705882; cv=none; d=google.com; s=arc-20160816; b=ST8z1ysTkeKLXd5sSeOzxaIN6PcvpAUPaJrdCblbziYNlEp6xLxdak6NcGPRPtiQE+ DR95LSTLPwlvaovhNipSUX5TJLQj8olWcrxR2+QI2ZrCPJNnDo+JoGq7uOSj4TY5M/Ws 15igDQzlPELsc76C9PGzG1P6STS23YNlRQL7ZiLnVPYuMzJpr6eNb5cDgiN7yGTC3uQV wl4jnXvC4aehDOgGyOb2YiatYr9j2l1TeqQD1Qz1e5aQDhHh0sQnLBx0PDs46PoVV53D pwDuN7VMs4Yg+NDIWWCoLZZphLWWjZG6RWl+UlQAe75lKkAe9KgyPc9mm7Stj2ctGuBa P9sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=bqZ+ouBCD107p2woOcIMhXDLx63WfXaWZqufuZ18akU=; b=WLlBv3o6QogbhlnwLW9HPCNSMoFpUHN/Rg67C+PFhjb2r/BKXpwMqnK6zVJEEj+kzQ y6wdzlU4SFKJtXKJZgsxzE6Mt6OpWtksvakwlzyWf0TKmipX9uZED7ie5r5SXzDQwKFp 1o2rmG6NCnJBqMaHZfq/LcoArBWGP3mLCftmcso3amJnrhp4n9rsa6o2LIfJFob4rduu YlDJqrbuy24PIoBTL0SdiaHLKxe4sE3MFww8z+yP21YvZFs6u2SWGF3vuWsNP/RWqnZv /cNWIdzRzik30F9iBhNCgBI/+DXQPAfiMhE8k4uMK+8UVz9/BEF/gxo+f/P/TweCnqws B5kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="Bu/P+uck"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q19-20020a17090a2e1300b0021982fba453si25309582pjd.40.2023.01.14.06.17.56; Sat, 14 Jan 2023 06:18:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b="Bu/P+uck"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229969AbjANOER (ORCPT + 51 others); 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-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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/drm/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_source *source, return 0; } -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 = 0; *source = INTEL_PIPE_CRC_SOURCE_PIPE; @@ -121,8 +120,6 @@ static int i9xx_pipe_crc_auto_source(struct drm_i915_private *dev_priv, } } drm_modeset_unlock_all(&dev_priv->drm); - - return ret; } 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_private *dev_priv, { bool need_stable_symbols = false; - if (*source == INTEL_PIPE_CRC_SOURCE_AUTO) { - int ret = i9xx_pipe_crc_auto_source(dev_priv, pipe, source); - if (ret) - return ret; - } + if (*source == INTEL_PIPE_CRC_SOURCE_AUTO) + i9xx_pipe_crc_auto_source(dev_priv, pipe, source); switch (*source) { case INTEL_PIPE_CRC_SOURCE_PIPE: @@ -200,11 +194,8 @@ static int i9xx_pipe_crc_ctl_reg(struct drm_i915_private *dev_priv, enum intel_pipe_crc_source *source, u32 *val) { - if (*source == INTEL_PIPE_CRC_SOURCE_AUTO) { - int ret = i9xx_pipe_crc_auto_source(dev_priv, pipe, source); - if (ret) - return ret; - } + if (*source == INTEL_PIPE_CRC_SOURCE_AUTO) + i9xx_pipe_crc_auto_source(dev_priv, pipe, source); switch (*source) { case INTEL_PIPE_CRC_SOURCE_PIPE: -- 2.34.1