Re: [PATCH v3 2/4] ufs: core: Remove redundant desc_size variable from hba

From: Bean Huo
Date: Wed Nov 23 2022 - 12:11:00 EST


On Mon, 2022-11-21 at 17:46 +0200, Arthur Simchaev wrote:
> @ -7945,18 +7926,16 @@ static void ufshcd_clear_dbg_ufs_stats(struct
> ufs_hba *hba)
>
> static int ufshcd_device_geo_params_init(struct ufs_hba *hba)
>
> {
>
> int err;
>
> - size_t buff_len;
>
> u8 *desc_buf;
>
>
>
> - buff_len = hba->desc_size[QUERY_DESC_IDN_GEOMETRY];
>
> - desc_buf = kmalloc(buff_len, GFP_KERNEL);
>
> + desc_buf = kmalloc(QUERY_DESC_MAX_SIZE, GFP_KERNEL);
here also should be kzalloc?

Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>