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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux