All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0
       [not found] <20191027184210.GA20258@saurav>
@ 2019-10-28 18:26 ` Florian Fainelli
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2019-10-28 18:26 UTC (permalink / raw)
  To: Saurav Girepunje, alcooperx, kishon, linux-kernel,
	bcm-kernel-feedback-list
  Cc: saurav.girepunje

On 10/27/19 11:42 AM, Saurav Girepunje wrote:
> Compare pointer-typed values to NULL rather than 0
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0
@ 2019-10-28 20:29 Saurav Girepunje
  2019-10-30  5:08 ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 3+ messages in thread
From: Saurav Girepunje @ 2019-10-28 20:29 UTC (permalink / raw)
  To: alcooperx, kishon, linux-kernel, bcm-kernel-feedback-list
  Cc: saurav.girepunje

Compare pointer-typed values to NULL rather than 0

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.c b/drivers/phy/broadcom/phy-brcm-usb-init.c
index 3c53625f8bc2..2ea1e84b544b 100644
--- a/drivers/phy/broadcom/phy-brcm-usb-init.c
+++ b/drivers/phy/broadcom/phy-brcm-usb-init.c
@@ -707,7 +707,7 @@ static void brcmusb_usb3_otp_fix(struct brcm_usb_init_params *params)
 	void __iomem *xhci_ec_base = params->xhci_ec_regs;
 	u32 val;
 
-	if (params->family_id != 0x74371000 || xhci_ec_base == 0)
+	if (params->family_id != 0x74371000 || xhci_ec_base == NULL)
 		return;
 	brcmusb_writel(0xa20c, USB_XHCI_EC_REG(xhci_ec_base, IRAADR));
 	val = brcmusb_readl(USB_XHCI_EC_REG(xhci_ec_base, IRADAT));
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0
  2019-10-28 20:29 [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0 Saurav Girepunje
@ 2019-10-30  5:08 ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2019-10-30  5:08 UTC (permalink / raw)
  To: Saurav Girepunje, alcooperx, linux-kernel,
	bcm-kernel-feedback-list
  Cc: saurav.girepunje

Hi,

On 29/10/19 1:59 AM, Saurav Girepunje wrote:
> Compare pointer-typed values to NULL rather than 0
> 
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>

I've already merged a patch by Ben Dooks for fixing this
https://lore.kernel.org/r/20191015160332.15244-2-ben.dooks@codethink.co.uk

Thanks
Kishon

> ---
>  drivers/phy/broadcom/phy-brcm-usb-init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.c b/drivers/phy/broadcom/phy-brcm-usb-init.c
> index 3c53625f8bc2..2ea1e84b544b 100644
> --- a/drivers/phy/broadcom/phy-brcm-usb-init.c
> +++ b/drivers/phy/broadcom/phy-brcm-usb-init.c
> @@ -707,7 +707,7 @@ static void brcmusb_usb3_otp_fix(struct brcm_usb_init_params *params)
>  	void __iomem *xhci_ec_base = params->xhci_ec_regs;
>  	u32 val;
>  
> -	if (params->family_id != 0x74371000 || xhci_ec_base == 0)
> +	if (params->family_id != 0x74371000 || xhci_ec_base == NULL)
>  		return;
>  	brcmusb_writel(0xa20c, USB_XHCI_EC_REG(xhci_ec_base, IRAADR));
>  	val = brcmusb_readl(USB_XHCI_EC_REG(xhci_ec_base, IRADAT));
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-30  5:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-28 20:29 [PATCH] phy: broadcom: phy-brcm-usb-init.c: Fix comparing pointer to 0 Saurav Girepunje
2019-10-30  5:08 ` Kishon Vijay Abraham I
     [not found] <20191027184210.GA20258@saurav>
2019-10-28 18:26 ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.