Re: [<RFC PATCH v1> 1/2] scsi: ufs: add write booster feature support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-02-21 16:38, Asutosh Das wrote:
> @@ -371,6 +379,12 @@ UFS_GEOMETRY_DESC_PARAM(enh4_memory_max_alloc_units,
>  	_ENM4_MAX_NUM_UNITS, 4);
>  UFS_GEOMETRY_DESC_PARAM(enh4_memory_capacity_adjustment_factor,
>  	_ENM4_CAP_ADJ_FCTR, 2);
> +UFS_GEOMETRY_DESC_PARAM(wb_max_alloc_units, _WB_MAX_ALLOC_UNITS, 4);
> +UFS_GEOMETRY_DESC_PARAM(wb_max_wb_luns, _WB_MAX_WB_LUNS, 1);
> +UFS_GEOMETRY_DESC_PARAM(wb_buff_cap_adj, _WB_BUFF_CAP_ADJ, 1);
> +UFS_GEOMETRY_DESC_PARAM(wb_sup_red_type, _WB_SUP_RED_TYPE, 1);
> +UFS_GEOMETRY_DESC_PARAM(wb_sup_wb_type, _WB_SUP_WB_TYPE, 1);
> +
>  
>  static struct attribute *ufs_sysfs_geometry_descriptor[] = {

This patch converts a bunch of single blank lines into double blank
lines. Are such changes useful?

> +	/* Enable WB only for UFS-3.1 OR if desc len >= 0x59 */
> +	if (dev_info->wspecversion >= 0x310) {
> +		hba->dev_info.d_ext_ufs_feature_sup =
> +			desc_buf[DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP]
> +								<< 24 |
> +			desc_buf[DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP + 1]
> +								<< 16 |
> +			desc_buf[DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP + 2]
> +								<< 8 |
> +			desc_buf[DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP + 3];

Please use get_unaligned_be32() instead of open-coding it.

> +			res = wb_buf[0] << 24 | wb_buf[1] << 16 |
> +				wb_buf[2] << 8 | wb_buf[3];

Same comment here.

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux