mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Wan ZongShun <mcuos.com@gmail.com>
Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	Alessandro Zummo <a.zummo@towertech.it>
Subject: Re: [rtc-linux] [PATCH] rtc: driver for the DryIce block found in i.MX25 chips
Date: Mon, 7 Jun 2010 08:20:28 +0300	[thread overview]
Message-ID: <20100607052027.GG14583@jasper.tkos.co.il> (raw)
In-Reply-To: <AANLkTimzq5zBEqrxzkm_D7trn7ikJX8yqny_6SogdIO6@mail.gmail.com>

Hi Wan,

On Sat, Jun 05, 2010 at 11:08:46PM +0800, Wan ZongShun wrote:
> Some minor comments below:

One question though.

> > +/*
> > + * read the seconds portion of the current time from the dryice time counter
> > + */
> > +static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm)
> > +{
> > +       struct imxdi_dev *imxdi = dev_get_drvdata(dev);
> > +       unsigned long now;
> > +
> > +       now = __raw_readl(imxdi->ioaddr + DTCMR);
> > +       rtc_time_to_tm(now, tm);
> > +
> 
> When we want to return a tm value, call rtc_valid_tm() to check the tm
> that is a good habit.

Isn't rtc_time_to_tm() guaranteed to produce a valid tm value?

> 
> > +       return 0;
> > +}

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

  parent reply	other threads:[~2010-06-07  5:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-02  5:37 Baruch Siach
2010-06-04 21:53 ` Andrew Morton
2010-06-07  4:56   ` Baruch Siach
2010-06-05 15:08 ` [rtc-linux] " Wan ZongShun
2010-06-06 15:37   ` Wan ZongShun
2010-06-07  4:53   ` Baruch Siach
2010-06-07  5:20   ` Baruch Siach [this message]
2010-06-07  6:20     ` Wan ZongShun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100607052027.GG14583@jasper.tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcuos.com@gmail.com \
    --cc=rtc-linux@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome