Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1515362ybj; Tue, 5 May 2020 23:23:09 -0700 (PDT) X-Google-Smtp-Source: APiQypLPd7SvRmMIO/u4tz7dw+IbmAV/8lJAAFOdFSEpFzD4ROKolKpBtS605VRlek/v70DIwrSW X-Received: by 2002:aa7:df92:: with SMTP id b18mr5521980edy.238.1588746189423; Tue, 05 May 2020 23:23:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588746189; cv=none; d=google.com; s=arc-20160816; b=v7oJzAdn29qySEu5ulvGems4X7gJN2WXJ0gVnOX2yuOPmB+YvhIpBY7duTFthQTqQ3 lfkQ3mKMHdt8LsdcvBTsqsHlDoQrBmdWOTb4Zra4MfzTvC2S792zKtL+gl1fwuhgglK3 qV5JR4LWpEu6KN+dM49yz82hoQ+mMGMv9HVkyxpK+3IVWOuv1ASBK7fubTJuhLak79+x eEeKmBd0nyCu7vLPGQ3MWzTTjPiaTfBtsd37nAdRZimLpS+x3G/P2GaLFJtBGf/HSxyH JJYRY1xKQocgjlen8ysctTfYquEBt5RTq//4AUEqssmJP3joci4LFWSObVDTM9GR0V2H 1log== 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=bCuXMm5QSnF3Nn2goarVS7GaxP+sCIaTvrqLW9ioLR8=; b=ESmeiQU8DuxQySEIVXdHowGl3UCNc6xsgO/DfINqMjnzJEzJsYZBg980eozbDse93s 5Lid+bVf+f/nnOK2T0laZ4frUQVjr7MvsiVHSnCQqphauSVB3Sooy9KDXILGk+ovEiZO d2ucrc2ikFEcwsemCdR+QJcW4e+DEMswLqSITD6uXBDt5JOGlaEbDHQHn7bWUoN1Igi0 3et4Jq1YWwIc0PGLKPXlf7w3KbGKouHcCZQO7HDup8C/Q0VQOAj0mf9iZXjV0Pjpkwg8 SBRXQ8elOD8Lt17O5AYTlPXh6lAriBqXwphjlD87a4r52c2R/3ugsIqqHK14DfgY12kY GgEg== 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 pv20si638045ejb.295.2020.05.05.23.22.46; Tue, 05 May 2020 23:23:09 -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 S1727992AbgEFGSe (ORCPT + 99 others); Wed, 6 May 2020 02:18:34 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:50022 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727084AbgEFGSd (ORCPT ); Wed, 6 May 2020 02:18:33 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3A1678CC74D9F94A02ED; Wed, 6 May 2020 14:18:30 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 6 May 2020 14:18:23 +0800 From: Jason Yan To: , , , CC: Jason Yan Subject: [PATCH] video: fbdev: pxa168fb: make pxa168fb_init_mode() return void Date: Wed, 6 May 2020 14:17:45 +0800 Message-ID: <20200506061745.19451-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 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 --- 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