lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6be8f99-30dc-4528-9cba-34c0ee25929f@rowland.harvard.edu>
Date:   Tue, 16 May 2023 16:53:12 -0400
From:   Alan Stern <stern@...land.harvard.edu>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Arnd Bergmann <arnd@...db.de>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: hide unused usbfs_notify_suspend/resume functions

On Tue, May 16, 2023 at 10:17:42PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> 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 <arnd@...db.de>
> ---

Acked-by: Alan Stern <stern@...land.harvard.edu>

>  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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ