lkml.org 
[lkml]   [2014]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] gpio: clamp returned values to the boolean range
From
Date
On Wed, 2014-03-05 at 10:33 +0800, Linus Walleij wrote:
> the local "value" variable in the function should still be
> converted to a bool as well right? And the assignment should still
> be "false" not 0. So I would still add my hunk of code...

No idea. I don't know the code, just wanted to point
out that a bool is not an int.

Generically, I think converting an int to a bool in
any "raw" function probably isn't the right thing to do.

Especially if any of these GPIOs are ever used as ports
(aggregates) in any access.



\
 
 \ /
  Last update: 2014-03-09 16:02    [W:0.134 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site