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 9ADFFC63777 for ; Mon, 30 Nov 2020 18:46:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F115A20705 for ; Mon, 30 Nov 2020 18:46:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F115A20705 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 33CBB6E7DC; Mon, 30 Nov 2020 18:46:56 +0000 (UTC) Received: from asavdk3.altibox.net (asavdk3.altibox.net [109.247.116.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 10D026E7DC for ; Mon, 30 Nov 2020 18:46:54 +0000 (UTC) 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 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-Disposition: inline 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Vaibhav Gupta , Tetsuo Handa , Daniel Vetter , dri-devel@lists.freedesktop.org, Laurent Pinchart , Jiri Slaby , Florian Tobias Schandinat , Evgeny Novikov , Lee Jones , Jani Nikula , Aditya Pakki , Arnd Bergmann , Bartlomiej Zolnierkiewicz , Saeed Mirzamohammadi , Thomas Winischhofer , Xiaofei Tan , Nathan Chancellor , Alex Dewar , Jason Yan , Greg Kroah-Hartman , Qilong Zhang , Randy Dunlap , Gustavo Silva , Peilin Ye , George Kennedy , Kristoffer Ericson , Alexander Klimov , Jingoo Han , Joe Perches , Peter Rosin , Mike Rapoport Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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=3D1 warnings by avoiding local variables and use direct reference= s. > = > 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 *d= ev) > > const struct mfd_cell *cell =3D mfd_get_cell(dev); > > struct fb_info *info =3D platform_get_drvdata(dev); > > int irq =3D platform_get_irq(dev, 0); > > - struct tmiofb_par *par; > > if (info) { > > - par =3D info->par; > > unregister_framebuffer(info); > > tmiofb_hw_stop(dev); > > @@ -816,8 +814,8 @@ static int tmiofb_remove(struct platform_device *de= v) > > 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=FCrnberg, Germany > (HRB 36809, AG N=FCrnberg) > Gesch=E4ftsf=FChrer: Felix Imend=F6rffer > = _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel