RE: [bug report] net: ethernet: renesas: Add support for "Ethernet Switch"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> From: Geert Uytterhoeven, Sent: Tuesday, November 15, 2022 11:23 PM
> 
> Hi Dan,
> 
> On Tue, Nov 15, 2022 at 2:17 PM Dan Carpenter <error27@xxxxxxxxx> wrote:
> > The patch 3590918b5d07: "net: ethernet: renesas: Add support for
> > "Ethernet Switch"" from Oct 31, 2022, leads to the following Smatch
> > static checker warning:
> >
> >         drivers/net/ethernet/renesas/rswitch.c:1717 rswitch_init()
> >         warn: '%pM' cannot be followed by 'n'
> >
> > drivers/net/ethernet/renesas/rswitch.c
> >     1706
> >     1707         for (i = 0; i < RSWITCH_NUM_PORTS; i++) {
> >     1708                 err = register_netdev(priv->rdev[i]->ndev);
> >     1709                 if (err) {
> >     1710                         for (i--; i >= 0; i--)
> >     1711                                 unregister_netdev(priv->rdev[i]->ndev);
> >     1712                         goto err_register_netdev;
> >     1713                 }
> >     1714         }
> >     1715
> >     1716         for (i = 0; i < RSWITCH_NUM_PORTS; i++)
> > --> 1717                 netdev_info(priv->rdev[i]->ndev, "MAC address %pMn",
> >                                                                           ^
> > This 'n' doesn't make sense.  See mac_address_string() for more details.

Dan, thank you for the report!

> I guess that should be "\n"?

Geert-san, thank you for the suggestion. You're correct.
I confirmed that "\n" resolved the smatch warning.
I'll make/submit a patch for this issue.

Best regards,
Yoshihiro Shimoda


> >     1718                             priv->rdev[i]->ndev->dev_addr);
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux