Hi, >-----Original Message----- >From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> >Sent: Friday, May 5, 2023 1:37 PM >To: Subbaraya Sundeep Bhatta <sbhatta@xxxxxxxxxxx> >Cc: kernel-janitors@xxxxxxxxxxxxxxx >Subject: [bug report] octeontx2-pf: Disable packet I/O for graceful exit > >Hello Subbaraya Sundeep, > >The patch c926252205c4: "octeontx2-pf: Disable packet I/O for graceful exit" >from May 3, 2023, leads to the following Smatch static checker warning: > > drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c:1843 >otx2_open() > warn: was negative '-EIO' intended? > >drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c > 1833 /* Install DMAC Filters */ > 1834 if (pf->flags & OTX2_FLAG_DMACFLTR_SUPPORT) > 1835 otx2_dmacflt_reinstall_flows(pf); > 1836 > 1837 err = otx2_rxtx_enable(pf, true); > 1838 /* If a mbox communication error happens at this point then >interface > 1839 * will end up in a state such that it is in down state but hardware > 1840 * mcam entries are enabled to receive the packets. Hence disable >the > 1841 * packet I/O. > 1842 */ >--> 1843 if (err == EIO) > ^^^ >This should be negative -EIO? I think it's the return from the >MBOX_MESSAGES functions which return negatives. > Yes this should be -EIO. Thanks for finding it. We will submit a patch. Sundeep > 1844 goto err_disable_rxtx; > 1845 else if (err) > 1846 goto err_tx_stop_queues; > 1847 > >regards, >dan carpenter