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]
Date:   Tue, 1 Oct 2019 14:57:05 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Petr Mladek <pmladek@...e.com>, linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Hans Verkuil <hverkuil@...all.nl>
Subject: Re: [PATCH v1 3/4] [media] usb: pulse8-cec: Switch to use %ptT

On Fri, Jan 04, 2019 at 09:30:08PM +0200, Andy Shevchenko wrote:
> Use %ptT instead of open coded variant to print content of
> time64_t type in human readable format.

Hans, any objections on this?

> Cc: Hans Verkuil <hverkuil@...all.nl>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
>  drivers/media/usb/pulse8-cec/pulse8-cec.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c
> index b085b14f3f87..05f997e9ce28 100644
> --- a/drivers/media/usb/pulse8-cec/pulse8-cec.c
> +++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c
> @@ -328,7 +328,6 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
>  	u8 *data = pulse8->data + 1;
>  	u8 cmd[2];
>  	int err;
> -	struct tm tm;
>  	time64_t date;
>  
>  	pulse8->vers = 0;
> @@ -349,10 +348,7 @@ static int pulse8_setup(struct pulse8 *pulse8, struct serio *serio,
>  	if (err)
>  		return err;
>  	date = (data[0] << 24) | (data[1] << 16) | (data[2] << 8) | data[3];
> -	time64_to_tm(date, 0, &tm);
> -	dev_info(pulse8->dev, "Firmware build date %04ld.%02d.%02d %02d:%02d:%02d\n",
> -		 tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
> -		 tm.tm_hour, tm.tm_min, tm.tm_sec);
> +	dev_info(pulse8->dev, "Firmware build date %ptT\n", &date);
>  
>  	dev_dbg(pulse8->dev, "Persistent config:\n");
>  	cmd[0] = MSGCODE_GET_AUTO_ENABLED;
> -- 
> 2.19.2
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ