re: net: Adding support for Cavium ThunderX network controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sunil Goutham,

The patch 4863dea3fab0: "net: Adding support for Cavium ThunderX
network controller" from May 26, 2015, leads to the following static
checker warning:

	drivers/net/ethernet/cavium/thunder/thunder_bgx.c:485 bgx_xaui_check_link()
	warn: we tested 'lmac_type == 3' before and it was 'false'

drivers/net/ethernet/cavium/thunder/thunder_bgx.c
   484  
   485          if ((lmac_type == BGX_MODE_10G_KR) || (lmac_type == BGX_MODE_XFI) ||
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^      ^^^^^^^^^^^^^^^^^^^^^^^^^
These are the both 3.  That seems like it could lead to bugs down the
line.

   486              (lmac_type == BGX_MODE_40G_KR) || (lmac_type == BGX_MODE_XLAUI)) {
                                  ^^^^^^^^^^^^^^^                   ^^^^^^^^^^^^^^
These are both 4.

   487                  if (bgx_poll_reg(bgx, lmacid, BGX_SPUX_BR_STATUS1,
   488                                   SPU_BR_STATUS_BLK_LOCK, false)) {
   489                          dev_err(&bgx->pdev->dev,
   490                                  "SPU_BR_STATUS_BLK_LOCK not completed\n");
   491                          return -1;
   492                  }
   493          } else {

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux