[bug report] staging: Add rtl8723bs sdio wifi driver

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

 



Hello Hans de Goede,

The patch 554c0a3abf21: "staging: Add rtl8723bs sdio wifi driver"
from Mar 29, 2017, leads to the following static checker warning:

	drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c:1374 _PHY_PathADDAOn8723B()
	warn: both sides of ternary the same: '29360148' 0x01c00014 0x01c00014

drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.c
  1360  static void _PHY_PathADDAOn8723B(
  1361          struct adapter *padapter,
  1362          u32 *ADDAReg,
  1363          bool isPathAOn,
  1364          bool is2T
  1365  )
  1366  {
  1367          u32 pathOn;
  1368          u32 i;
  1369          struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
  1370          PDM_ODM_T pDM_Odm = &pHalData->odmpriv;
  1371  
  1372          ODM_RT_TRACE(pDM_Odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("ADDA ON.\n"));
  1373  
  1374          pathOn = isPathAOn ? 0x01c00014 : 0x01c00014;
                                     ^^^^^^^^^^^^^^^^^^^^^^^
  1375          if (false == is2T) {
  1376                  pathOn = 0x01c00014;
                                 ^^^^^^^^^^
  1377                  PHY_SetBBReg(pDM_Odm->Adapter, ADDAReg[0], bMaskDWord, 0x01c00014);
                                                                               ^^^^^^^^^^
These are all four the same.  We're really determined that it must be
0x01c00014.  :P  Do you have any idea what was intended?

  1378          } else {
  1379                  PHY_SetBBReg(pDM_Odm->Adapter, ADDAReg[0], bMaskDWord, pathOn);
  1380          }
  1381  
  1382          for (i = 1 ; i < IQK_ADDA_REG_NUM ; i++) {
  1383                  PHY_SetBBReg(pDM_Odm->Adapter, ADDAReg[i], bMaskDWord, pathOn);
  1384          }
  1385  
  1386  }

regards,
dan carpenter
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux