Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3575366ybz; Mon, 4 May 2020 05:48:12 -0700 (PDT) X-Google-Smtp-Source: APiQypIO4pGYMviKWuVEsuwdv1kQaRjCcmRgtKOtIvf4GNPeNIX6hsi+KBcCMbKrivhbVcMOXWh9 X-Received: by 2002:a50:eacb:: with SMTP id u11mr14153479edp.162.1588596492173; Mon, 04 May 2020 05:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596492; cv=none; d=google.com; s=arc-20160816; b=S09CZhXDjCMMnxcF2//eRROCiOFFdA4qVYA3j70qEnZXAbufTAGFUTNVjnH3eGDdZW XkVnE7Csf96LnQADo5B3rvXRI4ePUfHRc1gxdFRNahzksEDNwzsps/bU86ttneJ9Clfl OrbTzY+ECJ5V1tOL8E5tzZA0/0+BhJbucyhi834bHr8UDpK/+ML3nnTslq4FbiI8xwSY S263ImsMD5UJsk3aOsAzJFRHLJZmcauLeTPzwLzMg0bjMVwzYyFccFRVXtHQLww6fPC4 plRv4kg5stMzTFHkGHDym4F80nPu3V3i6pkikkKBEyj92GHiEx7lk7CRB4ybZ8RbZB3H PFug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=hFyXEbbqzhz9fUXX9uyKeYdYHhZoSjOq1hIva5CM3B8=; b=G4muCGAwFuVSOgSx1/oHQnOiVQFMtdirrCZKQeFplFTiTdzsBcZvjqT3/MKDQ8Gt1/ I3ld9lc0unBFDnP9ZzpjUMNg//ZASJRXwWa0LUVxmxgs+/tsVB4oiqx/lmQK0AOQ+H5Q g1BXcH/EA2m2GIXTN5PUIPOsRBKc+Njb3oWtv/vWPKNQFhdnnegXJyHuaB3uZJ4VZLye 2apzHjfqxSfSx+oo8LfLXTHczI1VVE6o0hd4EU04XJjG38e8haW5c7CvXySObUHRKcyL na3VU1w4pqOIN/ES0ovNhKX+HOaPnYlAnhPesSQ+5wPGKZ8+J+dLRNdTmh1soKQk50CT jbvQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si7003839edt.393.2020.05.04.05.47.48; Mon, 04 May 2020 05:48:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728518AbgEDLcu (ORCPT + 99 others); Mon, 4 May 2020 07:32:50 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3403 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726445AbgEDLcu (ORCPT ); Mon, 4 May 2020 07:32:50 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id CAA0FA6325385DFE95C3; Mon, 4 May 2020 19:32:45 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 4 May 2020 19:32:38 +0800 From: Jason Yan To: , , , , , , , , CC: Jason Yan Subject: [PATCH] drm/msm/dpu: make _dpu_core_perf_crtc_update_bus() void Date: Mon, 4 May 2020 19:32:01 +0800 Message-ID: <20200504113201.40302-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This function does not need to return an error so make it return void. This fixes the following coccicheck warning: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:178:5-8: Unneeded variable: "ret". Return "0" on line 193 Signed-off-by: Jason Yan --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c index 11f2bebe3869..12df1955b1ef 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c @@ -167,7 +167,7 @@ int dpu_core_perf_crtc_check(struct drm_crtc *crtc, return 0; } -static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms, +static void _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms, struct drm_crtc *crtc) { struct dpu_core_perf_params perf = { 0 }; @@ -175,7 +175,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms, = dpu_crtc_get_client_type(crtc); struct drm_crtc *tmp_crtc; struct dpu_crtc_state *dpu_cstate; - int ret = 0; drm_for_each_crtc(tmp_crtc, crtc->dev) { if (tmp_crtc->enabled && @@ -190,7 +189,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms, dpu_cstate->new_perf.bw_ctl); } } - return ret; } /** @@ -335,14 +333,8 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc, trace_dpu_perf_crtc_update(crtc->base.id, new->bw_ctl, new->core_clk_rate, stop_req, update_bus, update_clk); - if (update_bus) { - ret = _dpu_core_perf_crtc_update_bus(kms, crtc); - if (ret) { - DPU_ERROR("crtc-%d: failed to update bus bw vote\n", - crtc->base.id); - return ret; - } - } + if (update_bus) + _dpu_core_perf_crtc_update_bus(kms, crtc); /* * Update the clock after bandwidth vote to ensure -- 2.21.1