mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Can Guo <can.guo@oss.qualcomm.com>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"mani@kernel.org" <mani@kernel.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"quic_rdwivedi@quicinc.com" <quic_rdwivedi@quicinc.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>,
	"quic_nitirawa@quicinc.com" <quic_nitirawa@quicinc.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v5 2/2] scsi: ufs: core: Add support for static TX Equalization settings
Date: Fri, 29 May 2026 16:12:17 +0800	[thread overview]
Message-ID: <7f2f9a0a-03e9-4a0e-ae57-2b0c557e029f@oss.qualcomm.com> (raw)
In-Reply-To: <1e432db04abc12c4109754788ab36a09111cf3e9.camel@mediatek.com>



On 5/29/2026 4:04 PM, Peter Wang (王信友) wrote:
>
> On Thu, 2026-05-28 at 18:14 -0700, Can Guo wrote:
> > +       for (i = 0; i < count; i++) {
> > +               if (preshoot[i] >= TX_HS_NUM_PRESHOOT) {
> > 
> > 
> > +       for (i = 0; i < count; i++) {
> > +               if (deemphasis[i] >= TX_HS_NUM_DEEMPHASIS) {
> > 
> > +                       for (i = 0; i < count; i++) {
> > +                               if (precode_en[i] > 1) {
> > 
>
> Hi Can,
>
> I suggest using
> for (i = 0; i < num_elems; i++) { ... }
> instead of
> for (i = 0; i < count; i++) { ... }
> as it is more clear.
Thanks for the review. Let me change to num_elems.
> > 
> > +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.
>
> The others look good to me.
>
> 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!


  reply	other threads:[~2026-05-29  8:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260529011421.462046-1-can.guo@oss.qualcomm.com>
2026-05-29  1:14 ` [PATCH v5 1/2] dt-bindings: ufs: Document static TX Equalization settings properties Can Guo
2026-05-29  7:45   ` Peter Wang (王信友)
2026-05-29  1:14 ` [PATCH v5 2/2] scsi: ufs: core: Add support for static TX Equalization settings Can Guo
2026-05-29  8:04   ` Peter Wang (王信友)
2026-05-29  8:12     ` Can Guo [this message]
2026-05-29  8:40       ` Peter Wang (王信友)
2026-05-29  8:42         ` Can Guo
2026-05-29 10:19           ` Bean Huo
2026-05-29 10:21             ` Can Guo

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=7f2f9a0a-03e9-4a0e-ae57-2b0c557e029f@oss.qualcomm.com \
    --to=can.guo@oss.qualcomm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=peter.wang@mediatek.com \
    --cc=quic_nitirawa@quicinc.com \
    --cc=quic_rdwivedi@quicinc.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

all inboxes | Powered by JetHome®