From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonghwa Lee <jonghwa3.lee@samsung.com>,
rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
Alessandro Zummo <a.zummo@towertech.it>,
Abhilash Kesavan <a.kesavan@samsung.com>,
Chiwoong Byun <woong.byun@samsung.com>,
Myugnjoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [rtc-linux] [RESEND PATCH] RTC: MAX77686: Add Maxim 77686 driver
Date: Tue, 18 Dec 2012 17:00:54 -0800 [thread overview]
Message-ID: <1355878854.2139.5.camel@joe-AO722> (raw)
In-Reply-To: <20121218163009.fb21fec8.akpm@linux-foundation.org>
On Tue, 2012-12-18 at 16:30 -0800, Andrew Morton wrote:
> On Wed, 28 Nov 2012 15:50:57 +0900
> Jonghwa Lee <jonghwa3.lee@samsung.com> wrote:
>
> > Add driver for support max77686 rtc.
> > MAX77686 rtc support smpl and wtsr mode. It has two alarm register
> > which can be used for alarming to wake system up. This drvier uses regmap
> > to access its register.
> >
> > ...
> >
> > +static inline int max77686_rtc_calculate_wday(u8 shifted)
> > +{
> > + int counter = -1;
> > + while (shifted) {
> > + shifted >>= 1;
> > + counter++;
> > + }
> > + return counter;
> > +}
>
> We should be able to use log2() in here?
fls(shifted) - 1
next prev parent reply other threads:[~2012-12-19 1:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 6:50 [RESEND PATCH] RTC: MAX77686: Add Maxim 77686 driver Jonghwa Lee
2012-12-19 0:30 ` [rtc-linux] " Andrew Morton
2012-12-19 1:00 ` Joe Perches [this message]
2012-12-20 1:40 ` jonghwa3.lee
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=1355878854.2139.5.camel@joe-AO722 \
--to=joe@perches.com \
--cc=a.kesavan@samsung.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=jonghwa3.lee@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=rtc-linux@googlegroups.com \
--cc=woong.byun@samsung.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