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] [day] [month] [year] [list]
Date:   Mon, 27 Jul 2020 14:05:23 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Vadym Kochan <vadym.kochan@...ision.eu>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Jiri Pirko <jiri@...lanox.com>,
        Ido Schimmel <idosch@...lanox.com>,
        Andrew Lunn <andrew@...n.ch>,
        Oleksandr Mazur <oleksandr.mazur@...ision.eu>,
        Serhiy Boiko <serhiy.boiko@...ision.eu>,
        Serhiy Pshyk <serhiy.pshyk@...ision.eu>,
        Volodymyr Mytnyk <volodymyr.mytnyk@...ision.eu>,
        Taras Chornyi <taras.chornyi@...ision.eu>,
        Andrii Savka <andrii.savka@...ision.eu>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Mickey Rachamim <mickeyr@...vell.com>
Subject: Re: [net-next v3 2/6] net: marvell: prestera: Add PCI interface support

On Mon, Jul 27, 2020 at 12:34 PM Vadym Kochan <vadym.kochan@...ision.eu> wrote:
> On Mon, Jul 27, 2020 at 11:04:56AM +0300, Andy Shevchenko wrote:
> > On Mon, Jul 27, 2020 at 1:55 AM Vadym Kochan <vadym.kochan@...ision.eu> wrote:
> > > On Sun, Jul 26, 2020 at 01:32:19PM +0300, Andy Shevchenko wrote:
> > > > On Sat, Jul 25, 2020 at 6:10 PM Vadym Kochan <vadym.kochan@...ision.eu> wrote:

...

> > > > > +config PRESTERA_PCI
> > > > > +       tristate "PCI interface driver for Marvell Prestera Switch ASICs family"
> > > > > +       depends on PCI && HAS_IOMEM && PRESTERA
> > > >
> > > > > +       default m
> > > >
> > > > Even if I have CONFIG_PRESTERA=y, why as a user I must have this as a module?
> > > > If it's a crucial feature, shouldn't it be rather
> > > >   default CONFIG_PRESTERA
> > > > ?
> > >
> > > The firmware image should be located on rootfs, and in case the rootfs
> > > should be mounted later the pci driver can't pick this up when
> > > statically compiled so I left it as 'm' by default.
> >
> > We have for a long time to catch firmware blobs from initrd (initramfs).
> > default m is very unusual.
> >
> For example drivers/net/ethernet/mellanox/mlxsw/pci.c also uses 'm' as
> default, but may be in that case the reason is that there are several
> bus implementations - i2c, pci.

% git grep -n -w 'default m if' -- $(git ls-files | grep Kconfig) | wc -l
240
% git grep -n -w 'default m' -- $(git ls-files | grep Kconfig) | wc -l
293
% git grep -n -w 'default' -- $(git ls-files | grep Kconfig) | wc -l
5226

So, basically 'default m' cases are ~1% (53) of all default cases
(5226) in the tree.

...

> > Maybe you may replace __stringify by explicit characters / strings and
> > comment how the name was constructed?
> >
> > #define FW_NAME "patch/to/it/fileX.Y.img"
> >
> I used snprintf, and now it looks simpler.

Works for me!

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ