On Sat, 2020-05-30 at 06:37 +, Avri Altman wrote:
> > + /* Get the length of descriptor */
> > + ufshcd_map_desc_id_to_length(hba, desc_id, &buff_len);
> > + if (!buff_len) {
> > + dev_err(hba->dev, "%s: Failed to get desc length",
> > __func__);
> > +
Hi Avri
thanks your review.
On Sat, 2020-05-30 at 06:37 +, Avri Altman wrote:
> > - case QUERY_DESC_IDN_RFU_0:
> > - case QUERY_DESC_IDN_RFU_1:
>
> You forgot to check that desc_id < QUERY_DESC_IDN_MAX
I deleted it since I saw the caller has checked this.
I will add back.
>
>
> - case QUERY_DESC_IDN_RFU_0:
> - case QUERY_DESC_IDN_RFU_1:
You forgot to check that desc_id < QUERY_DESC_IDN_MAX
> + if (desc_id == QUERY_DESC_IDN_RFU_0 || desc_id ==
> QUERY_DESC_IDN_RFU_1)
> *desc_len = 0;
> - break;
> - default:
> -
From: Bean Huo
At UFS initialization stage, to get the length of the descriptor,
ufshcd_read_desc_length() being called 6 times. Instead, we will
capture the descriptor size the first time we'll read it.
Delete unnecessary redundant code, remove ufshcd_read_desc_length(),
ufshcd_init_desc_sizes
4 matches
Mail list logo