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: <b82feb96-0f5c-41e6-a472-667c8ae4f367@rowland.harvard.edu>
Date: Tue, 8 Apr 2025 13:00:58 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Zijun Hu <zijun_hu@...oud.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	Zijun Hu <quic_zijuhu@...cinc.com>
Subject: Re: [PATCH] USB: core: Correct API
 usb_(enable|disable)_autosuspend() prototypes

On Tue, Apr 08, 2025 at 08:08:51PM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@...cinc.com>
> 
> API usb_(enable|disable)_autosuspend() have inconsistent prototypes
> regarding if CONFIG_PM is defined.
> 
> Correct prototypes when the macro is undefined by referring to those
> when the macro is defined.
> 
> Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
> ---

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

>  include/linux/usb.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index b46738701f8dc46085f251379873b6a8a008d99d..1b2545b4363bcf3ef97a53a004ebf456eb9d5d05 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -815,10 +815,10 @@ static inline void usb_mark_last_busy(struct usb_device *udev)
>  
>  #else
>  
> -static inline int usb_enable_autosuspend(struct usb_device *udev)
> -{ return 0; }
> -static inline int usb_disable_autosuspend(struct usb_device *udev)
> -{ return 0; }
> +static inline void usb_enable_autosuspend(struct usb_device *udev)
> +{ }
> +static inline void usb_disable_autosuspend(struct usb_device *udev)
> +{ }
>  
>  static inline int usb_autopm_get_interface(struct usb_interface *intf)
>  { return 0; }
> 
> ---
> base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
> change-id: 20250408-fix_usb_hdr-8305358f42e1
> 
> Best regards,
> -- 
> Zijun Hu <quic_zijuhu@...cinc.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ