• Dan Carpenter's avatar
    ipmi: msghandler: Fix a signedness bug · c011410d
    Dan Carpenter authored
    The type for the completion codes should be unsigned char instead of
    char.  If it is declared as a normal char then the conditions in
    __get_device_id() are impossible because the IPMI_DEVICE_IN_FW_UPDATE_ERR
    error codes are higher than 127.
    
        drivers/char/ipmi/ipmi_msghandler.c:2449 __get_device_id()
        warn: impossible condition '(bmc->cc == 209) => ((-128)-127 == 209)'
    
    Fixes: f8910ffa ("ipmi:msghandler: retry to get device id on an error")
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Message-Id: <20200918142756.GB909725@mwanda>
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    c011410d
ipmi_msghandler.c 131 KB