Messages in this thread |  | | From | Andy Shevchenko <> | Date | Mon, 27 Jul 2020 14:05:23 +0300 | 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@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
|  |