[bug report] staging: typec: Fairchild FUSB302 Type-c chip driver

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

 



Hello Yueyao Zhu,

The patch c034a43e72dd: "staging: typec: Fairchild FUSB302 Type-c
chip driver" from Apr 27, 2017, leads to the following static checker
warning:

	drivers/staging/typec/fusb302/fusb302.c:492 tcpm_init()
	warn: odd binop '0x40 & 0x80'

drivers/staging/typec/fusb302/fusb302.c
   484          if (ret < 0)
   485                  return ret;
   486          ret = fusb302_set_power_mode(chip, FUSB_REG_POWER_PWR_ALL);
   487          if (ret < 0)
   488                  return ret;
   489          ret = fusb302_i2c_read(chip, FUSB_REG_STATUS0, &data);
   490          if (ret < 0)
   491                  return ret;
   492          chip->vbus_present = !!(FUSB_REG_STATUS0 & FUSB_REG_STATUS0_VBUSOK);
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0x40 & 0x80 is always zero.  Very odd, indeed.

   493          ret = fusb302_i2c_read(chip, FUSB_REG_DEVICE_ID, &data);
   494          if (ret < 0)
   495                  return ret;
   496          fusb302_log(chip, "fusb302 device ID: 0x%02x", data);
   497  
   498          return ret;
   499  }

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