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  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:	Thu, 20 Mar 2014 12:19:55 -0700
From:	Joe Perches <joe@...ches.com>
To:	RAGHAVENDRA GANIGA <ravi23ganiga@...il.com>
Cc:	a.zummo@...ertech.it, linux-kernel@...r.kernel.org,
	rtc-linux@...glegroups.com
Subject: Re: [PATCH] rtc: add support for maxim dallas rtc ds1347

On Fri, 2014-03-21 at 00:30 +0530, RAGHAVENDRA GANIGA wrote:
> This is a patch to add support for
> maxim dallas rtc ds1347
[]
> diff --git a/drivers/rtc/rtc-ds1347.c b/drivers/rtc/rtc-ds1347.c
[]
> +static int ds1347_read_time(struct device *dev, struct rtc_time *dt)
> +{
[]
> +	/* year in linux is from 1900 i.e in range of 100
> +	in rtc it is from 00 to 99 so subtract
> +	the linux year by 100 */

> +	if (dt->tm_year >= 100)
> +		dt->tm_year -= 100;

This depends on how long you want to live, but it could be

	while (dt->tm_year >= 100)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists