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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025061950-frown-cesarean-a1e3@gregkh>
Date: Thu, 19 Jun 2025 06:01:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Seungjin Bae <eeodqql09@...il.com>
Cc: Mathias Nyman <mathias.nyman@...el.com>, linux-usb@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: host: xhci-plat: fix incorrect type for of_match
 variable in xhci_plat_probe()

On Wed, Jun 18, 2025 at 03:27:14PM -0400, Seungjin Bae wrote:
> From: pip-izony <eeodqql09@...il.com>

This line doesn't match up with:

> 
> The variable `of_match` was incorrectly declared as a `bool`.
> It is assigned the return value of of_match_device(), which is a pointer of
> type `const struct of_device_id *`.
> 
> Fixes: 16b7e0cccb243 ("USB: xhci-plat: fix legacy PHY double init")
> 
> Signed-off-by: Seungjin Bae <eeodqql09@...il.com>

That line :(

Also, no need for a blank line after Fixes:

Also:

> ---
>  drivers/usb/host/xhci-plat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
> index 6dab142e7278..49eb874b1d81 100644
> --- a/drivers/usb/host/xhci-plat.c
> +++ b/drivers/usb/host/xhci-plat.c
> @@ -152,7 +152,7 @@ int xhci_plat_probe(struct platform_device *pdev, struct device *sysdev, const s
>  	int			ret;
>  	int			irq;
>  	struct xhci_plat_priv	*priv = NULL;
> -	bool			of_match;
> +	const struct of_device_id *of_match;
>  
>  	if (usb_disabled())
>  		return -ENODEV;
> -- 
> 2.43.0
> 
> Hello Greg,
> 
> Thank you for your review and the helpful feedback.
> 
> I've corrected Signed-off-by line to use my real name.
> I also updated Fixes tag in the commit.
> 
> Regarding the original issue:
> I'm not exactly sure why the compiler didn't catch this,
> but I assume implicit casting from pointer to bool is allowed in this context.

That info should go below the --- line, and this is a version 2 of this
change, right?  Take a look at the kernel documentation for how to
number your patch revisions.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ