[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y8gZQPmdpY+jCXC2@rowland.harvard.edu>
Date: Wed, 18 Jan 2023 11:07:28 -0500
From: Alan Stern <stern@...land.harvard.edu>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kevin Hilman <khilman@...libre.com>,
Arnd Bergmann <arnd@...db.de>,
Tony Lindgren <tony@...mide.com>,
Felipe Balbi <felipe.balbi@...ux.intel.com>,
Ard Biesheuvel <ardb@...nel.org>,
Janusz Krzysztofik <jmkrzyszt@...il.com>,
linux-usb@...r.kernel.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: ohci-omap: avoid unused-variable warning
On Wed, Jan 18, 2023 at 09:27:34AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> The dead code removal has led to 'need_transceiver' not being
> used at all when OTG support is disabled:
>
> drivers/usb/host/ohci-omap.c: In function 'ohci_omap_reset':
> drivers/usb/host/ohci-omap.c:99:33: error: unused variable 'need_transceiver' [-Werror=unused-variable]
> 99 | int need_transceiver = (config->otg != 0);
>
> Change the #ifdef check into an IS_ENABLED() check to make the
> code more readable and let the compiler see where it is used.
>
> Fixes: 8825acd7cc8a ("ARM: omap1: remove dead code")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
Acked-by: Alan Stern <stern@...land.harvard.edu>
> The patch that caused the issue is in the boardfile-removal branch
> of the soc tree. I would just add the patch there.
Powered by blists - more mailing lists