lkml.org 
[lkml]   [2010]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rtc: AB8500 RTC driver
On Thu, 27 May 2010 08:44:44 +0530 Rabin VINCENT <rabin.vincent@stericsson.com> wrote:

> On Wed, May 26, 2010 at 21:09:04 +0200, Andrew Morton wrote:
> > > --- a/drivers/rtc/rtc-ab8500.c~rtc-ab8500-rtc-driver-update
> > > +++ a/drivers/rtc/rtc-ab8500.c
> > > @@ -46,16 +46,25 @@
> > > #define COUNTS_PER_SEC (0xF000 / 60)
> > > #define AB8500_RTC_EPOCH 2000
> > >
> > > +static const unsigned long ab8500_rtc_time_regs[] = {
> > > + AB8500_RTC_WATCH_TMIN_HI_REG, AB8500_RTC_WATCH_TMIN_MID_REG,
> > > + AB8500_RTC_WATCH_TMIN_LOW_REG, AB8500_RTC_WATCH_TSECHI_REG,
> > > + AB8500_RTC_WATCH_TSECMID_REG
> > > +};
> > > +
> > > +static const unsigned long ab8500_rtc_alarm_regs[] = {
> > > + AB8500_RTC_ALRM_MIN_HI_REG, AB8500_RTC_ALRM_MIN_MID_REG,
> > > + AB8500_RTC_ALRM_MIN_LOW_REG
> > > +};
> >
> > Well, it wasn't necessary to move these into file-global scope. It
> > would be nicer to leave them in function scope, really. I was just
> > pointing out that the `static' was missing, although unnecessary due to
> > compiler magic.
>
> I know, but we moved them out to reduce code duplication because these
> lists were used in multiple functions and were copy/pasted in them.
>

Ah. Good reason :)


\
 
 \ /
  Last update: 2010-05-27 05:49    [W:0.043 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site