Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp653574ybk; Sat, 9 May 2020 14:11:17 -0700 (PDT) X-Google-Smtp-Source: APiQypJ8fLeJiNsohGvhH6414FXOAozoHYby76McKoP8KTi3Fu8SPs5xORzajt4R4m3aqzS6rJle X-Received: by 2002:a17:906:3291:: with SMTP id 17mr7339986ejw.343.1589058677621; Sat, 09 May 2020 14:11:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589058677; cv=none; d=google.com; s=arc-20160816; b=v+eb71mUbX5UOMdRDimC8zLDx0xU0EDRkIdzX70Ke0mpHAWUuw9cAO0kQTLvNt9Ck+ ZMD+WyzS1EAQKoAWLPbmZrszDo8OeqJfASSHPLjZ2A63GT/EkMTGYVxIFPNWtZvsSv7d 6DuMqbheakdO5NpOIT3O5ZUCOIEg78wY8yDQl20OANb6JiVFjFS4iJsfSBmVHChpyCYJ hXobCmaZ/CY0zlTdmss4LtkFzdr2dhGDf8ruQFbI+LNtSncmHqMwnktjlAIOiu1qiMS7 EwN2SZpl7sEpzOr580ItGZDbv+YBOUZOCPTA5CW0ahg4vGB3HPZspQfPINs6BWFGstvE f2Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kvy+AUzofRRjDo2rbJIm2a2IogvOXljViMTialT1odU=; b=Ue5z4QGYh2jY23fRStL7hVhBvlOJcOxNPgT246n4JUYwgubUJZiK55d9GHyYEWoNUd 5+44vqvS2PI91zkA5leMmiAtdJkNgRhCKmIQLNvpNf5UExvbdnUuFqMMT2wyYyiTUxV8 ccgfNfcf94xvaH7Pu929dYAhjyQ86ZBnrtAeHHIfi+gKE2Q67xSPUR/Hq4+4QKtNowXD SWROu/h9JKhkzcDmFTlCbWEbcK99oYq7PL48b8nvQ/sa0owkBtx2q6mqvAkl33onL6LS g+tpEGzcyBKj38Nk3NvTYi62Km9pzDeIk/uaJW5m4O3MrV6jKT4aHKqk2qNBlqhs6VCM bQjQ== 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 w14si3315257edl.600.2020.05.09.14.10.54; Sat, 09 May 2020 14:11:17 -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 S1728420AbgEIVJ3 (ORCPT + 99 others); Sat, 9 May 2020 17:09:29 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:45488 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728187AbgEIVJ2 (ORCPT ); Sat, 9 May 2020 17:09:28 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 25EB42003E; Sat, 9 May 2020 23:09:26 +0200 (CEST) Date: Sat, 9 May 2020 23:09:24 +0200 From: Sam Ravnborg To: Jason Yan Cc: b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] video: fbdev: pxa168fb: make pxa168fb_init_mode() return void Message-ID: <20200509210924.GB12666@ravnborg.org> References: <20200506061745.19451-1-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200506061745.19451-1-yanaijie@huawei.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=ULXz4hXy c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=i0EeH86SAAAA:8 a=e5mUnYsNAAAA:8 a=LIjMPlzXlnp3mKN0Lz4A:9 a=CjuIK1q_8ugA:10 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jason. On Wed, May 06, 2020 at 02:17:45PM +0800, Jason Yan wrote: > No other functions use the return value of pxa168fb_init_mode() and the > return value is always 0 now. Make it return void. This fixes the > following coccicheck warning: > > drivers/video/fbdev/pxa168fb.c:565:5-8: Unneeded variable: "ret". Return > "0" on line 597 > > Signed-off-by: Jason Yan Thanks, applied to drm-misc-next. Sam > --- > drivers/video/fbdev/pxa168fb.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/video/fbdev/pxa168fb.c b/drivers/video/fbdev/pxa168fb.c > index aef8a3042590..eedfbd3572a8 100644 > --- a/drivers/video/fbdev/pxa168fb.c > +++ b/drivers/video/fbdev/pxa168fb.c > @@ -557,12 +557,11 @@ static const struct fb_ops pxa168fb_ops = { > .fb_imageblit = cfb_imageblit, > }; > > -static int pxa168fb_init_mode(struct fb_info *info, > +static void pxa168fb_init_mode(struct fb_info *info, > struct pxa168fb_mach_info *mi) > { > struct pxa168fb_info *fbi = info->par; > struct fb_var_screeninfo *var = &info->var; > - int ret = 0; > u32 total_w, total_h, refresh; > u64 div_result; > const struct fb_videomode *m; > @@ -593,8 +592,6 @@ static int pxa168fb_init_mode(struct fb_info *info, > div_result = 1000000000000ll; > do_div(div_result, total_w * total_h * refresh); > var->pixclock = (u32)div_result; > - > - return ret; > } > > static int pxa168fb_probe(struct platform_device *pdev) > -- > 2.21.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel