Hi Andy, On Sat, 29 Jun 2019 14:13:02 +0300, Andy Shevchenko 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. And? > 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. What practical difference does it make? > And perhaps better to fix them? It's not considered a bug, as it is already possible to have multiple dependencies listed, you only have to put them in the same statement. There are several other MODULE_* macros which also can be used only once per module (MODULE_LICENSE, MODULE_DESCRIPTION) so I see nothing fundamentally wrong with MODULE_SOFTDEP following the same model. The example provided clearly illustrates how multiple dependencies should be declared. One possible improvement would be to add a comment explicitly stating that this macro can only be used once per module. > At least I would rather support somelike > MODULE_SOFTDEP("pre: ..."); > MODULE_SOFTDEP("post: ..."); Feel free to implement this on your copious spare time if you think there is any actual value in this change. Personally I'm not sure and I just want to get the (driver) bug fixed. Fixing the driver is more simple and easier to backport if needed. > > 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"); > > > >