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: <CAK8P3a3dkFQOxVxiGxVHXMLDwzn5SuoEvui_Fzhx7kYSF_LXKA@mail.gmail.com>
Date:   Sat, 14 Dec 2019 09:39:11 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     Vladimir Oltean <olteanv@...il.com>,
        David Miller <davem@...emloft.net>,
        Mao Wenan <maowenan@...wei.com>, Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        alexandru.marginean@....com, xiaoliang.yang_1@....com,
        yangbo lu <yangbo.lu@....com>,
        Networking <netdev@...r.kernel.org>,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        UNGLinuxDriver@...rochip.com,
        Vladimir Oltean <vladimir.oltean@....com>
Subject: Re: [PATCH] net: mscc: ocelot: hide MSCC_OCELOT_SWITCH and move
 outside NET_VENDOR_MICROSEMI

On Sat, Dec 14, 2019 at 1:11 AM Jakub Kicinski
<jakub.kicinski@...ronome.com> wrote:
> On Thu, 12 Dec 2019 19:11:25 +0200, Vladimir Oltean wrote:
> > From: Vladimir Oltean <vladimir.oltean@....com>

> Mmm. Is that really the only choice? Wouldn't it be better to do
> something like:
>
> diff --git a/drivers/net/ethernet/mscc/Kconfig b/drivers/net/ethernet/mscc/Kconfig
> index 13fa11c30f68..991db8b94a9c 100644
> --- a/drivers/net/ethernet/mscc/Kconfig
> +++ b/drivers/net/ethernet/mscc/Kconfig
> @@ -10,7 +10,8 @@ config NET_VENDOR_MICROSEMI
>           the questions about Microsemi devices.
>
>  config MSCC_OCELOT_SWITCH
> -       bool
> +       tristate
> +       default (MSCC_OCELOT_SWITCH_OCELOT || NET_DSA_MSCC_FELIX)
>         depends on NET_SWITCHDEV
>         depends on HAS_IOMEM
>         select REGMAP_MMIO
>
> Presumably if user wants the end driver to be loadable module the
> library should default to a module?

Agreed, should be tristate.

The 'default' isn't necessary here, the 'select' does it all the same
and there only needs to be one of the two.

> > diff --git a/drivers/net/ethernet/mscc/Kconfig b/drivers/net/ethernet/mscc/Kconfig
> > index bcec0587cf61..13fa11c30f68 100644
> > --- a/drivers/net/ethernet/mscc/Kconfig
> > +++ b/drivers/net/ethernet/mscc/Kconfig
> > @@ -9,24 +9,29 @@ config NET_VENDOR_MICROSEMI
> >         kernel: saying N will just cause the configurator to skip all
> >         the questions about Microsemi devices.
> >
> > -if NET_VENDOR_MICROSEMI
> > -
> >  config MSCC_OCELOT_SWITCH
> > -     tristate "Ocelot switch driver"
> > +     bool
...
> >
> > +if NET_VENDOR_MICROSEMI
> >
> >  config MSCC_OCELOT_SWITCH_OCELOT
...
> > +     tristate "Ocelot switch driver for local management CPUs"
> > +     select MSCC_OCELOT_SWITCH
> >  endif # NET_VENDOR_MICROSEMI

The "if NET_VENDOR_MICROSEMI" must come directly after the
config NET_VENDOR_MICROSEMI, otherwise the indentation
in "make menuconfig" is wrong. So please move MSCC_OCELOT_SWITCH
after the "endif".

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ