From: Bean Huo <huobean@gmail.com>
To: Arthur Simchaev <Arthur.Simchaev@wdc.com>, martin.petersen@oracle.com
Cc: beanhuo@micron.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/4] ufs: core: Remove redundant desc_size variable from hba
Date: Fri, 11 Nov 2022 16:45:06 +0100 [thread overview]
Message-ID: <b3e92294-0aa7-edc1-115b-7552b13f9e7d@gmail.com> (raw)
In-Reply-To: <1667399353-10228-3-git-send-email-Arthur.Simchaev@wdc.com>
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
next prev parent reply other threads:[~2022-11-11 15:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 14:29 [PATCH v2 0/4] ufs: core: Always read the descriptors with max length Arthur Simchaev
2022-11-02 14:29 ` [PATCH v2 1/4] ufs: core: Remove redundant wb check Arthur Simchaev
2022-11-02 14:29 ` [PATCH v2 2/4] ufs: core: Remove redundant desc_size variable from hba Arthur Simchaev
2022-11-11 15:45 ` Bean Huo [this message]
2022-11-13 13:33 ` Arthur Simchaev
2022-11-02 14:29 ` [PATCH v2 3/4] ufs: core: Remove len parameter from ufshcd_set_active_icc_lvl Arthur Simchaev
2022-11-14 12:19 ` Bean Huo
2022-11-15 12:49 ` Arthur Simchaev
2022-11-02 14:29 ` [PATCH v2 4/4] ufs: core: Remove ufshcd_map_desc_id_to_length function Arthur Simchaev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3e92294-0aa7-edc1-115b-7552b13f9e7d@gmail.com \
--to=huobean@gmail.com \
--cc=Arthur.Simchaev@wdc.com \
--cc=beanhuo@micron.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox