Linus Torvalds writes: (Summary) wrote:
So I'm not sure a line count makes sense.
So I'm not sure a line count makes sense.
Sometimes long functions can be sensible, if they are basically just one big case-statement or similar.
one big case-statement or similar.
Looking at one of your examples: futex_requeue() is indeed a long function, but that's mainly because it has a lot of comments about exactly what is going on, and while it only has one (fairly small) case statement, the rest of it is very similar (ie "in this case, do XYZ").
XYZ").
Another case I looked at - try_to_unmap_one() - had very similar behavior.
[...]
function definitions.So I'm not sure a line count makes sense.
So I'm not sure a line count makes sense.
Sometimes long functions can be sensible, if they are basically just one big case-statement or similar.
one big case-statement or similar.
Looking at one of your examples: futex_requeue() is indeed a long function, but that's mainly because it has a lot of comments about exactly what is going on, and while it only has one (fairly small) case statement, the rest of it is very similar (ie "in this case, do XYZ").
XYZ").
Another case I looked at - try_to_unmap_one() - had very similar behavior.