[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <acc28d2d-3a85-4fba-8c15-fb956c34edf0@acm.org>
Date: Thu, 5 Feb 2026 08:08:40 -0800
From: Bart Van Assche <bvanassche@....org>
To: Alexey Charkov <alchark@...pper.net>,
Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Bean Huo <beanhuo@...ron.com>, Can Guo <can.guo@....qualcomm.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2] scsi: ufs: core: Fix RPMB region size detection for
UFS 2.2
On 2/5/26 12:30 AM, Alexey Charkov wrote:
> @@ -5249,6 +5250,20 @@ static void ufshcd_lu_init(struct ufs_hba *hba, struct scsi_device *sdev)
> hba->dev_info.rpmb_region_size[1] = desc_buf[RPMB_UNIT_DESC_PARAM_REGION1_SIZE];
> hba->dev_info.rpmb_region_size[2] = desc_buf[RPMB_UNIT_DESC_PARAM_REGION2_SIZE];
> hba->dev_info.rpmb_region_size[3] = desc_buf[RPMB_UNIT_DESC_PARAM_REGION3_SIZE];
Executing the above code if (hba->dev_info.wspecversion <= 0x0220) is
risky, isn't it?
> + if (hba->dev_info.wspecversion <= 0x0220) {
> + /* These older spec chips have only one RPMB region,
> + * sized between 128 kB minimum and 16 MB maximum.
> + * No per region size fields are provided, so get it
> + * from the logical block count and size fields for
> + * compatibility
> + */
Please follow the Linux kernel coding style for source code comments.
From Documentation/process/coding-style.rst:
The preferred style for long (multi-line) comments is:
.. code-block:: c
/*
* This is the preferred style for multi-line
* comments in the Linux kernel source code.
* Please use it consistently.
*
* Description: A column of asterisks on the left side,
* with beginning and ending almost-blank lines.
*/
Thanks,
Bart.
Powered by blists - more mailing lists