On 2020-01-26 11:34, Bart Van Assche wrote:
On 2020-01-22 23:25, Can Guo wrote:
+ÂÂÂ /* getting Specification Version in big endian format */
+ÂÂÂ hba->dev_info.spec_version = desc_buf[DEVICE_DESC_PARAM_SPEC_VER] << 8 |
+ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ desc_buf[DEVICE_DESC_PARAM_SPEC_VER + 1];
Please use get_unaligned_be16() instead of open-coding it.
I am just keeping symmetry with the other device descriptors,
for example w_manufacturer_id.