lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181113180751.GA197552@dtor-ws>
Date:   Tue, 13 Nov 2018 10:07:51 -0800
From:   Dmitry Torokhov <dmitry.torokhov@...il.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org,
        Alessandro Zummo <a.zummo@...ertech.it>,
        Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        linux-rtc@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
        Joe Perches <joe@...ches.com>,
        Mark Salyzyn <salyzyn@...roid.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH v3 18/20] Input: hp_sdc_rtc - Switch to use %ptR

On Tue, Nov 13, 2018 at 07:17:27PM +0200, Andy Shevchenko wrote:
> Use %ptR instead of open coded variant to print content of
> struct rtc_time in human readable format.
> 
> Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Acked-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

Please feel free to merge with the rest of the series.

> ---
>  drivers/input/misc/hp_sdc_rtc.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c
> index 47eb8ca729fe..abca895a6156 100644
> --- a/drivers/input/misc/hp_sdc_rtc.c
> +++ b/drivers/input/misc/hp_sdc_rtc.c
> @@ -441,12 +441,10 @@ static int hp_sdc_rtc_proc_show(struct seq_file *m, void *v)
>  		seq_puts(m, "BBRTC\t\t: READ FAILED!\n");
>  	} else {
>  		seq_printf(m,
> -			     "rtc_time\t: %02d:%02d:%02d\n"
> -			     "rtc_date\t: %04d-%02d-%02d\n"
> +			     "rtc_time\t: %ptRt\n"
> +			     "rtc_date\t: %ptRd\n"
>  			     "rtc_epoch\t: %04lu\n",
> -			     tm.tm_hour, tm.tm_min, tm.tm_sec,
> -			     tm.tm_year + 1900, tm.tm_mon + 1, 
> -			     tm.tm_mday, epoch);
> +			     &tm, &tm, epoch);
>  	}
>  
>  	if (hp_sdc_rtc_read_rt(&tv)) {
> -- 
> 2.19.1
> 

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ