lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 1 Jun 2023 11:12:57 -0700
From:   "Bao D. Nguyen" <quic_nguyenb@...cinc.com>
To:     Stanley Chu <stanley.chu@...iatek.com>,
        <linux-scsi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <martin.petersen@...cle.com>, <avri.altman@....com>,
        <alim.akhtar@...sung.com>, <jejb@...ux.ibm.com>,
        <bvanassche@....org>
Subject: Re: [PATCH v1] ufs: core: Remove the nolock version of
 ufshcd_mcq_poll_cqe()

On 6/1/2023 2:02 AM, Stanley Chu wrote:
> Since ufshcd_mcq_poll_cqe_nolock() is no longer used by any users,
> it should be removed.
> 
> Signed-off-by: Stanley Chu <stanley.chu@...iatek.com>
> ---
>   drivers/ufs/core/ufs-mcq.c | 17 ++++-------------
>   1 file changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
> index 920eb954f594..785fc9762cad 100644
> --- a/drivers/ufs/core/ufs-mcq.c
> +++ b/drivers/ufs/core/ufs-mcq.c
> @@ -307,11 +307,13 @@ void ufshcd_mcq_compl_all_cqes_lock(struct ufs_hba *hba,
>   	spin_unlock_irqrestore(&hwq->cq_lock, flags);
>   }
>   
> -static unsigned long ufshcd_mcq_poll_cqe_nolock(struct ufs_hba *hba,
> -						struct ufs_hw_queue *hwq)
> +unsigned long ufshcd_mcq_poll_cqe_lock(struct ufs_hba *hba,
> +				       struct ufs_hw_queue *hwq)
>   {
>   	unsigned long completed_reqs = 0;
> +	unsigned long flags;
>   
> +	spin_lock_irqsave(&hwq->cq_lock, flags);
>   	ufshcd_mcq_update_cq_tail_slot(hwq);
>   	while (!ufshcd_mcq_is_cq_empty(hwq)) {
>   		ufshcd_mcq_process_cqe(hba, hwq);
> @@ -321,17 +323,6 @@ static unsigned long ufshcd_mcq_poll_cqe_nolock(struct ufs_hba *hba,
>   
>   	if (completed_reqs)
>   		ufshcd_mcq_update_cq_head(hwq);
> -
> -	return completed_reqs;
> -}
> -
> -unsigned long ufshcd_mcq_poll_cqe_lock(struct ufs_hba *hba,
> -				       struct ufs_hw_queue *hwq)
> -{
> -	unsigned long completed_reqs, flags;
> -
> -	spin_lock_irqsave(&hwq->cq_lock, flags);
> -	completed_reqs = ufshcd_mcq_poll_cqe_nolock(hba, hwq);
>   	spin_unlock_irqrestore(&hwq->cq_lock, flags);
>   
>   	return completed_reqs;
Hi Stanley,

Other than the commit message that Bart mentioned, this patch looks good.

Reviewed-by: Bao D. Nguyen <quic_nguyenb@...cinc.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ