Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp878850pxf; Wed, 7 Apr 2021 13:59:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylpkF+I8yHM1JionCkknr7LWtVy2T3dMBiId1afR6+UA6tP61TEnX6kX+CcbN97I6FYJDc X-Received: by 2002:a50:f0da:: with SMTP id a26mr764021edm.342.1617829187166; Wed, 07 Apr 2021 13:59:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617829187; cv=none; d=google.com; s=arc-20160816; b=Jk7NLIB1oLh+MhErNFYEi3Jv5G25YxjWTrwz4DgjFDqMuK1SUimkCsVta/OHbcURez /9BFfHIA4klEd7KkHIJ4Tvg4ZBpfN87UGCaZgjrFnsoan2tYMYbj4NPWLTDaNo4dndkT PI9CJBhCTCiss0e1IwUvJLF1DRybYaP4geL1HaZPRCWc2vJ0PQfMkyYm1ExZThynW7IG ehyfh1I2RqsvdYVhdq0A2zvqfMi7pxrnADBoYraUwi7pQM7lJIdjaFpcUelGSBdmrVEw Ifnrmwnpp561ErhGYyYbjaujqcx+LyJ8RfvfIrVkb/spcq60dE+5UTMf/3yHsGSYd3yM pCfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=5wLEYOIpDRB0gZJv9fCClukAbCVJNP4wbKvHocBgPIg=; b=NYqaF8wSYHfu1HcSG6deefmSz8C19xYV+GxLdnqJTeZUUTY7QxVMhmX2KGpbr1Ms+K 5NtsoEr0A7sRjM6mi3QgutxbFW062EDUyOXJw/XGjYne1AA/82zTIgMQJAaTRT1DJ36W u0nvfPJbmxaZhXGtkaR995UF8SygvBwPQq3+aD87i9L+PwQuo3DYNkemK3TR+phdH/td 4c3+NmyqenPB2QvLgeeFH7Icfdd3f6YtPXXkSDP7ZlVwe3pMs5UwaHhwkc41q3da5VE0 mYVADrSDeiieP1PPj1HM19XdidcsR79Ys8+Rk3D4jkhSpXnEbhvj2hSzk8+J55O3PPNg tpeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u18si19766006ejk.68.2021.04.07.13.59.23; Wed, 07 Apr 2021 13:59:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237850AbhDGNIH (ORCPT + 99 others); Wed, 7 Apr 2021 09:08:07 -0400 Received: from mail-m121143.qiye.163.com ([115.236.121.143]:52458 "EHLO mail-m121143.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233519AbhDGNIH (ORCPT ); Wed, 7 Apr 2021 09:08:07 -0400 Received: from ubuntu.localdomain (unknown [36.152.145.181]) by mail-m121143.qiye.163.com (Hmail) with ESMTPA id D428254048C; Wed, 7 Apr 2021 21:07:53 +0800 (CST) From: Bernard Zhao To: Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Kuogee Hsieh , Stephen Boyd , Abhinav Kumar , Tanmay Shah , Chandan Uddaraju , Bernard Zhao , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/msm: remove unneeded variable ret Date: Wed, 7 Apr 2021 06:06:21 -0700 Message-Id: <20210407130654.3387-1-bernard@vivo.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZSUpMTUtIHUNIQ04dVkpNSkxDS0tDTE9JSE5VEwETFhoSFyQUDg9ZV1kWGg8SFR0UWU FZT0tIVUpKS0hKQ1VLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MiI6OBw5Vj8OKCMQSSEIAU8Q TB8aCQFVSlVKTUpMQ0tLQ0xPTktCVTMWGhIXVRkeCRUaCR87DRINFFUYFBZFWVdZEgtZQVlITVVK TklVSk9OVUpDSllXWQgBWUFIT05LNwY+ X-HM-Tid: 0a78ac7248b0b038kuuud428254048c Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fix coccicheck warning: drivers/gpu/drm/msm/dp/dp_link.c:848:5-8: Unneeded variable: "ret". Return "0" on line 880 Also remove unneeded function return value check. Signed-off-by: Bernard Zhao --- drivers/gpu/drm/msm/dp/dp_link.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_link.c b/drivers/gpu/drm/msm/dp/dp_link.c index be986da78c4a..3395b08155a6 100644 --- a/drivers/gpu/drm/msm/dp/dp_link.c +++ b/drivers/gpu/drm/msm/dp/dp_link.c @@ -843,10 +843,8 @@ bool dp_link_send_edid_checksum(struct dp_link *dp_link, u8 checksum) return ret == 1; } -static int dp_link_parse_vx_px(struct dp_link_private *link) +static void dp_link_parse_vx_px(struct dp_link_private *link) { - int ret = 0; - DRM_DEBUG_DP("vx: 0=%d, 1=%d, 2=%d, 3=%d\n", drm_dp_get_adjust_request_voltage(link->link_status, 0), drm_dp_get_adjust_request_voltage(link->link_status, 1), @@ -876,8 +874,6 @@ static int dp_link_parse_vx_px(struct dp_link_private *link) DRM_DEBUG_DP("Requested: v_level = 0x%x, p_level = 0x%x\n", link->dp_link.phy_params.v_level, link->dp_link.phy_params.p_level); - - return ret; } /** @@ -891,8 +887,6 @@ static int dp_link_parse_vx_px(struct dp_link_private *link) static int dp_link_process_phy_test_pattern_request( struct dp_link_private *link) { - int ret = 0; - if (!(link->request.test_requested & DP_TEST_LINK_PHY_TEST_PATTERN)) { DRM_DEBUG_DP("no phy test\n"); return -EINVAL; @@ -918,12 +912,9 @@ static int dp_link_process_phy_test_pattern_request( link->dp_link.link_params.rate = drm_dp_bw_code_to_link_rate(link->request.test_link_rate); - ret = dp_link_parse_vx_px(link); - - if (ret) - DRM_ERROR("parse_vx_px failed. ret=%d\n", ret); + dp_link_parse_vx_px(link); - return ret; + return 0; } static u8 get_link_status(const u8 link_status[DP_LINK_STATUS_SIZE], int r) -- 2.31.0