Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1011238ybj; Thu, 7 May 2020 12:38:33 -0700 (PDT) X-Google-Smtp-Source: APiQypLnwGuXxgKm2zfT2xwAzl8u7j9MfAbCL4POh07UvBNiAfwSICPbNI1kR0MyZi5OFSRMHLWx X-Received: by 2002:a17:906:2296:: with SMTP id p22mr13610894eja.269.1588880313500; Thu, 07 May 2020 12:38:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588880313; cv=none; d=google.com; s=arc-20160816; b=qi2Sh3M4FvMj6h/9c+JnHHP+EBkA8ibjUOE+TlauYYwoVzraTHNmlcZnQKgS0rLrUA q6D1ItkGEBlBmaLOLT74BnnZL3yCikm6LB/7l+kwO0sp4kiaehklyuld1+0oChbQaLDP SNwGG2vUWvqJ2gmBw8OXsuKP1KytbAd5fsMJTfiZkW35dcsTf7aZ5OHTIjg4lWFZRkMb zPdjt5b8H6bvtJn75mWAXfhjWnB4Q3jcempqSw1qJf3csn5uJ3UZt4hhhJSTbaqgN8NU dCMZp2DG7IceDSCuqnUdzkhkan7Ryc7GJ5DoIZUm8zuU3IkLgzEQJVLGazmCqHevT95R d9Jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sPW4CK7OR/eqFHRLBEIEsrbWm8BRZpXSUtYnRNfi4pY=; b=bubStucCfAQ4tNfYaKm4W09uaCWsdXAo0f6cVvNFtF/ff7OUuNGOPwP1bZXJmah0Gn Qe7kG+Zon3NlCVLieChiVHz4L0B55bFbowfhpmXSN5me1Dlgyxamosbm3oGOcPtW9JJK yRs0B8Il77PYS4mHM/b4dnt8sL96NQMWq+eTfARH9UM8Yx/ipC2BQlhM0rpi+3WS4BC2 F3HegFGywmqGPayhnlgOE8d/+3LCV3dbuqAFmk3XJS1XiaezVjt1wiBwlj5a3dHOQqtr ZFOKqFJ3VScgM1ebIzzGL4k2DaADQ+Qhc6pOQ3WiU5HmUyeE7oDYyVp8bMUwe+FG2Z4+ ZD9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qxSScwYW; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si3470313eds.554.2020.05.07.12.38.09; Thu, 07 May 2020 12:38:33 -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=@gmail.com header.s=20161025 header.b=qxSScwYW; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728397AbgEGTgM (ORCPT + 99 others); Thu, 7 May 2020 15:36:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726470AbgEGTgL (ORCPT ); Thu, 7 May 2020 15:36:11 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F29BC05BD43 for ; Thu, 7 May 2020 12:36:10 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id j5so7798588wrq.2 for ; Thu, 07 May 2020 12:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sPW4CK7OR/eqFHRLBEIEsrbWm8BRZpXSUtYnRNfi4pY=; b=qxSScwYWuPpzH/RkFnyM8ln4aSwLFEWBqwRkfBedY18y68OZBuf1kLVFgmm8q67GfK lfMsP0PgZju31IV8YWMyuhuHc70Q57Z9V7UpGW0u+GVK8tOa6ksQ7FU3wVZSBxY4GQv+ wdlVOqiEDLmllXeykL9RpUZxPfoRB7WbOETGRVijjlH+237kMDJUjGhgN6Ca5dZN8LMN 82o5yexw2JTQaAlJ0gt0ussG6jh95rRWJINwZdq417OpIZCXYbDXHC57Ngkj7ri01/he CgC4nfliK8Y97BGY5iVfauqn/Tzg7d1+xLB1e1k39eMhMYyZq5XA4pdY2u1iglQmaljN jPog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sPW4CK7OR/eqFHRLBEIEsrbWm8BRZpXSUtYnRNfi4pY=; b=GIjb60qtxxNimj/4WVO1rEPRhkcPmhxpL9q4rnF1/WSDL6qJKTHQbg6LchhttiOSyi V84GPo9y4hBLMBX+61qfepwm+fbD+WR3IPWox/2kUjQwc7ONPQQIBKuGtF8CU3uHGnSk edQxzdIqTUkIg03Ys9vt9FnMZXcOvwnsh2cssNgAum/WqnBcUSHmBoZYG7zlSKQx0nDh 1Gto76znE9qusQUmJOIVI6fUk5RqUWa5DpZ6UjSsdu25Zc5sPOZa7Gu2Ks9oj4p35Hzp o9UbIA+I7zx6jSbXP8hvplbIy3HiNmAe6Gz2y89P3R/HruqLgt4OzqWwVtxeg/S3rVR4 Ww+Q== X-Gm-Message-State: AGi0PubB4y00CJ0jDYAooPcVfhsLBHkmX1liK9nZLNAHhBFApWJWptiz mwRgu5MA2FJBIPNb13kF1e7ZTZNLX5gWmJNuDcPg/A== X-Received: by 2002:adf:ee86:: with SMTP id b6mr18453318wro.419.1588880169326; Thu, 07 May 2020 12:36:09 -0700 (PDT) MIME-Version: 1.0 References: <20200507110703.37509-1-yanaijie@huawei.com> In-Reply-To: <20200507110703.37509-1-yanaijie@huawei.com> From: Alex Deucher Date: Thu, 7 May 2020 15:35:58 -0400 Message-ID: Subject: Re: [PATCH] drm/amd/display: remove variable "result" in dcn20_patch_unknown_plane_state() To: Jason Yan Cc: "Wentland, Harry" , "Leo (Sunpeng) Li" , "Deucher, Alexander" , Christian Koenig , Chunming Zhou , Dave Airlie , Daniel Vetter , amd-gfx list , Maling list - DRI developers , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Applied thanks! Alex On Thu, May 7, 2020 at 9:35 AM Jason Yan wrote: > > 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 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx