From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8379DC63777 for ; Mon, 30 Nov 2020 18:47:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44DDA20705 for ; Mon, 30 Nov 2020 18:47:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbgK3Srk (ORCPT ); Mon, 30 Nov 2020 13:47:40 -0500 Received: from asavdk3.altibox.net ([109.247.116.14]:38086 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbgK3Srk (ORCPT ); Mon, 30 Nov 2020 13:47:40 -0500 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 asavdk3.altibox.net (Postfix) with ESMTPS id BC0D72002C; Mon, 30 Nov 2020 19:46:49 +0100 (CET) Date: Mon, 30 Nov 2020 19:46:48 +0100 From: Sam Ravnborg To: Thomas Zimmermann Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Lee Jones , Vaibhav Gupta , Tetsuo Handa , Laurent Pinchart , Jiri Slaby , Arnd Bergmann , Florian Tobias Schandinat , Evgeny Novikov , Saeed Mirzamohammadi , Daniel Vetter , Thomas Winischhofer , Bartlomiej Zolnierkiewicz , Jani Nikula , Aditya Pakki , Xiaofei Tan , Nathan Chancellor , Alex Dewar , Jason Yan , Greg Kroah-Hartman , Qilong Zhang , Randy Dunlap , Gustavo Silva , Peter Rosin , George Kennedy , Kristoffer Ericson , Alexander Klimov , Jingoo Han , Joe Perches , Peilin Ye , Mike Rapoport Subject: Re: [PATCH v2 21/28] video: fbdev: tmiofb: Fix set but not used warnings Message-ID: <20201130184648.GA1502362@ravnborg.org> References: <20201128224114.1033617-1-sam@ravnborg.org> <20201128224114.1033617-22-sam@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=Ibmpp1ia c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=8nJEP1OIZ-IA:10 a=7gkXJVJtAAAA:8 a=QyXUC8HyAAAA:8 a=KKAkSRfTAAAA:8 a=kG_Li1YSC5bgHzEcAboA:9 a=wPNLvfGTeEIA:10 a=E9Po1WZjFZOl8hwRPBS3:22 a=cvBusfyB2V15izCimMoJ:22 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Hi Thomas, On Mon, Nov 30, 2020 at 03:36:44PM +0100, Thomas Zimmermann wrote: > > > Am 28.11.20 um 23:41 schrieb Sam Ravnborg: > > Fix W=1 warnings by avoiding local variables and use direct references. > > What's the bug here? sh define iounmap like this: #define iounmap(addr) do { } while (0) So par is not used resulting in a warning. My patch just papers over the real issue. The right fix is to fix sh so we reference addr. Will give that a shot. Sam > > > > > v2: > > - Updated subject (Lee) > > > > Signed-off-by: Sam Ravnborg > > Cc: Daniel Vetter > > Cc: Sam Ravnborg > > Cc: Jani Nikula > > Cc: Lee Jones > > --- > > drivers/video/fbdev/tmiofb.c | 6 ++---- > > 1 file changed, 2 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/video/fbdev/tmiofb.c b/drivers/video/fbdev/tmiofb.c > > index 50111966c981..b70faa3850f2 100644 > > --- a/drivers/video/fbdev/tmiofb.c > > +++ b/drivers/video/fbdev/tmiofb.c > > @@ -802,10 +802,8 @@ static int tmiofb_remove(struct platform_device *dev) > > const struct mfd_cell *cell = mfd_get_cell(dev); > > struct fb_info *info = platform_get_drvdata(dev); > > int irq = platform_get_irq(dev, 0); > > - struct tmiofb_par *par; > > if (info) { > > - par = info->par; > > unregister_framebuffer(info); > > tmiofb_hw_stop(dev); > > @@ -816,8 +814,8 @@ static int tmiofb_remove(struct platform_device *dev) > > free_irq(irq, info); > > iounmap(info->screen_base); > > - iounmap(par->lcr); > > - iounmap(par->ccr); > > + iounmap(((struct tmiofb_par *)info->par)->lcr); > > + iounmap(((struct tmiofb_par *)info->par)->ccr); > > framebuffer_release(info); > > } > > > > -- > Thomas Zimmermann > Graphics Driver Developer > SUSE Software Solutions Germany GmbH > Maxfeldstr. 5, 90409 Nürnberg, Germany > (HRB 36809, AG Nürnberg) > Geschäftsführer: Felix Imendörffer >