Re: [GIT PULL] Driver core changes for 7.0-rc1

Danilo Krummrich
2026-03-02T19:19:28Z

On Sun Mar 1, 2026 at 10:01 PM CET, Linus Torvalds wrote:
> So the thing that would matter is the longest actual real driver name.
> Aren't those typically just a few bytes (eg "regulator-bus-drv" or
> "__typec_altmode_driver" being long ones I find with a bad grep
> pattern that might miss millions of other cases)

Yes, generally they should be pretty short.

OOC, I asked an LLM to figure it out (so take this with the necessary grain of
salt):

Out of ~7,560 unique driver names:

┌────────────┬───────────┐
│ Threshold │ Count │
├────────────┼───────────┤
│ > 32 chars │ 6 (0.08%) │
├────────────┼───────────┤
│ > 48 chars │ 1 (0.01%) │
├────────────┼───────────┤
│ > 64 chars │ 0 │
└────────────┴───────────┘

Length distribution

1-10 chars: 3,513 (46.5%)
11-16 chars: 3,111 (41.1%)
17-24 chars: 880 (11.6%)
25-32 chars: 50 ( 0.7%)
33-49 chars: 6 ( 0.1%)

> IOW, it looks like it would be fine to just say "use just a 32-byte
> buffer" if a buffer is needed.

Assuming the above is roughly correct, you are pretty close. :)

> Of course, if no buffer is needed that's even better.

Yes, I don't think we ever need to obtain a copy other than through
sysfs_emit().