Skip to content
Commit 127c1fbd authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman
Browse files

greybus: connection: Fix sparse warnings around locking



The callers ensures that connection->lock is taken before calling few
routines, but that isn't enough for sparse as it sees an unexpected
unlock.

greybus/connection.c:380:29: warning: context imbalance in 'gb_connection_cancel_operations' - unexpected unlock

Fix that adding __must_lock() attribute to the function declaration.

This also adds the attribute for
gb_connection_flush_incoming_operations(), which isn't showing any
sparse warnings with the current state of code, but with minor
rearrangements of the code.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 68ba0a01
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment