Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1234989rwd; Tue, 16 May 2023 14:02:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ68NbvZi0VmB0NmiNrOfLKP4MgaLygZQdlwi2EPHJpjJKQPCGPQUfbOo/26uwqIhyWGS2B3 X-Received: by 2002:a05:6a00:1991:b0:643:5d7a:a898 with SMTP id d17-20020a056a00199100b006435d7aa898mr46779044pfl.0.1684270925691; Tue, 16 May 2023 14:02:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684270925; cv=none; d=google.com; s=arc-20160816; b=Uis3nkReCUkdr09alBlcNO0rZwj8Akr87OEG7QMujGB1IzjYKvKX821Gfkb97tI5db RpjksPFvnuzag9KXGPGzPPo4SimAALizmf9aa3E1TxXpPkqu/aaCnYbzd77Ny43wjLl/ fyxnjLTnqj1vBMaCuwQx6J91o3LjVfNj2XD6pDkMbQ9E7erDBMAPJ4TwN4xI23jrbgkv ekZc6j+azmWyMZ76gSf8i09efKeYHMRZi1J2oh0M3d2nO/EiMdviLl/FcRgjf5TnpXCS YLACdGKOqeQRsD1Xqka1MhFBpmLNZ8/82qK+9FJDtSeJ2tgNFRXxqs1XCm2KLBv5YoLs y9yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=h2EWJq5PD7hthUL4D4EqxOu6Tuk1TgfpFBJd9/8/nB0=; b=efls1xXbyWuXzZmPNqtLC2o+GD+99jtDCkx1w8Xw5i/MKE4wspiSv4j/r+sDZ3ON4u aepdo44OWOlhQFxDE634FZKHGJFSrb5eaaI579Vo9Jz7CsdWygw7hWjygQV5VsMZfka5 m4rusTaxtvFmJQJx6mlgVbMvsRXtg9nCV+sFaxY8UnKqQe38axvt7qRg0w0nQpooxd78 m4A8E0kt86FpiiuWgLAvK3cyeJF+1giudwvTCyNdA5cg2qkY2UsDKy3QQAmJV2i78SJd qgzVfDBVYdE+JiNpX0srMd6D8AG55CFQq/Ebv9uD8Ujewi2pO68pabHblZVdLIFjtS0r Tjsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 77-20020a621850000000b0063d2b810fcbsi20757673pfy.208.2023.05.16.14.01.52; Tue, 16 May 2023 14:02:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230116AbjEPUxP (ORCPT + 99 others); Tue, 16 May 2023 16:53:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjEPUxO (ORCPT ); Tue, 16 May 2023 16:53:14 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 4748759CB for ; Tue, 16 May 2023 13:53:13 -0700 (PDT) Received: (qmail 847804 invoked by uid 1000); 16 May 2023 16:53:12 -0400 Date: Tue, 16 May 2023 16:53:12 -0400 From: Alan Stern To: Arnd Bergmann Cc: Greg Kroah-Hartman , Arnd Bergmann , Sebastian Reichel , Andrew Morton , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: hide unused usbfs_notify_suspend/resume functions Message-ID: References: <20230516202103.558301-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230516202103.558301-1-arnd@kernel.org> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 16, 2023 at 10:17:42PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > The declaration is in an #ifdef, which causes warnings when building > with 'make W=1' and without CONFIG_PM: > > drivers/usb/core/devio.c:742:6: error: no previous prototype for 'usbfs_notify_suspend' > drivers/usb/core/devio.c:747:6: error: no previous prototype for 'usbfs_notify_resume' > > Use the same #ifdef check around the function definitions to avoid > the warnings and slightly shrink the USB core. > > Fixes: 7794f486ed0b ("usbfs: Add ioctls for runtime power management") > Signed-off-by: Arnd Bergmann > --- Acked-by: Alan Stern > drivers/usb/core/devio.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c > index e501a03d6c70..1622ad35428d 100644 > --- a/drivers/usb/core/devio.c > +++ b/drivers/usb/core/devio.c > @@ -738,6 +738,7 @@ static int driver_resume(struct usb_interface *intf) > return 0; > } > > +#ifdef CONFIG_PM > /* The following routines apply to the entire device, not interfaces */ > void usbfs_notify_suspend(struct usb_device *udev) > { > @@ -756,6 +757,7 @@ void usbfs_notify_resume(struct usb_device *udev) > } > mutex_unlock(&usbfs_mutex); > } > +#endif > > struct usb_driver usbfs_driver = { > .name = "usbfs", > -- > 2.39.2 >