[PATCH 29/30] sgi-xp: Add missing annotation for xpc_disconnect_channel()

From: Jules Irenge
Date: Sun Feb 23 2020 - 18:18:48 EST


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@xxxxxxxxx>
---
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