Re: [PATCH v2 1/3] scsi: ufs: core: Introduce mcq ops to config cqid

From: Powen Kao (高伯文)
Date: Tue May 30 2023 - 05:42:58 EST


On Tue, 2023-05-30 at 09:20 +0200, AngeloGioacchino Del Regno wrote:
>
> If your return value here is not -EOPNOTSUPP you may want to perform
> some
> different action... and perhaps ufshcd_config_mcq() should be changed
> to
> return a failure.
> Should also be trivial to do so, since this function is called 3
> times in
> total, and only in ufshcd_device_init(), which is already returning
> int.
>
> So, I would say....
>
> static int ufshcd_config_mcq(struct ufs_hba *hba)
> {
>
> ..... code .....
>
> ret = ufshcd_mcq_vops_config_cqid(hba);
> if (ret) {
> if (ret != -EOPNOTSUPP)
> return ret;
>
> /* No special configuration, go for 1:1 mapping */
> for (i = 0; ....)
> ....
> }
>
> Regards,
> Angelo
>
>

Hi Angelo,

That's a good point.
Can we update this later in another patch to take care of
ufshcd_config_mcq()'s return value since this patch focus on
introducing new vops?

Best,
Po-Wen