lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v5 07/16] ufs: core: mcq: Calculate queue depth
From
On 11/22/22 20:10, Asutosh Das wrote:
> +int ufshcd_mcq_decide_queue_depth(struct ufs_hba *hba)
> +{
> + int mac;
> +
> + /* Mandatory to implement get_hba_mac() */
> + mac = ufshcd_mcq_vops_get_hba_mac(hba);
> + if (mac < 0) {
> + dev_err(hba->dev, "Failed to get mac, err=%d\n", mac);
> + return mac;
> + }
> +
> + WARN_ON(!hba->dev_info.bqueuedepth);
> + /*
> + * max. value of bqueuedepth = 256, mac is host dependent.
> + * It is mandatory for UFS device to define bQueueDepth if
> + * shared queuing architecture is enabled.
> + */
> + return min_t(int, mac, hba->dev_info.bqueuedepth);
> +}

Isn't WARN_ON_ONCE() recommended over WARN_ON()?

Otherwise this patch looks good to me.

Thanks,

Bart.

\
 
 \ /
  Last update: 2022-11-26 02:14    [W:0.072 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site