Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1837885pxu; Sat, 17 Oct 2020 02:54:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3MLyIDVQRpsYuYkVjHRuciiOoozdECG7EIttUFFJq2rHl2FbRN6Prl0cev0xpimbZJTVq X-Received: by 2002:a17:906:b291:: with SMTP id q17mr7838155ejz.455.1602928445699; Sat, 17 Oct 2020 02:54:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602928445; cv=none; d=google.com; s=arc-20160816; b=l/QRo4TM6PZAMaFi5T829o/bVCdnrJWeQFVQyajPd3tj7U8zIa/tfFm+oQ0Vb/dftN Uz6x3TkE8WEPDQlSURSVO0uGPThlj/rOSIMpOxBtWL86MWsbU7LOCaS/ZznccQqX1pX+ cD/SSMjqaHK1xWBtPQxW6OBrE24gIc9VsaYGvxXHV5jVd1xXAM9zVWDEb6XS0B1zy88I Oyy2lChCpE6tj4/5Y6GQiTLrUrPlf3LNeNCrPYLRiWMV8Ns98RbmtzDm0vAWMUnRL/I+ 3aHTIaXyj/CaB6xi5+OseTvyoBm8JaLqSbodKctzjt9Abgcmq9a2HGBbiXy/FDiT5LE+ NQtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=7HtNekmrhFY6yk9CxPE/DQBvbRYw4nMD/YvcE6BFEKM=; b=pf5rnRWGdlle8gLZ33dHl1Mw8vMSQzSv9C1IEjLPoIaiTCOy5zr+lk54O4a7DHx3ft llYwG1T/0cedl2gWhdtiSZ4eNTrObJInLy0sf3xPNaGjKzzDaTK1OuuSC65x+nYAtiRB SCO+jYFMPJvGooE9sNERdGvKhjerIutjEwi1Wy/bLzwRSx5AurN8pLhFM6zy6+xT32yJ ZHOHr//HZsgT/M5I4abFG+WGwp7OcZgNeoQ6B+hsELp8QxedmFJ7eUsmfMIXEyA7qbMq W91Stx/UiTwwik47eI/VNu9iBjwY1GWB8EHWPxEX0utxyZ0ElJx5i3HEAf0GDEyX6YMS dQag== 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 y12si3626752edo.479.2020.10.17.02.53.43; Sat, 17 Oct 2020 02:54:05 -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 S2436891AbgJQG2y (ORCPT + 99 others); Sat, 17 Oct 2020 02:28:54 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:60696 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436851AbgJQG2y (ORCPT ); Sat, 17 Oct 2020 02:28:54 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id B2E4480575; Sat, 17 Oct 2020 08:28:51 +0200 (CEST) Date: Sat, 17 Oct 2020 08:28:50 +0200 From: Sam Ravnborg To: Jason Yan Cc: timur@kernel.org, b.zolnierkie@samsung.com, gustavoars@kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Hulk Robot Subject: Re: [PATCH] video: fbdev: fsl-diu-fb: remove unneeded variable 'res' Message-ID: <20201017062850.GH2242298@ravnborg.org> References: <20200910140558.1191423-1-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910140558.1191423-1-yanaijie@huawei.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=fu7ymmwf c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=i0EeH86SAAAA:8 a=e5mUnYsNAAAA:8 a=0y_l-WQFCCuusZHaQSsA:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 10:05:58PM +0800, Jason Yan wrote: > Eliminate the following coccicheck warning: > > drivers/video/fbdev/fsl-diu-fb.c:1428:5-8: Unneeded variable: "res". > Return "0" on line 1450 > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan Hi Jason, applied to drm-misc-next too. Sam > --- > drivers/video/fbdev/fsl-diu-fb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c > index a547c21c7e92..e332017c6af6 100644 > --- a/drivers/video/fbdev/fsl-diu-fb.c > +++ b/drivers/video/fbdev/fsl-diu-fb.c > @@ -1425,7 +1425,6 @@ static int fsl_diu_open(struct fb_info *info, int user) > static int fsl_diu_release(struct fb_info *info, int user) > { > struct mfb_info *mfbi = info->par; > - int res = 0; > > spin_lock(&diu_lock); > mfbi->count--; > @@ -1447,7 +1446,7 @@ static int fsl_diu_release(struct fb_info *info, int user) > } > > spin_unlock(&diu_lock); > - return res; > + return 0; > } > > static const struct fb_ops fsl_diu_ops = { > -- > 2.25.4 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel