Re: [PATCH] TXx9 SPI controller driver (take 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 30 Jun 2007 10:46:20 -0700, David Brownell <david-b@xxxxxxxxxxx> wrote:
> > The compiler will optimize "1000000000 / 2 / spi->max_speed_hz" into
> > "500000000 / spi->max_speed_hz", so it can be treat as one "/", no?
> 
> Sure it's deterministic.  But that doesn't prevent me from
> needing a double-take to figure what it does ... it's best
> to avoid confusing idioms in code.  At the very least, put
> parentheses there ...

OK, I will use parentheses while I think 1000000000 is important part.
Well, maybe NSEC_PER_SEC would be better.
---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux