lkml.org 
[lkml]   [2017]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] powerpc: sysdev: cpm1: Optimise gpio bit calculation
From
Date


Le 10/03/2017 à 14:06, Segher Boessenkool a écrit :
> On Fri, Mar 10, 2017 at 11:54:19AM +0100, Christophe LEROY wrote:
>> 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

\
 
 \ /
  Last update: 2017-03-10 15:05    [W:0.201 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site