
On 03/25/2014 10:51 AM, Wolfgang Denk wrote:
Dear Stephen Warren,
In message 5331A6B6.8090805@wwwdotorg.org you wrote:
Or perhaps update_reg_mask_shift_val()?
Still, I can rename the function if you want; it certainly does make it obvious. It's rather a long name though, but I guess wrapping the parameters isn't too bad.
Please do not invent new bit manipulation functions. Just use the standard I/O accessors. And whenever possible, please remove pre- existing functions.
I've just recently sent patches to get rid of such "inventions" that resulted in undefined code.
That's not what this code is doing. The existing IO accessors are used; it's just removing duplication from the parameters passed to the existing functions (the shift needs to be written out twice).