Re: [PATCH v2] staging: nvec: use guard(mutex) in nvec_write_sync()

From: Greg Kroah-Hartman

Date: Tue Oct 13 2026 - 02:15:14 EST


On Mon, Oct 12, 2026 at 10:29:26PM +0000, Jeremy Dean Clifton wrote:
> The three return paths of nvec_write_sync() each release
> sync_write_mutex with explicit unlock calls.
>
> Use guard(mutex) to unlock the lock automatically on any return
> path.
>
> This removes the three mutex_unlock() calls.
>
> No functional change.
>
> Signed-off-by: Jeremy Dean Clifton <deaner92@xxxxxxxxx>
> ---
> v2:
> - Reword the commit message to state the motivation and to make
> clear that removing the mutex_unlock() calls is the result of
> the change (Julia Lawall).
> v1: https://lore.kernel.org/all/20261012171312.5998-1-deaner92@xxxxxxxxx/

Please read the archives for why I will not take guard() rewrites of
staging drivers (nor do I want to see you use a LLM in here either.)

sorry,

greg k-h