All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: ohci-nxp: fix use of integer as pointer
@ 2019-10-15 14:19 ` Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2019-10-15 14:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ben Dooks, Vladimir Zapolskiy, Sylvain Lemieux, Alan Stern,
	Greg Kroah-Hartman, linux-arm-kernel, linux-usb, linux-kernel

The hcd pointer in ohci_hcd_nxp_probe() is
being initialised with a 0, so fix to NULL to
avoid the following sparse warning:

drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/usb/host/ohci-nxp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index c561881d0e79..85878e8ad331 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -150,7 +150,7 @@ static void ohci_nxp_stop_hc(void)
 
 static int ohci_hcd_nxp_probe(struct platform_device *pdev)
 {
-	struct usb_hcd *hcd = 0;
+	struct usb_hcd *hcd = NULL;
 	const struct hc_driver *driver = &ohci_nxp_hc_driver;
 	struct resource *res;
 	int ret = 0, irq;
-- 
2.23.0


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

* [PATCH] usb: ohci-nxp: fix use of integer as pointer
@ 2019-10-15 14:19 ` Ben Dooks
  0 siblings, 0 replies; 4+ messages in thread
From: Ben Dooks @ 2019-10-15 14:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Vladimir Zapolskiy,
	Ben Dooks, Alan Stern, Sylvain Lemieux, linux-arm-kernel

The hcd pointer in ohci_hcd_nxp_probe() is
being initialised with a 0, so fix to NULL to
avoid the following sparse warning:

drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: Vladimir Zapolskiy <vz@mleia.com>
Cc: Sylvain Lemieux <slemieux.tyco@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/usb/host/ohci-nxp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index c561881d0e79..85878e8ad331 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -150,7 +150,7 @@ static void ohci_nxp_stop_hc(void)
 
 static int ohci_hcd_nxp_probe(struct platform_device *pdev)
 {
-	struct usb_hcd *hcd = 0;
+	struct usb_hcd *hcd = NULL;
 	const struct hc_driver *driver = &ohci_nxp_hc_driver;
 	struct resource *res;
 	int ret = 0, irq;
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] usb: ohci-nxp: fix use of integer as pointer
  2019-10-15 14:19 ` Ben Dooks
@ 2019-10-18 18:41   ` Sylvain Lemieux
  -1 siblings, 0 replies; 4+ messages in thread
From: Sylvain Lemieux @ 2019-10-18 18:41 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, Vladimir Zapolskiy, Alan Stern, Greg Kroah-Hartman,
	moderated list:ARM PORT, USB list, Linux Kernel Mailing List

On Tue, Oct 15, 2019 at 10:19 AM Ben Dooks <ben.dooks@codethink.co.uk> wrote:
>
> The hcd pointer in ohci_hcd_nxp_probe() is
> being initialised with a 0, so fix to NULL to
> avoid the following sparse warning:
>
> drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
[...]

> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -150,7 +150,7 @@ static void ohci_nxp_stop_hc(void)
>
>  static int ohci_hcd_nxp_probe(struct platform_device *pdev)
>  {
> -       struct usb_hcd *hcd = 0;
> +       struct usb_hcd *hcd = NULL;
>         const struct hc_driver *driver = &ohci_nxp_hc_driver;
>         struct resource *res;
>         int ret = 0, irq;
> --
> 2.23.0
>
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>

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

* Re: [PATCH] usb: ohci-nxp: fix use of integer as pointer
@ 2019-10-18 18:41   ` Sylvain Lemieux
  0 siblings, 0 replies; 4+ messages in thread
From: Sylvain Lemieux @ 2019-10-18 18:41 UTC (permalink / raw)
  To: Ben Dooks
  Cc: linux-kernel, Greg Kroah-Hartman, USB list,
	Linux Kernel Mailing List, Vladimir Zapolskiy, Alan Stern,
	moderated list:ARM PORT

On Tue, Oct 15, 2019 at 10:19 AM Ben Dooks <ben.dooks@codethink.co.uk> wrote:
>
> The hcd pointer in ohci_hcd_nxp_probe() is
> being initialised with a 0, so fix to NULL to
> avoid the following sparse warning:
>
> drivers/usb/host/ohci-nxp.c:153:31: warning: Using plain integer as NULL pointer
>
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
[...]

> --- a/drivers/usb/host/ohci-nxp.c
> +++ b/drivers/usb/host/ohci-nxp.c
> @@ -150,7 +150,7 @@ static void ohci_nxp_stop_hc(void)
>
>  static int ohci_hcd_nxp_probe(struct platform_device *pdev)
>  {
> -       struct usb_hcd *hcd = 0;
> +       struct usb_hcd *hcd = NULL;
>         const struct hc_driver *driver = &ohci_nxp_hc_driver;
>         struct resource *res;
>         int ret = 0, irq;
> --
> 2.23.0
>
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-10-18 18:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 14:19 [PATCH] usb: ohci-nxp: fix use of integer as pointer Ben Dooks
2019-10-15 14:19 ` Ben Dooks
2019-10-18 18:41 ` Sylvain Lemieux
2019-10-18 18:41   ` Sylvain Lemieux

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.