lkml.org 
[lkml]   [2012]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] gpiolib: Add comments explaining the _cansleep() WARN_ON()s
From
On Fri, Feb 17, 2012 at 7:24 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:

> I've seen users getting very confused by the WARN_ON()s for can_sleep
> GPIOs in the atomic-safe paths, the discoverability of the non-atomic
> version of the API seems to be hampered by the fact that it's defined
> in a header file not the .c file where the warnings are.
>
> Add a couple of comments next to the warnings to help people on their
> way.

Good!

> +       /* Should be using gpio_get_value_cansleep() or a different GPIO */
>        WARN_ON(chip->can_sleep);

Actually I cannot parse the "or a different GPIO" part.

If this means that the user may be addressing the wrong GPIO pin,
then we could spell that out I presume, but maybe you are referring
to something else?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-17 19:43    [W:0.031 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site