[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87bncb1im5.fsf@saruman.tx.rr.com>
Date: Tue, 6 Oct 2015 22:07:46 -0500
From: Felipe Balbi <balbi@...COM>
To: Daniel Lezcano <daniel.lezcano@...aro.org>,
Tony Lindgren <tony@...mide.com>
CC: Linux OMAP Mailing List <linux-omap@...r.kernel.org>,
Linux ARM Kernel Mailing List
<linux-arm-kernel@...ts.infradead.org>, <tglx@...utronix.de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 09/11] clocksource: add TI 32.768 Hz counter driver
Hi,
Daniel Lezcano <daniel.lezcano@...aro.org> writes:
> On 10/06/2015 07:02 PM, Felipe Balbi wrote:
>> Introduce a new clocksource driver for Texas
>> Instruments 32.768 Hz device which is available
>> on most OMAP-like devices.
>>
>> Signed-off-by: Felipe Balbi <balbi@...com>
>
> Hi Felipe,
>
> With the couple of nits below fixed, you can my:
>
> Acked-by: Daniel Lezcano <daniel.lezcano@...aro.org>
>
> [ ... ]
>
>> +#define OMAP2_32KSYNCNT_REV_OFF 0x0
>> +#define OMAP2_32KSYNCNT_REV_SCHEME (0x3 << 30)
>> +#define OMAP2_32KSYNCNT_CR_OFF_LOW 0x10
>> +#define OMAP2_32KSYNCNT_CR_OFF_HIGH 0x30
>> +
>> +struct ti_32k {
>> + void __iomem *base;
>> + void __iomem *counter;
>> + struct clocksource cs;
>> +};
>> +#define to_ti_32k(cs) (container_of((cs), struct ti_32k, cs))
>
> Usually a static inline is used instead of a macro for that.
not so true and also completely unnecessary, considering container_of()
already type safety ;-)
Try this:
$ git grep -e "#define.*container_of" | wc -l
no strong feelings though. I tend to prefer a macro to wrap
container_of() but won't go into an argument
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (819 bytes)
Powered by blists - more mailing lists