On Sat, Jun 29, 2019 at 4:13 AM Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote: > > On Sat, Jun 29, 2019 at 12:41 PM Jean Delvare <jdelvare@xxxxxxx> wrote: > > > > Only one MODULE_SOFTDEP statement is allowed per module. Multiple > > dependencies must be expressed in a single statement. > > Some module init utils even do not support softdep. not related to the patch in question... and module init tools has long been replaced by kmod. > > Nevertheless, the message is somewhat misleading. It's not "only one > allowed" — this is not true, it's "only first will be served". > This is how I read kmod sources. > > And perhaps better to fix them? > At least I would rather support somelike > MODULE_SOFTDEP("pre: ..."); > MODULE_SOFTDEP("post: ..."); it is a bug, because multiple softdep statements like you suggest has never been supported. Either by kmod or module-init-tools. What it actually does is to replace the previous one. depmod will look into the ELF and generate a /lib/modules/$(uname -r)/modules.softdep file. That config file is loaded by kmod as any other config file with the same prio as others in /lib. Implementing what you ask would probably be done with MODULE_SOFTDEP_PRE() / MODULE_SOFTDEP_POST() and let the build system do the right thing. Not supported today and not easily backportable. Reviewed-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx> Lucas De Marchi > > > Signed-off-by: Jean Delvare <jdelvare@xxxxxxx> > > Cc: "Enrico Weigelt, metux IT consult" <info@xxxxxxxxx> > > Cc: Darren Hart <dvhart@xxxxxxxxxxxxx> > > Cc: Andy Shevchenko <andy@xxxxxxxxxxxxx> > > --- > > drivers/platform/x86/pcengines-apuv2.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > --- linux-5.1.orig/drivers/platform/x86/pcengines-apuv2.c 2019-05-06 02:42:58.000000000 +0200 > > +++ linux-5.1/drivers/platform/x86/pcengines-apuv2.c 2019-06-29 11:37:48.062005738 +0200 > > @@ -255,6 +255,4 @@ MODULE_DESCRIPTION("PC Engines APUv2/APU > > MODULE_LICENSE("GPL"); > > MODULE_DEVICE_TABLE(dmi, apu_gpio_dmi_table); > > MODULE_ALIAS("platform:pcengines-apuv2"); > > -MODULE_SOFTDEP("pre: platform:" AMD_FCH_GPIO_DRIVER_NAME); > > -MODULE_SOFTDEP("pre: platform:leds-gpio"); > > -MODULE_SOFTDEP("pre: platform:gpio_keys_polled"); > > +MODULE_SOFTDEP("pre: platform:" AMD_FCH_GPIO_DRIVER_NAME " platform:leds-gpio platform:gpio_keys_polled"); > > > > > > -- > > Jean Delvare > > SUSE L3 Support > > > > -- > With Best Regards, > Andy Shevchenko -- Lucas De Marchi