No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential D53528
sound: Get rid of useless sndbuf getters and setters Authored by christos on Sat, Nov 1, 10:54 PM. Tags None Referenced Files
Subscribers
Details
Diff Detail
Event TimelineComment Actions I know this is rather large for a non-functional change, but I think it's worth cleaning this up. There are a few more gettters/setters in sys/dev/sound/pcm/buffer.c, but I want to think a bit more about them. Comment Actions Why? It's a lot of churn, and the accessors are harmless. It's nice to have them when looking at how certain fields are accessed. When reviewing a previous change, for instance, I was looking at callers of sndbuf_getsel(). It would have been annoying without that accessor, since there are many fields called "sel". Comment Actions The rationale is that no other part of sound(4) has OOP-like getters and setters, and IMHO these do not really serve a good purpose other than essentially adding an "sndbuf_get*" prefix to the struct's name field. As for sel, we use this field in only a handful of places, and in some we actually need to access the sel's fields (e.g., in D53029), and using the getter will only make that more verbose and ugly. |