lkml.org 
[lkml]   [2020]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 29/30] sgi-xp: Add missing annotation for xpc_disconnect_channel()
Date
Sparse reports a warning at xpc_disconnect_channel()
warning: context imbalance in xpc_disconnect_channel() - unexpected unlock
The root cause is a missing annotation at xpc_disconnect_channel()
Add the missing __must_hold(&ch->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
drivers/misc/sgi-xp/xpc_channel.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/misc/sgi-xp/xpc_channel.c b/drivers/misc/sgi-xp/xpc_channel.c
index 8e6607fc8a67..a1e92488e9bc 100644
--- a/drivers/misc/sgi-xp/xpc_channel.c
+++ b/drivers/misc/sgi-xp/xpc_channel.c
@@ -752,6 +752,7 @@ xpc_initiate_disconnect(int ch_number)
void
xpc_disconnect_channel(const int line, struct xpc_channel *ch,
enum xp_retval reason, unsigned long *irq_flags)
+ __must_hold(&ch->lock)
{
u32 channel_was_connected = (ch->flags & XPC_C_CONNECTED);

--
2.24.1
\
 
 \ /
  Last update: 2020-02-24 00:19    [W:0.252 / U:8.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site