lkml.org 
[lkml]   [2020]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/5] scsi; ufs: add device descriptor for Host Performance Booster
From
Date
On 4/16/20 1:31 PM, huobean@gmail.com wrote:
> + if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) {

Please introduce a symbolic name instead of using the number 0x80 directly.

> + hba->dev_info.hpb_control_mode =
> + desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE];
> + hba->dev_info.hpb_ver =
> + (u16) (desc_buf[DEVICE_DESC_PARAM_HPB_VER] << 8) |
> + desc_buf[DEVICE_DESC_PARAM_HPB_VER + 1];

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

Thanks,

Bart.

\
 
 \ /
  Last update: 2020-04-23 01:13    [W:0.246 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site