From: Jan Stancek on
gitlab.com
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2943#note_1844...
Your test looks OK, the reason ptn36502 ended up in modules-core is because of
initial rules I created:
```
- drivers/usb/atm/.*: modules
- drivers/usb/gadget/function/usb_f_midi2.*: modules
- drivers/usb/image/.*: modules
- drivers/usb/misc/trancevibrator.*: modules-extra
- drivers/usb/misc/.*: modules
- drivers/usb/serial/.*: modules
- drivers/usb/typec/mux/nb7vpq904m.*: modules
- drivers/usb/usbip/.*: modules-extra
- drivers/usb/.*: modules-core
```
There are 26 kmods in kernel/drivers/usb/typec. Today, 25 of those are in
modules-core. Where should newly introduced usb/typec kmods go? My guess was
'modules-core', but we can as well make it 'modules', if we agree
that's
better default for this subdirectory.
Just out of curiosity, without your patch (
https://gitlab.com/knurd42/linux/-/
commit/c4a33ee7bf712b18ca5ef382ad0d8e889a9fe20f) where does ptn36502 land?
--
Consider `kernel/crypto` as another example. 100% of kmods in `kernel/crypto`
are in modules-core. When new one is introduced, where should it land? I'd
expect modules-core as well, which is what current rules do:
```
- crypto/.*: modules-core
...
- default: modules
```
Which means that 'modules' is the default package for all kmods **which are
not already** covered by any other rules.
--
We have been planning to get all subsystem teams to review kmod allocations
after this MR is merged, to help us choose saner defaults for major kmod
subdirectories.