
Dear Tom,
In message 20140325200420.GU16360@bill-the-cat you wrote:
With respect to danger / readability, no, either way is just as dangerous (or not dangerous) and it's still fairly dense code either way and fixing a problem with an incorrect shift value is the same effort.
The key problem which I detected with sr32() was that it was in several places called with a width of 32 - which looked perfectly fine when the intention was to clear / set the whole 32 bit variable. This went unnoticed becuase it was just a normally looking argument. If the shift operation that resulted from that had been visible, the problem would have been much easier to detect. Seeing an expression "value << 32" on u32 data types rings some alarms.
Best regards,
Wolfgang Denk