[PATCH v2] staging: unisys: visorbus: visorchannel: Refactor locking code to be statically deterministic.

Kershner, David A David.Kershner at unisys.com
Thu Oct 20 00:04:19 UTC 2016


> -----Original Message-----
> From: Cathal Mullaney [mailto:chuckleberryfinn at gmail.com]
> Subject: [PATCH v2] staging: unisys: visorbus: visorchannel: Refactor locking
> code to be statically deterministic.
> 
> This patch makes locking in visorchannel_signalempty statically
> deterministic.
> As a result this patch fixes the sparse warning:
> Context imbalance in 'visorchannel_signalempty' - different lock
> contexts for basic block.
> 
> The logic of the locking code doesn't change but the layout of the
> original code is "frowned upon"
> according to mails on sparse context checking.
> Refactoring removes the warning and makes the code more readable.
> 
> Signed-off-by: Cathal Mullaney <chuckleberryfinn at gmail.com>

Tested-by: David Kershner <david.kershner at unisys.com>

> ---
> V2: Removed unnecessary variable initialization, as suggested by Tim Sell
> <Timothy.Sell at unisys.com>.
> 
>  drivers/staging/unisys/visorbus/visorchannel.c | 30 ++++++++++++++++----
> ------



More information about the devel mailing list