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

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

 




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






[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