RE: [PATCH v1 02/16] ufs: core: Introduce Multi-circular queue capability

From: Avri Altman
Date: Sat Sep 24 2022 - 04:17:11 EST


>
> #define EXT_IID_CAP_SHIFT 10
> +#define MCQ_SUPP_SHIFT 30
> #define ufshcd_toggle_vreg(_dev, _vreg, _on) \
> ({ \
> int _ret; \
> @@ -2240,6 +2241,10 @@ static inline int ufshcd_hba_capabilities(struct
> ufs_hba *hba)
> if (err)
> dev_err(hba->dev, "crypto setup failed\n");
>
> + hba->mcq_sup = (hba->capabilities & MASK_MCQ_SUPPORT) >>
> MCQ_SUPP_SHIFT;
Since you are just testing for bit30, MASK_MCQ_SUPPORT is not really needed.
Maybe just:
hba->mcq_sup = (hba->capabilities >> MCQ_SUPP_SHIFT) & 1;

Thanks,
Avri