News for hackers. Stuff that matters.
Re:Please do not attempt to simplify this code by ElijahLynn on Thursday December 27, 2018 @07:50PM (#18773992)
One thing that I wish Linux kernel code had. Maybe it does but the few times I have found myself reading Linux code I go to the top and there is zero context in the comments, just a bunch of licensing information.
Re:Please do not attempt to simplify this code by dfox on Thursday December 27, 2018 @09:23PM (#18774418)
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.
Re:Please do not attempt to simplify this code by isp on Friday December 28, 2018 @06:34AM (#18776194)
I wasn't familiar with hme.ko comments, so looked it up.

https://github.com/torvalds/linux/blob/master/drivers/net/et...

Re:Please do not attempt to simplify this code by AstralStorm on Friday December 28, 2018 @09:55AM (#18777026)
The 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.