From fcb4a6dc912e93ee3c5f4a1655d502e228b24f5c Mon Sep 17 00:00:00 2001 From: andvar Date: Thu, 19 Oct 2023 22:07:13 +0000 Subject: [PATCH] Fix printf specifier for tvp->tv_sec from 0x%08x to 0x%08llx. Remove printf secs argument for "Regs after:" printout, none expected. Remove "Setting RTC to 0x%08x." and non existing secs arg from settime_old(). Code was changed with rev. 1.14 without fully adjusting DEBUG code. Fixes RTC_DEBUG build for next68k. --- sys/arch/next68k/next68k/rtc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/arch/next68k/next68k/rtc.c b/sys/arch/next68k/next68k/rtc.c index efcf17a926b9..bc81815a0ebd 100644 --- a/sys/arch/next68k/next68k/rtc.c +++ b/sys/arch/next68k/next68k/rtc.c @@ -1,4 +1,4 @@ -/* $NetBSD: rtc.c,v 1.19 2023/02/03 23:13:01 tsutsui Exp $ */ +/* $NetBSD: rtc.c,v 1.20 2023/10/19 22:07:13 andvar Exp $ */ /* * Copyright (c) 1998 Darrin Jewell * Copyright (c) 1997 Rolf Grossmann @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.19 2023/02/03 23:13:01 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtc.c,v 1.20 2023/10/19 22:07:13 andvar Exp $"); #include #include /* for panic */ @@ -321,7 +321,7 @@ settime_old(todr_chip_handle_t tcr, struct clock_ymdhms *dt) rtc_write(RTC_CONTROL, rtc_read(RTC_CONTROL) & ~RTC_START); #ifdef RTC_DEBUG - printf("Setting RTC to 0x%08x. Regs before:\n", secs); + printf("Regs before:\n"); rtc_print(); #endif @@ -352,7 +352,7 @@ settime_old(todr_chip_handle_t tcr, struct clock_ymdhms *dt) rtc_write(RTC_YR, bintobcd(dt->dt_year % 100)); #ifdef RTC_DEBUG - printf("Regs after:\n", secs); + printf("Regs after:\n"); rtc_print(); #endif @@ -380,7 +380,7 @@ settime_new(todr_chip_handle_t tch, struct timeval *tvp) rtc_write(RTC_CONTROL, rtc_read(RTC_CONTROL) & ~RTC_START); #ifdef RTC_DEBUG - printf("Setting RTC to 0x%08x. Regs before:\n", tvp->tv_sec); + printf("Setting RTC to 0x%08llx. Regs before:\n", tvp->tv_sec); rtc_print(); #endif @@ -390,7 +390,7 @@ settime_new(todr_chip_handle_t tch, struct timeval *tvp) rtc_write(RTC_CNTR3, (tvp->tv_sec) & 0xff); #ifdef RTC_DEBUG - printf("Regs after:\n", secs); + printf("Regs after:\n"); rtc_print(); #endif