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
| ||
|
Message-ID: <1355878854.2139.5.camel@joe-AO722> Date: Tue, 18 Dec 2012 17:00:54 -0800 From: Joe Perches <joe@...ches.com> To: Andrew Morton <akpm@...ux-foundation.org> Cc: Jonghwa Lee <jonghwa3.lee@...sung.com>, rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org, Alessandro Zummo <a.zummo@...ertech.it>, Abhilash Kesavan <a.kesavan@...sung.com>, Chiwoong Byun <woong.byun@...sung.com>, Myugnjoo Ham <myungjoo.ham@...sung.com>, Kyungmin Park <kyungmin.park@...sung.com> Subject: Re: [rtc-linux] [RESEND PATCH] RTC: MAX77686: Add Maxim 77686 driver 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@...sung.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 -- 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