drivers/misc/mei/hbm.c:1212: bad if test ?

From: David Binderman
Date: Fri Sep 11 2015 - 23:35:13 EST


Hello there,

drivers/misc/mei/hbm.c:1212:46: warning: logical ‘and’ of mutually exclusive tests is always false [-Wlogical-op]

Source code is

        if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS &&
            dev->hbm_state>= MEI_HBM_STOPPED) {

Maybe better code

        if (dev->hbm_state <= MEI_HBM_ENUM_CLIENTS ||
            dev->hbm_state>= MEI_HBM_STOPPED) {


Regards

David Binderman
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/