1. 09 Jul, 2016 1 commit
  2. 04 Jun, 2016 1 commit
  3. 20 May, 2016 2 commits
  4. 14 Mar, 2016 2 commits
    • Josh Poimboeuf's avatar
      rtc: ds1685: actually spin forever in poweroff error path · 361c6ed6
      Josh Poimboeuf authored
      objtool reports the following warnings:
        drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x0: duplicate frame pointer save
        drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x3: duplicate frame pointer setup
        drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_work_queue()+0x0: frame pointer state mismatch
      The warning message needs to be improved, but what it really means in
      this case is that ds1685_rtc_poweroff() has a possible code path where
      it can actually fall through to the next function in the object code,
      The bug is caused by the use of the unreachable() macro in a place which
      is actually reachable.  That causes gcc to assume that the printk()
      immediately before the unreachable() macro never returns, when in fact
      it does.  So gcc places the printk() at the very end of the function's
      object code.  When the printk() returns, the next function starts
      The surrounding comment and printk message state that the code should
      spin forever, which explains the unreachable() statement.  However the
      actual spin code is missing.
      Reported-by: default avatarkbuild test robot <[email protected]>
      Signed-off-by: default avatarJosh Poimboeuf <[email protected]>
      Signed-off-by: default avatarAlexandre Belloni <[email protected]>
    • Dan Carpenter's avatar
      rtc: ds1685: passing bogus values to irq_restore · 8c09b9fd
      Dan Carpenter authored
      We call spin_lock_irqrestore with "flags" set to zero instead of to the
      value from spin_lock_irqsave().
      Fixes: aaaf5fbf ('rtc: add driver for DS1685 family of real time clocks')
      Signed-off-by: default avatarDan Carpenter <[email protected]>
      Signed-off-by: default avatarAlexandre Belloni <[email protected]>
  5. 11 Jan, 2016 2 commits
    • Rasmus Villemoes's avatar
      rtc: ds1685: don't try to micromanage sysfs output size · 9c25a106
      Rasmus Villemoes authored
      ...and don't do it wrong.
      "not ok or N/A" has length 13. Add the trailing newline, and the
      snprintf return value will be 14. However, we lied to snprintf and
      told it that only 13 bytes were available. Hence snprintf has only
      written "not ok or N/" and a trailing '\0' to the buffer. Next we
      continue lying, this time to the upper sysfs layer, claiming that we
      wrote 14 meaningful bytes to the buffer. That'll make the upper layer
      copy "not ok or N/" plus two nul bytes to user space (one nul byte
      from snprintf, the other since sysfs takes care to clear the buffer
      before giving it to the ->show method).
      In the other cases, the claimed buffer size is closer to sufficient,
      but we'll still get a nul byte instead of a newline written to user
      space.  There's absolutely no reason to try to predict the output
      size, and there's plenty of room in the buffer, so just use sprintf.
      Signed-off-by: default avatarRasmus Villemoes <[email protected]>
      Signed-off-by: default avatarAlexandre Belloni <[email protected]>
    • Rasmus Villemoes's avatar
      rtc: use %ph for short hex dumps · ff67abd2
      Rasmus Villemoes authored
      This makes the generated code slightly smaller.
      Signed-off-by: default avatarRasmus Villemoes <[email protected]>
      Signed-off-by: default avatarAlexandre Belloni <[email protected]>
  6. 05 Sep, 2015 1 commit
  7. 17 Apr, 2015 3 commits
  8. 28 Feb, 2015 3 commits
  9. 17 Feb, 2015 1 commit