1. 09 11月, 2016 1 次提交
    • A
      spi: rspi: avoid uninitialized variable access · db300838
      Arnd Bergmann 提交于
      The newly introduced rspi_pio_transfer_in_or_our() function must
      take either a valid 'rx' or 'tx' pointer, and has undefined behavior
      if both are NULL, as found by 'gcc -Wmaybe-unintialized':
      
      drivers/spi/spi-rspi.c: In function 'rspi_pio_transfer_in_or_our':
      drivers/spi/spi-rspi.c:558:5: error: 'len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      The analysis of the function is correct in principle, but the code
      is currently safe because both callers always pass exactly one
      of the two pointers.
      
      Looking closer at this function shows that having a combined
      method for rx and tx here actually increases the complexity
      and the size of the file. This simplifies it again by keeping
      the two separate, which then ends up avoiding that warning.
      
      Fixes: 3be09bec ("spi: rspi: supports 32bytes buffer for DUAL and QUAD")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      db300838
  2. 05 11月, 2016 1 次提交
  3. 08 8月, 2016 1 次提交
  4. 03 7月, 2015 2 次提交
  5. 02 6月, 2015 2 次提交
  6. 07 5月, 2015 1 次提交
  7. 02 5月, 2015 1 次提交
  8. 07 4月, 2015 1 次提交
  9. 30 3月, 2015 1 次提交
  10. 23 2月, 2015 1 次提交
  11. 22 12月, 2014 1 次提交
  12. 20 10月, 2014 1 次提交
  13. 28 8月, 2014 1 次提交
  14. 17 8月, 2014 5 次提交
  15. 17 7月, 2014 1 次提交
  16. 07 7月, 2014 2 次提交
  17. 02 6月, 2014 17 次提交