Let me repeat the key message:
It does not matter who's code gets merged.
It does not matter who's code gets merged.
It does not matter who's code gets merged.
It does not matter who's code gets merged.
What matters is that the problem gets solved and that the Linux kernel
innovates forward.
I've had several cases myself where I spent quite some time solving a
problem, just to get some random remark from someone smart on lkml
saying "if you had done <this simple thing> you would have had <this
simple and superior solution>". Was I pissed off that my patch didn't
get merged but that this better approach got picked? NO! The problem
that I needed to solve got solved in a really good way. Mission
accomplished.
(and merging the code that is cleaning up/smallest is a reasonable one
to pick for someone like Linus, likewise for the "which is likely to be
maintained best" arguments)