Re: git: 32137c41065c - main - sound: Retire the version constants
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 25 Sep 2026 16:59:00 UTC
On Fri Sep 25, 2026 at 6:27 PM CEST, Jason Harmening wrote: > On Fri, Sep 25, 2026 at 5:34 AM Christos Margiolis <christos@freebsd.org> > wrote: > >> On Wed Sep 23, 2026 at 10:19 PM CEST, Jason Harmening wrote: >> > On Wed, Sep 23, 2026 at 2:19 PM John Baldwin <jhb@freebsd.org> wrote: >> > >> >> On 9/22/26 14:54, Jason Harmening wrote: >> >> > Do you plan to also bump __FreeBSD_version__ for these changes? >> >> > This will break any out-of-tree sound driver that uses these macros, >> >> > particularly if you MFC it. >> >> > Such drivers will then need some way to determine whether to hardcode >> '1' >> >> > or use the previous macro/hardcode '5' to avoid a failed dependency >> >> check. >> >> > I still maintain such a thing, however few users there may be, and it >> >> seems >> >> > unsafe to assume there aren't others. >> >> > >> >> > This seems like a completely unnecessary change TBH. >> >> >> >> Can you use #ifdef to test if they are defined in an out-of-tree driver? >> >> In >> >> your case, perhaps as something like: >> >> >> >> #ifndef SOUND_MINVER >> >> #define SOUND_MINVER 1 >> >> #endif >> >> >> >> <replying-all this time, god I despise the gmail UI> >> > >> > Sure, I mentioned that very possibility in my post on >> > https://reviews.freebsd.org/D59873. >> > That's still a hack, and I'm still not sure why it was necessary to kill >> > these defines in the first place. >> >> Does your driver actually depend on sound(4)'s versioning, and if yes, >> how? >> > > Uh, yes...just like all the in-tree drivers before you made this change, it > depended on those version constants to allow the module to load correctly. > > Of course I get what you're really asking here, and no...just like the > in-tree drivers, it does not make any functional distinction between > different sound(4) versions. So the versioning was functionally useless in your driver too. >> >> The reason for deleting those, although technically unnecessary, was >> because these values have been forgotten for years and do not actually >> mean anything useful, so I think it's better to just clean this up and >> fix the few (if any) use-cases, than keep this rotting further. > > > I completely understand that these no longer meant anything useful in terms > of KPI/KBI compatibility, but I don't really see why getting rid of them > was worth the churn, even just the in-tree churn (disregarding risks for > out-of-tree drivers). What ongoing maintenance burden were these defines > likely to cause? There wasn't any significant maintenance burden, but that church wasn't anything complicated to implement either, and I don't see a point of keeping something that is functionally dead. > As a separate question, would it instead make sense to make these versions > start meaning something again? > For example, you recently made a change to require mixer_init() to be > called in a certain order relative to other initialization. That change > seems perfectly reasonable from a technical standpoint, but would it also > make sense to bump the version constants to avoid a panic from loading a > stale audio driver kmod that didn't use the correct init sequence? This would be a good use case yes. I will think a bit more about it. Christos