<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/time/timeconv.c, branch v2.6.38-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/time/timeconv.c?h=v2.6.38-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/time/timeconv.c?h=v2.6.38-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-09-24T14:20:56Z</updated>
<entry>
<title>time: add function to convert between calendar time and broken-down time for universal use</title>
<updated>2009-09-24T14:20:56Z</updated>
<author>
<name>Zhaolei</name>
<email>zhaolei@cn.fujitsu.com</email>
</author>
<published>2009-09-23T22:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=57f1f0874f426a9bdfc5cd3f886113dd5cd17834'/>
<id>urn:sha1:57f1f0874f426a9bdfc5cd3f886113dd5cd17834</id>
<content type='text'>
There are many similar code in kernel for one object: convert time between
calendar time and broken-down time.

Here is some source I found:
  fs/ncpfs/dir.c
  fs/smbfs/proc.c
  fs/fat/misc.c
  fs/udf/udftime.c
  fs/cifs/netmisc.c
  net/netfilter/xt_time.c
  drivers/scsi/ips.c
  drivers/input/misc/hp_sdc_rtc.c
  drivers/rtc/rtc-lib.c
  arch/ia64/hp/sim/boot/fw-emu.c
  arch/m68k/mac/misc.c
  arch/powerpc/kernel/time.c
  arch/parisc/include/asm/rtc.h
  ...

We can make a common function for this type of conversion, At least we
can get following benefit:

1: Make kernel simple and unify
2: Easy to fix bug in converting code
3: Reduce clone of code in future
   For example, I'm trying to make ftrace display walltime,
   this patch will make me easy.

This code is based on code from glibc-2.6

Signed-off-by: Zhao Lei &lt;zhaolei@cn.fujitsu.com&gt;
Cc: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Andi Kleen &lt;andi@firstfloor.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
