1. 01 Mar, 2018 31 commits
  2. 14 Feb, 2018 4 commits
  3. 13 Feb, 2018 4 commits
    • Colin Ian King's avatar
      rtc: ds1302: remove redundant initializations of pointer bp · 5134d2fd
      Colin Ian King authored
      Pointe bp is being initialized and this value is never read, it
      is being updated to the same value later just before it is going to
      be used. Remove the initialization as it is never read and keep
      the setting of bp closer to the use of bp.
      
      Cleans up clang warnings:
      drivers/rtc/rtc-ds1302.c:115:7: warning: Value stored to 'bp' during
      its initialization is never read
      drivers/rtc/rtc-ds1302.c:46:7: warning: Value stored to 'bp' during
      its initialization is never read
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      5134d2fd
    • James Hogan's avatar
      rtc: goldfish: Add missing MODULE_LICENSE · 82d632b8
      James Hogan authored
      Fix the following warning in MIPS allmodconfig by adding a
      MODULE_LICENSE() at the end of rtc-goldfish.c, based on the file header
      comment which says GNU General Public License version 2:
      
      WARNING: modpost: missing MODULE_LICENSE() in drivers/rtc/rtc-goldfish.o
      
      Fixes: f22d9cdc ("rtc: goldfish: Add RTC driver for Android emulator")
      Signed-off-by: default avatarJames Hogan <jhogan@kernel.org>
      Cc: Miodrag Dinic <miodrag.dinic@mips.com>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
      Cc: linux-rtc@vger.kernel.org
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      82d632b8
    • Baolin Wang's avatar
      rtc: Fix overflow when converting time64_t to rtc_time · 36d46cdb
      Baolin Wang authored
      If we convert one large time values to rtc_time, in the original formula
      'days * 86400' can be overflowed in 'unsigned int' type to make the formula
      get one incorrect remain seconds value. Thus we can use div_s64_rem()
      function to avoid this situation.
      Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      36d46cdb
    • Baolin Wang's avatar
      rtc: Add tracepoints for RTC system · 29a1f599
      Baolin Wang authored
      It will be more helpful to add some tracepoints to track RTC actions when
      debugging RTC driver. Below sample is that we set/read the RTC time, then
      set 2 alarms, so we can see the trace logs:
      
      set/read RTC time:
      kworker/0:1-67 [000] 21.814245: rtc_set_time: UTC (1510301580) (0)
      kworker/0:1-67 [000] 21.814312: rtc_read_time: UTC (1510301580) (0)
      
      set the first alarm timer:
      kworker/0:1-67 [000] 21.829238: rtc_timer_enqueue: RTC timer:(ffffffc15eb49bc8) expires:1510301700000000000 period:0
      kworker/0:1-67 [000] 22.018279: rtc_set_alarm: UTC (1510301700) (0)
      
      set the second alarm timer:
      kworker/0:1-67 [000] 22.230284: rtc_timer_enqueue: RTC timer:(ffffff80088e6430) expires:1510301820000000000 period:0
      
      the first alarm timer was expired:
      kworker/0:1-67 [000] 145.155584: rtc_timer_dequeue: RTC timer:(ffffffc15eb49bc8) expires:1510301700000000000 period:0
      kworker/0:1-67 [000] 145.155593: rtc_timer_fired: RTC timer:(ffffffc15eb49bc8) expires:1510301700000000000 period:0
      kworker/0:1-67 [000] 145.172504: rtc_set_alarm: UTC (1510301820) (0)
      
      the second alarm timer was expired:
      kworker/0:1-67 [000] 269.102353: rtc_timer_dequeue: RTC timer:(ffffff80088e6430) expires:1510301820000000000 period:0
      kworker/0:1-67 [000] 269.102360: rtc_timer_fired: RTC timer:(ffffff80088e6430) expires:1510301820000000000 period:0
      
      disable alarm irq:
      kworker/0:1-67 [000] 269.102469: rtc_alarm_irq_enable: disable RTC alarm IRQ (0)
      Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
      Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
      29a1f599
  4. 11 Feb, 2018 1 commit