lkml.org 
[lkml]   [2022]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 2/4] ufs: core: Remove redundant desc_size variable from hba
From

On 02.11.22 3:29 PM, Arthur Simchaev wrote:
> @@ -7446,25 +7428,24 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba,
> static void ufshcd_set_active_icc_lvl(struct ufs_hba *hba)
> {
> int ret;
> - int buff_len = hba->desc_size[QUERY_DESC_IDN_POWER];
> u8 *desc_buf;
> u32 icc_level;
>
> - desc_buf = kmalloc(buff_len, GFP_KERNEL);
> + desc_buf = kmalloc(QUERY_DESC_MAX_SIZE, GFP_KERNEL);
> if (!desc_buf)


Hi Arthur,

Do you think it is better to use kzalloc or kmalloc here? If item in the

descriptor is not supported by the device, it will be 0x00 and then the

relevant feature will be marked as disabled or not supported on the

device feature checkup logic.


Kind regards,

Bean



\
 
 \ /
  Last update: 2022-11-11 16:46    [W:0.063 / U:1.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site