On 11/18/24 6:41 AM, Avri Altman wrote:Should I apply those to host_lock as well?
+ spin_lock_irqsave(hba->host->host_lock, flags);
+ if (ufshcd_has_pending_tasks(hba) ||
+ hba->ufshcd_state != UFSHCD_STATE_OPERATIONAL) {
+ spin_unlock_irqrestore(hba->host->host_lock, flags);
+ return;
+ }
+ spin_unlock_irqrestore(hba->host->host_lock, flags);
Why explicit lock/unlock calls instead of using scoped_guard()?
Not sure what you mean?+ * @clk_gating_workq: workqueue for clock gating work.
+ * @lock: serialize access to some struct ufs_clk_gating members
Please document that @lock is the outer lock relative to the host lock.
host_lock is nested in one place only, should this goes to the @lock documentation?