[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170827133751.GD13622@lunn.ch>
Date: Sun, 27 Aug 2017 15:37:51 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Andreas Färber <afaerber@...e.de>
Cc: Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
linux-rtc@...r.kernel.org, Alessandro Zummo <a.zummo@...ertech.it>,
Roc He <hepeng@...oo.tv>,
????????? <jiang.liqin@...iatech.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 2/3] rtc: Add Realtek RTD1295
> >> +static inline int rtd119x_rtc_year_days(int year)
> >> +{
> >> + return rtc_year_days(1, 12, year);
> >
> > I'm not sure it is worth wrapping rtc_year_days
> [snip]
>
> Well, I found your rtc_year_days rather confusing and had to play with
> the arguments until I got it working as expected, so I wanted an inline
> function (or macro) as abstraction from my three callers.
I agree with that. I was wondering why 1st December was being used. I
would say this API does not do too well on Rusty's API Design
Manifesto.
It does at least get the day/month/year in the right order ;-)
Andrew
Powered by blists - more mailing lists