Skip to content
Commit a7a9ad23 authored by Lee Jones's avatar Lee Jones Committed by Linus Walleij
Browse files

gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse



Sparse cannot peer into other functions to see when and if locks are
acquired and released, thus it simply warns that a 'context imbalance'
is detected instead.  Let's be kind to Sparse and let it know that
this behaviour is intentional.

 drivers/gpio/gpio-mlxbf2.c:125:12: warning: context imbalance in 'mlxbf2_gpio_lock_acquire' - different lock contexts for basic block
 drivers/gpio/gpio-mlxbf2.c:151:13: warning: context imbalance in 'mlxbf2_gpio_lock_release' - unexpected unlock

Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Reviewed-by: default avatarAsmaa Mnebhi <asmaa@mellanox.com>
Cc: Asmaa Mnebhi <Asmaa@mellanox.com>
Link: https://lore.kernel.org/r/20200630133345.2232932-11-lee.jones@linaro.org
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2f9bce5f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment