> Note that most other places in force_to_mode optimizing shifts already > check for non-negative shift amounts; but in this place the check is > missing. > > The following patch adds the check here as well, fixing the undefined > behaviour (and subsequent bootstrap comparison failure) in my test. > > Tested on arm-linux-gnueabihf. OK for mainline?
Sure, but given that there is indeed the same pattern a few lines above, you could as well have installed it as obvious. OK for 4.7 too if you need it. -- Eric Botcazou