Re: [PATCH v2 3/3] scsi: ufs: cleanup ufs initialization path

Bart Van Assche
2020-05-28T16:18:37Z

On 2020-05-28 07:58, Avri Altman wrote:
>> From: Bean Huo <beanhuo@micron.com>
>> +static void ufshcd_update_desc_length(struct ufs_hba *hba,
>> + enum desc_idn desc_id, int desc_len)
> desc_len is at most 255 so maybe u8?

At least on x86 using types like 'u8' for function arguments may lead to
suboptimal code because it may cause the compiler to insert a widening
instruction. How about changing 'int desc_len' into 'unsigned desc_len'
instead?

Thanks,

Bart.