1. 20 6月, 2017 11 次提交
  2. 18 4月, 2017 1 次提交
  3. 19 11月, 2016 1 次提交
  4. 22 9月, 2016 3 次提交
  5. 04 8月, 2016 1 次提交
    • A
      drivers/media/dvb-frontends/cxd2841er.c: avoid misleading gcc warning · bb9bd878
      Arnd Bergmann 提交于
      The addition of jump label support in dynamic_debug caused an unexpected
      warning in exactly one file in the kernel:
      
        drivers/media/dvb-frontends/cxd2841er.c: In function 'cxd2841er_tune_tc':
        include/linux/dynamic_debug.h:134:3: error: 'carrier_offset' may be used uninitialized in this function [-Werror=maybe-uninitialized]
           __dynamic_dev_dbg(&descriptor, dev, fmt, \
           ^~~~~~~~~~~~~~~~~
        drivers/media/dvb-frontends/cxd2841er.c:3177:11: note: 'carrier_offset' was declared here
          int ret, carrier_offset;
                   ^~~~~~~~~~~~~~
      
      The problem seems to be that the compiler gets confused by the extra
      conditionals in static_branch_unlikely, to the point where it can no
      longer keep track of which branches have already been taken, and it
      doesn't realize that this variable is now always initialized when it
      gets used.
      
      I have done lots of randconfig kernel builds and could not find any
      other file with this behavior, so I assume it's a rare enough glitch
      that we don't need to change the jump label support but instead just
      work around the warning in the driver.
      
      To achieve that, I'm moving the check for the return value into the
      switch() statement, which is an obvious transformation, but is enough to
      un-confuse the compiler here.  The resulting code is not as nice to
      read, but at least we retain the behavior of warning if it gets changed
      to actually access an uninitialized carrier offset value in the future.
      
      Link: http://lkml.kernel.org/r/20160713204342.1221511-1-arnd@arndb.deSigned-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NAbylay Ospan <aospan@netup.ru>
      Cc: Sergey Kozlov <serjk@netup.ru>
      Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
      Cc: Jason Baron <jbaron@akamai.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bb9bd878
  6. 16 7月, 2016 7 次提交
  7. 09 7月, 2016 4 次提交
  8. 07 6月, 2016 8 次提交
  9. 05 2月, 2016 1 次提交
  10. 12 8月, 2015 3 次提交