Re: [PATCH v5 3/4] scsi: ufs: core: Introduce a new clock_gating lock

From: Bart Van Assche
Date: Mon Nov 25 2024 - 16:35:59 EST


On 11/23/24 11:08 PM, Avri Altman wrote:
Introduce a new clock gating lock to serialize access to some of the
clock gating members instead of the host_lock.

While at it, simplify the code with the guard() macro and co for
automatic cleanup of the new lock. There are some explicit
spin_lock_irqsave/spin_unlock_irqrestore snaking instances I left behind
because I couldn't make heads or tails of it.

Additionally, move the trace_ufshcd_clk_gating() call from inside the
region protected by the lock as it doesn't needs protection.

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>