[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5349dca5-b8a4-d668-9370-c722da7c9ead@acm.org>
Date: Thu, 1 Jul 2021 10:00:35 -0700
From: Bart Van Assche <bvanassche@....org>
To: Jaegeuk Kim <jaegeuk@...nel.org>, linux-kernel@...r.kernel.org,
linux-scsi@...r.kernel.org
Cc: Stanley Chu <stanley.chu@...iatek.com>,
Can Guo <cang@...eaurora.org>, Bean Huo <beanhuo@...ron.com>,
Asutosh Das <asutoshd@...eaurora.org>
Subject: Re: [PATCH] scsi: ufs: add missing host_lock in setup_xfer_req
On 7/1/21 8:23 AM, Bart Van Assche wrote:
> On 6/30/21 5:51 PM, Jaegeuk Kim wrote:
>> diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
>> index c98d540ac044..194755c9ddfe 100644
>> --- a/drivers/scsi/ufs/ufshcd.h
>> +++ b/drivers/scsi/ufs/ufshcd.h
>> @@ -1229,8 +1229,13 @@ static inline int ufshcd_vops_pwr_change_notify(struct ufs_hba *hba,
>> static inline void ufshcd_vops_setup_xfer_req(struct ufs_hba *hba, int tag,
>> bool is_scsi_cmd)
>> {
>> - if (hba->vops && hba->vops->setup_xfer_req)
>> - return hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
>> + if (hba->vops && hba->vops->setup_xfer_req) {
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(hba->host->host_lock, flags);
>> + hba->vops->setup_xfer_req(hba, tag, is_scsi_cmd);
>> + spin_unlock_irqrestore(hba->host->host_lock, flags);
>> + }
>> }
>
> Since this function has only one caller, how about moving it into ufshcd.c?
(replying to my own email)
Since I just noticed that there are many other similar function
definitions in ufshcd.h, let's postpone moving these definitions until a
later time.
Reviewed-by: Bart Van Assche <bvanassche@....org>
Powered by blists - more mailing lists