Cmon, this is not about naming, this is about non-generic code in generic header.
IMO hiding such a little operation behind a macro/function just hurt readability. Furthermore, considering that this function is only used once in the provided patch and that word ordering on RISC-V is not about to change anytime soon, it is perfectly fine to inline the code.
Making a u32 pointer from to u16’s isn’t a generic operation because it has to make assumptions about how the pointers work (in particular what endianess they have)
They named a function slightly poorly. As if Linus has never done that.
Not only that. They introduced a obscure function, which inner workings are not clear and that is only used by their new code into a global header which is used by many other code parts, which means other people could start using it. This could lead to bugs since the semantics are not clear from the function name or if they change the function in the future. Also they added their pull request much too late to be properly reviewed.
Yeah or they’ll say “fuck this” and quit.
It’s hardly a fuck up. They named a function slightly poorly. As if Linus has never done that.
Cmon, this is not about naming, this is about non-generic code in generic header.
IMO hiding such a little operation behind a macro/function just hurt readability. Furthermore, considering that this function is only used once in the provided patch and that word ordering on RISC-V is not about to change anytime soon, it is perfectly fine to inline the code.
(a << 16) | b
is about the most generic code you can get. How is that remotely RISC-V specific?Making a u32 pointer from to u16’s isn’t a generic operation because it has to make assumptions about how the pointers work (in particular what endianess they have)
What makes you think it’s making a pointer? Nobody said anything about that.
Not only that. They introduced a obscure function, which inner workings are not clear and that is only used by their new code into a global header which is used by many other code parts, which means other people could start using it. This could lead to bugs since the semantics are not clear from the function name or if they change the function in the future. Also they added their pull request much too late to be properly reviewed.
I read is rant, seems more than just a poor naming issue