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

Avri Altman Avri.Altman at wdc.com
Sat Sep 24 01:13:38 PDT 2022


> 
>  #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



More information about the linux-arm-kernel mailing list