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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E50BBC32793 for ; Wed, 18 Jan 2023 16:13:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229916AbjARQNF (ORCPT ); Wed, 18 Jan 2023 11:13:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbjARQMo (ORCPT ); Wed, 18 Jan 2023 11:12:44 -0500 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 61D6C53E7F for ; Wed, 18 Jan 2023 08:07:29 -0800 (PST) Received: (qmail 212028 invoked by uid 1000); 18 Jan 2023 11:07:28 -0500 Date: Wed, 18 Jan 2023 11:07:28 -0500 From: Alan Stern To: Arnd Bergmann Cc: Greg Kroah-Hartman , Kevin Hilman , Arnd Bergmann , Tony Lindgren , Felipe Balbi , Ard Biesheuvel , Janusz Krzysztofik , linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: ohci-omap: avoid unused-variable warning Message-ID: References: <20230118082746.391542-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230118082746.391542-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 18, 2023 at 09:27:34AM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > 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 > --- Acked-by: Alan Stern > The patch that caused the issue is in the boardfile-removal branch > of the soc tree. I would just add the patch there.