Re: [PATCH v2 3/3] scsi: ufs: cleanup ufs initialization path
From: Bart Van Assche
Date: Thu May 28 2020 - 12:18:40 EST
On 2020-05-28 07:58, Avri Altman wrote:
>> From: Bean Huo <beanhuo@xxxxxxxxxx>
>> +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.