lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@plvision.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@plvision.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@plvision.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

\
 
 \ /
  Last update: 2020-07-27 13:06    [W:0.042 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site