[bug report] net: wwan: t7xx: Data path HW layer

Dan Carpenter dan.carpenter at oracle.com
Tue May 17 04:49:13 PDT 2022


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



More information about the Linux-mediatek mailing list