linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: rcar_canfd: Fix plain integer in transceivers[] init
@ 2023-03-29  6:40 Geert Uytterhoeven
  2023-03-29  7:40 ` Steen.Hegelund
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2023-03-29  6:40 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, Jakub Kicinski
  Cc: linux-can, netdev, linux-renesas-soc, Geert Uytterhoeven

With C=1:

    drivers/net/can/rcar/rcar_canfd.c:1852:59: warning: Using plain integer as NULL pointer

Fixes: a0340df7eca4f28e ("can: rcar_canfd: Add transceiver support")
Reported-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20230328145658.7fdbc394@kernel.org
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/net/can/rcar/rcar_canfd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
index ecdb8ffe2f670c9b..11626d2a0afb1a90 100644
--- a/drivers/net/can/rcar/rcar_canfd.c
+++ b/drivers/net/can/rcar/rcar_canfd.c
@@ -1848,7 +1848,7 @@ static void rcar_canfd_channel_remove(struct rcar_canfd_global *gpriv, u32 ch)
 
 static int rcar_canfd_probe(struct platform_device *pdev)
 {
-	struct phy *transceivers[RCANFD_NUM_CHANNELS] = { 0, };
+	struct phy *transceivers[RCANFD_NUM_CHANNELS] = { NULL, };
 	const struct rcar_canfd_hw_info *info;
 	struct device *dev = &pdev->dev;
 	void __iomem *addr;
-- 
2.34.1


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

* Re: [PATCH] can: rcar_canfd: Fix plain integer in transceivers[] init
  2023-03-29  6:40 [PATCH] can: rcar_canfd: Fix plain integer in transceivers[] init Geert Uytterhoeven
@ 2023-03-29  7:40 ` Steen.Hegelund
  0 siblings, 0 replies; 2+ messages in thread
From: Steen.Hegelund @ 2023-03-29  7:40 UTC (permalink / raw)
  To: geert+renesas, wg, mkl, kuba; +Cc: linux-can, netdev, linux-renesas-soc

Hi Geert,

Looks fine to me.

On Wed Mar 29, 2023 at 8:40 AM CEST, Geert Uytterhoeven wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> With C=1:
>
>     drivers/net/can/rcar/rcar_canfd.c:1852:59: warning: Using plain integer as NULL pointer
>
> Fixes: a0340df7eca4f28e ("can: rcar_canfd: Add transceiver support")
> Reported-by: Jakub Kicinski <kuba@kernel.org>
> Link: https://lore.kernel.org/r/20230328145658.7fdbc394@kernel.org
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/net/can/rcar/rcar_canfd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/can/rcar/rcar_canfd.c b/drivers/net/can/rcar/rcar_canfd.c
> index ecdb8ffe2f670c9b..11626d2a0afb1a90 100644
> --- a/drivers/net/can/rcar/rcar_canfd.c
> +++ b/drivers/net/can/rcar/rcar_canfd.c
> @@ -1848,7 +1848,7 @@ static void rcar_canfd_channel_remove(struct rcar_canfd_global *gpriv, u32 ch)
>
>  static int rcar_canfd_probe(struct platform_device *pdev)
>  {
> -       struct phy *transceivers[RCANFD_NUM_CHANNELS] = { 0, };
> +       struct phy *transceivers[RCANFD_NUM_CHANNELS] = { NULL, };
>         const struct rcar_canfd_hw_info *info;
>         struct device *dev = &pdev->dev;
>         void __iomem *addr;
> --
> 2.34.1


Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>

BR
Steen

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

end of thread, other threads:[~2023-03-29  7:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-29  6:40 [PATCH] can: rcar_canfd: Fix plain integer in transceivers[] init Geert Uytterhoeven
2023-03-29  7:40 ` Steen.Hegelund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).