Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4876922pxj; Tue, 25 May 2021 19:47:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy29cuEePRWBXt58ERvsoWOSDl3ZbImzziXIqYFSZLQtLoz3VISBoajsqmFY3nvd3LO1+g4 X-Received: by 2002:a17:907:724b:: with SMTP id ds11mr31170060ejc.108.1621997230430; Tue, 25 May 2021 19:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621997230; cv=none; d=google.com; s=arc-20160816; b=YnEwSoci5hAWwTKZtSw+g9zMWTY9RW8nno6kUBoPNsNEQ+8J5YX98G16ELVnl23lgn zGEE2ThIHrZD4TT3K2IVHnwodUwr1lwwmNbTNxTjCxgbElgFBt/n4COUDzC/QIT0Tqlo HnT/QC+NdPlwFENugMXQJ9awO2rPMGIyENWCEM7lecZq8q6yy0ZUD1Buo2KxwQY0VMFD tC+IVTHz2Y2PRZjaSaK1RLyC3+qPpBDcfQUOW2Olxj1nrYsHkBooNOlUXCR86fsHwTgs wZghOXZZSIcGGMWi37xPzDGgZ8MiGa88TeawjpZkEot92IRrHef+Uohhmh1bWDqNyWWA Eklw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=++3NER/8q2jl+9nnQ5/5WI2wqMfqwPJ99Tc3glHslUM=; b=yLxkxG7l2+Ok6qdA9E9qpThp1XiEm14+69i1pxlnxzgnJDWYsxE0zAbp7OIoM8ylZl aUet1vzRt30nWvHKe2lZs8x4Q8nuTJ24nSHVSSXPF66PCA8tHu8MJfPXj7a7GjtBKc7u b/MIQpDIJP5hr/dLeJ8BrglE493DNAvPhdkszEU9PUAmZWMfAq0GGQoRRKe7ef0srqYD LRjFkZiUzZN6oYgZsR+bIThCVJQJGbuAq5iE0xAaJn7DqdB0iaxgoB0PM3uK3sQMetmS zFX+/quIEK8UfX1BS9smURIlggdzIzvrRg9Lh0kZNLjUny6qedNaITH20VW+/QJihf3m KUdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VjgkLIxr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si15968779eds.580.2021.05.25.19.46.41; Tue, 25 May 2021 19:47:10 -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; dkim=pass header.i=@linaro.org header.s=google header.b=VjgkLIxr; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230157AbhEZA4g (ORCPT + 99 others); Tue, 25 May 2021 20:56:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231721AbhEZA4f (ORCPT ); Tue, 25 May 2021 20:56:35 -0400 Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 047F7C061756 for ; Tue, 25 May 2021 17:55:03 -0700 (PDT) Received: by mail-lj1-x229.google.com with SMTP id s25so40539230ljo.11 for ; Tue, 25 May 2021 17:55:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=++3NER/8q2jl+9nnQ5/5WI2wqMfqwPJ99Tc3glHslUM=; b=VjgkLIxrlysMYoMxfxguP6+fPz3+tzoyDxW+tLGKvM4Y65vuxmWclT+z1Zhn1P4d8f rvsA5BMANFVKhcv6feEHwSMpQfJDveH1s/tq0+02ODMg/HBhtF1pjOisvnbny+ZfpPHG MfcHNTl3KK4muf9yDEnyx4bUQJEN2UxB1iybLM/H84/EqypNBUy7lTrj+l5WcKuwP4xL V40H832nGd97tXYQ0qVGRGwMLqRzKv2pZhXzMGwWv8TAxbA5PXLWtC6PY7xBsHMkmEp/ PatYxR9wUnL+okoP3w+ZY5pcayZR6e1Y6c/5bUKTT9tWvMlDogdW6S7N1v6x+Wi8WR1+ Ygew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=++3NER/8q2jl+9nnQ5/5WI2wqMfqwPJ99Tc3glHslUM=; b=LE8OvHjXFrxeKkhLdSe62vOfetfQR1GwqE6KTDwGJ+mBTCqqnwvwObXMvAZTxmBF5/ 8mVkcC0G+bOK5E7LJu7YKIbkZlzrhEshAFDmLj1YuaAdWPFyTwVI48RqKuB52VeYUUWg 39YG7sgosf9JnUFP6nfv3eSdTk0wd/SPWPh4nj8RUM6KZIbndUlOdsatA+vQH5ke18aU ITPpmJP/Mvr62YqgNjDTvR2ogfnkFQPw2IL/Nr81M+ip3IPJhZIwSw/qZhrKsY2D+k3g HFZ6DhZRq72QRZSiiSHoVuMsb2Wu4hSs4VuUqOtjLBeTeLx/drE8/CF04b1A1Kab25Qi fdDQ== X-Gm-Message-State: AOAM5303IZZwgAZP+nxdxILDyIO8znD1rfvrcNrbuD7tmEsQ94jfSzDA fR7mtxHFIwV46i1thEa4yHcPTN9YtEtozg== X-Received: by 2002:a2e:95cb:: with SMTP id y11mr214930ljh.461.1621990502032; Tue, 25 May 2021 17:55:02 -0700 (PDT) Received: from [192.168.1.211] ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id d15sm1873714lfa.137.2021.05.25.17.55.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 May 2021 17:55:01 -0700 (PDT) Subject: Re: [PATCH] drm/msm: remove unneeded variable ret To: Bernard Zhao , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Kuogee Hsieh , Stephen Boyd , Abhinav Kumar , Tanmay Shah , Chandan Uddaraju , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20210407130654.3387-1-bernard@vivo.com> From: Dmitry Baryshkov Message-ID: Date: Wed, 26 May 2021 03:55:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210407130654.3387-1-bernard@vivo.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/04/2021 16:06, Bernard Zhao wrote: > 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 Reviewed-by: Dmitry Baryshkov > --- > 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) > -- With best wishes Dmitry