Re: [PATCH] pwm: atmel-pwm: fix calculation of prescale value

From: Thierry Reding
Date: Thu Sep 25 2014 - 03:49:55 EST


On Thu, Sep 25, 2014 at 09:47:34AM +0200, Nikolaus Voss wrote:
> On Thu, 25 Sep 2014, Thierry Reding wrote:
[...]
> >>- }
> >>+ div >>= 1;
> >>+ ++pres;
> >
> >Unless you really need the prefix increment behaviour (you don't in this
> >case) I prefer using the postfix operator because it is slightly more
> >idiomatic.
>
> ok (as I mostly do C++ programming, I prefer the prefix as it is usually
> more efficient for user-defined types).

It is? That's intriguing...

Thierry

Attachment: pgpejM4OM76fi.pgp
Description: PGP signature