Thread (10 messages) 10 messages, 3 authors, 2017-03-21

Re: [PATCH] powerpc: sysdev: cpm1: Optimise gpio bit calculation

From: Christophe LEROY <hidden>
Date: 2017-03-10 14:05:05
Also in: lkml


Le 10/03/2017 à 14:06, Segher Boessenkool a écrit :
On Fri, Mar 10, 2017 at 11:54:19AM +0100, Christophe LEROY wrote:
quoted
gpio_get() and gpio_set() are used extensively by some GPIO based
drivers like SPI, NAND, so it may be worth it as it doesn't impair
readability (if anyone prefers, we could write  (1 << 31) >> i  instead
of  0x80000000 >> i )
1 << 31 is undefined behaviour, of course.
Shall it be 1U << 31 ?

Christophe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help