Skip to contentSkip to conversation

net: wwan: t7xx: Data path HW layer

bug report Dan Carpenter 1 participant 1 message May 17, 2022 Arm MediaTek

lore
Share & tools
lore
#0 lore raw

Hello Haijun Liu,

The patch 33f78ab5a38a: "net: wwan: t7xx: Data path HW layer" from May 6, 2022, leads to the following Smatch static checker warning:

	drivers/net/wwan/t7xx/t7xx_dpmaif.c:1054 t7xx_dl_add_timedout()
	warn: signedness bug returning '(-110)'

drivers/net/wwan/t7xx/t7xx_dpmaif.c

    1046 static bool t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
                ^^^^
    1047 {
    1048         u32 value;
    1049         int ret;
    1050 
    1051         ret = ioread32_poll_timeout_atomic(hw_info->pcie_base + DPMAIF_DL_BAT_ADD,
    1052                                            value, !(value & DPMAIF_DL_ADD_NOT_READY), 0,
    1053                                            DPMAIF_CHECK_TIMEOUT_US);

--> 1054 return ret;

Returning negative error codes to bool is non-standard but, in this case, harmless.

    1055 }

regards,
dan carpenter

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek