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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YKT7bLjzucl/QEo2@unreal>
Date:   Wed, 19 May 2021 14:50:04 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Peter Geis <pgwipeout@...il.com>, Andrew Lunn <andrew@...n.ch>,
        Russell King <linux@...linux.org.uk>,
        "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>
Subject: Re: [PATCH] net: phy: add driver for Motorcomm yt8511 phy

On Wed, May 19, 2021 at 12:37:43PM +0200, Heiner Kallweit wrote:
> On 19.05.2021 10:18, Leon Romanovsky wrote:
> > On Tue, May 18, 2021 at 08:20:03PM -0400, Peter Geis wrote:
> >> On Tue, May 18, 2021 at 4:59 AM Leon Romanovsky <leon@...nel.org> wrote:
> >>>
> >>> On Tue, May 11, 2021 at 05:46:06PM -0400, Peter Geis wrote:
> >>>> Add a driver for the Motorcomm yt8511 phy that will be used in the
> >>>> production Pine64 rk3566-quartz64 development board.
> >>>> It supports gigabit transfer speeds, rgmii, and 125mhz clk output.
> >>>>
> >>>> Signed-off-by: Peter Geis <pgwipeout@...il.com>
> >>>> ---
> >>>>  MAINTAINERS                 |  6 +++
> >>>>  drivers/net/phy/Kconfig     |  6 +++
> >>>>  drivers/net/phy/Makefile    |  1 +
> >>>>  drivers/net/phy/motorcomm.c | 85 +++++++++++++++++++++++++++++++++++++
> >>>>  4 files changed, 98 insertions(+)
> >>>>  create mode 100644 drivers/net/phy/motorcomm.c
> >>>
> >>> <...>
> >>>
> >>>> +static const struct mdio_device_id __maybe_unused motorcomm_tbl[] = {
> >>>> +     { PHY_ID_MATCH_EXACT(PHY_ID_YT8511) },
> >>>> +     { /* sentinal */ }
> >>>> +}
> >>>
> >>> Why is this "__maybe_unused"? This *.c file doesn't have any compilation option
> >>> to compile part of it.
> >>>
> >>> The "__maybe_unused" is not needed in this case.
> >>
> >> I was simply following convention, for example the realtek.c,
> >> micrel.c, and smsc.c drivers all have this as well.
> > 
> > Maybe they have a reason, but this specific driver doesn't have such.
> > 
> 
> It's used like this:
> MODULE_DEVICE_TABLE(mdio, <mdio_device_id_tbl>);
> 
> And MODULE_DEVICE_TABLE is a no-op if MODULE isn't defined:
> 
> #ifdef MODULE
> /* Creates an alias so file2alias.c can find device table. */
> #define MODULE_DEVICE_TABLE(type, name)					\
> extern typeof(name) __mod_##type##__##name##_device_table		\
>   __attribute__ ((unused, alias(__stringify(name))))
> #else  /* !MODULE */
> #define MODULE_DEVICE_TABLE(type, name)
> #endif
> 
> In this case the table is unused.

Do you see compilation warning for such scenario?

Thanks

> 
> > Thanks
> > 
> >>
> >>>
> >>> Thanks
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ