watchdog: starfive: add lock annotations to fix context imbalances
authorBen Dooks <ben.dooks@codethink.co.uk>
Wed, 22 Nov 2023 08:51:18 +0000 (08:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:29 +0000 (20:14 +0000)
commit1a63d7f8aa39d0650882c351842fbcd399fcd0c3
tree334282898a60c8b61623e5b3201296980daa9a81
parentb9359c3a4278e59193e9166bf3da90e46c0d7ed0
watchdog: starfive: add lock annotations to fix context imbalances

[ Upstream commit f77999887235f8c378af343df11a6bcedda5b284 ]

Add the necessary __acquires() and __releases() to the functions
that take and release the wdt lock to avoid the following sparse
warnings:

drivers/watchdog/starfive-wdt.c:204:13: warning: context imbalance in 'starfive_wdt_unlock' - wrong count at exit
drivers/watchdog/starfive-wdt.c:212:9: warning: context imbalance in 'starfive_wdt_lock' - unexpected unlock

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20231122085118.177589-1-ben.dooks@codethink.co.uk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/watchdog/starfive-wdt.c