3 ms·
There are few linux drivers for particularly buggy hardware that are written in this style. Although OTOH what I think of is hme.ko, where the comments are more
by dfox 8y ago
There are few linux drivers for particularly buggy hardware that are written in this style. Although OTOH what I think of is hme.ko, where the comments are more on the hillariously funny side than descriptive.
- isp 8y agoI wasn't familiar with hme.ko comments, so looked it up. https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/sun/sunhme.c https://github.com/torvalds/linux/blob/master/drivers/net/et...
- AstralStorm 8y agoThe kernel code is nowhere near ideal nor "space-shuttle" code. It has a ton of single use functions which is essentially the opposite. Magic numbers and timing without explanation why. Rarely used technical descriptions such as "Lance mode". Tons of unchecked assertions on lock when kernel provides a lockdep check for this. Custom logging macros. Flies in the face of kernel "goto error" error handling convention in a few places. XXX with obvious bugs mentioned, unfixed. And more... Splitting it into more files wouldn't help at all.