[lkml]   [2020]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 10/10] gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse
On Tue, Jun 30, 2020 at 3:34 PM Lee Jones <> wrote:

> 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
> Cc: Asmaa Mnebhi <>
> Signed-off-by: Lee Jones <>

Patch applied!

Linus Walleij

 \ /
  Last update: 2020-07-08 09:24    [W:0.185 / U:1.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site