Re: [PATCH v5 2/2] scsi: ufs: core: Add support for static TX Equalization settings
From: Can Guo
Date: Fri May 29 2026 - 04:50:22 EST
On 5/29/2026 4:40 PM, Peter Wang (王信友) wrote:
OK, got it.
On Fri, 2026-05-29 at 16:12 +0800, Can Guo wrote:
> > > +static void ufshcd_parse_static_tx_eq_settings(struct ufs_hba
> > > *hba)
> > > +{
> > > + const u32 lpd = hba->lanes_per_direction;
> > > + const u32 num_elems = lpd * 2;
> > > + int gear;
> > > +
> > > + if (!lpd) {
> > > + return;
> > > + } else if (lpd > UFS_MAX_LANES) {
> > > > Unnecessary else if after return.
> You mean removing 'else if (lpd > UFS_MAX_LANES)' and the dev_warn()?
> > Thanks,
> Can Guo.
>
Hi Can,
No, what I mean is that the check below aligns better with
kernel code style:
if (!lpd)
return;
if (lpd > UFS_MAX_LANES) {
...
}
Thanks,
Can Guo.
Thanks
Peter
************* MEDIATEK Confidentiality Notice
********************
The information contained in this e-mail message (including any
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be
conveyed only to the designated recipient(s). Any use, dissemination,
distribution, printing, retaining or copying of this e-mail (including its
attachments) by unintended recipient(s) is strictly prohibited and may
be unlawful. If you are not an intended recipient of this e-mail, or believe
that you have received this e-mail in error, please notify the sender
immediately (by replying to this e-mail), delete any and all copies of
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!