Re: [PATCH] x86/sgx: Use guard() instead of mutex_lock() to simplify code

From: Dave Hansen
Date: Mon Sep 01 2025 - 14:42:30 EST


On 9/1/25 06:22, Liao Yuanhong wrote:
> Using guard(mutex) instead of mutex_lock/mutex_unlock pair. Simplifies the
> error handling to just return in case of error. No need for the 'err_out'
> label anymore so remove it.

I don't plan on applying patches like this. Yes, they marginally
simplify the code, but they do it at the cost of code churn and adding
new bugs. In other words, they're not worth it.