Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp635848ybj; Thu, 7 May 2020 04:12:13 -0700 (PDT) X-Google-Smtp-Source: APiQypKcgD45IARPT184IyFBn1q8CmFW1KpSTftnWcuTaPMtfhKogj4gAPwlyhWKnT2td6ngd/L1 X-Received: by 2002:aa7:c649:: with SMTP id z9mr11516006edr.288.1588849933783; Thu, 07 May 2020 04:12:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588849933; cv=none; d=google.com; s=arc-20160816; b=yPcwPt69P2pnF5aOB/vAIeWt2PWvyvN9DAEheaZKt85rcOX6VYlMH9cBwJ67qnexRf kuYoTK0/8vmSWalTHWkc4jsZ1dxxiN8bLvGI5IwtC1LxwWMnhaEDvXK4LTIaRZuJuaqf YRfoyYDcAGZ8DC73bcutvGABUq5LeNsXESsRHlYIoLNNrcahRd7jYh3+s+5tTWI3rM6L OxURqPAxaRgfqaPJBrA77YqAON5G0NZANLvqaIkzGQWbp0NxtGYTCBvRaMk15uXfAb6E 61wGEQ/ZEBTjMHPocNe46UxEA2qewuyLPuw2D5RvEk65sEPc6bi4Xct6ccKHDbiJ5gGb 0Dxw== 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=1tQW1eFLVzTRh/8llK9Ej4mKzO9rr5Gl7jXlz8GTtyg=; b=w9B5VXxZCg1g456QQGaxgKgTnliekJGy5avFm4lUR6ywVonmnumkXv1XHJILU7M5qr tuHBOFg8EIA5u0whBWPKMuOmuAQrvgS3zoo1rCb+IcDl0I0+sIUKG7elIQ0IEvn0+9oE FhAdSvuZOpDu7d9G2Pe8nYJiKrQ9gA2eB3rj1vSUF0PSropm/9j14vrIBs0vSIYaL4mv sanYPCepobtSrHOijbDwGNL+n7YVUp7b+K2NtWULF2VZsfnnA3lhsUsQvRd1EOkM8sqx Eb9WC9s/H3w8LDN5+jW7PsTmUnHQH/zQhwqVBBrTbac47IAAlzRilUuaKsFu/ZRiiosm z9SQ== 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 y7si2780711edv.512.2020.05.07.04.11.50; Thu, 07 May 2020 04:12:13 -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 S1726761AbgEGLHv (ORCPT + 99 others); Thu, 7 May 2020 07:07:51 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:39292 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725949AbgEGLHu (ORCPT ); Thu, 7 May 2020 07:07:50 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1376A673389A9E16E1A2; Thu, 7 May 2020 19:07:49 +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; Thu, 7 May 2020 19:07:42 +0800 From: Jason Yan To: , , , , , , , , , CC: Jason Yan Subject: [PATCH] drm/amd/display: remove variable "result" in dcn20_patch_unknown_plane_state() Date: Thu, 7 May 2020 19:07:03 +0800 Message-ID: <20200507110703.37509-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 Fix the following coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c:3216:16-22: Unneeded variable: "result". Return "DC_OK" on line 3229 Signed-off-by: Jason Yan --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c index 4dea550c3f83..3c0090797866 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c @@ -3228,8 +3228,6 @@ static struct dc_cap_funcs cap_funcs = { enum dc_status dcn20_patch_unknown_plane_state(struct dc_plane_state *plane_state) { - enum dc_status result = DC_OK; - enum surface_pixel_format surf_pix_format = plane_state->format; unsigned int bpp = resource_pixel_format_to_bpp(surf_pix_format); @@ -3241,7 +3239,7 @@ enum dc_status dcn20_patch_unknown_plane_state(struct dc_plane_state *plane_stat swizzle = DC_SW_64KB_S; plane_state->tiling_info.gfx9.swizzle = swizzle; - return result; + return DC_OK; } static struct resource_funcs dcn20_res_pool_funcs = { -- 2.21.1