From: Palash Kambar <palash.kambar@oss.qualcomm.com>
To: Bart Van Assche <bvanassche@acm.org>,
mani@kernel.org, James.Bottomley@HansenPartnership.com,
martin.petersen@oracle.com
Cc: linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, nitin.rawat@oss.qualcomm.com
Subject: Re: [PATCH v1 1/2] ufs: core: Configure only active lanes during link
Date: Thu, 26 Mar 2026 21:47:21 +0530 [thread overview]
Message-ID: <93eacde8-41a4-44a2-a427-31e56cde9da0@oss.qualcomm.com> (raw)
In-Reply-To: <7922d339-5e85-4b12-9e32-f095e10b1211@acm.org>
On 3/23/2026 9:13 PM, Bart Van Assche wrote:
> On 3/10/26 11:09 PM, palash.kambar@oss.qualcomm.com wrote:
>> [ ... ]
>> +static int ufshcd_get_connected_tx_lanes(struct ufs_hba *hba, u32 *tx_lanes)
>> +{
>> + return ufshcd_dme_get(hba,
>> + UIC_ARG_MIB(PA_CONNECTEDTXDATALANES), tx_lanes);
>> +}
>> +
>> +static int ufshcd_get_connected_rx_lanes(struct ufs_hba *hba, u32 *rx_lanes)
>> +{
>> + return ufshcd_dme_get(hba,
>> + UIC_ARG_MIB(PA_CONNECTEDRXDATALANES), rx_lanes);
>> +}
>
> The body of the above two functions is very short. Please remove these
> functions and instead inline these function into their only caller.
Sure Bart, will address this.
>
>> +static void ufshcd_validate_link_params(struct ufs_hba *hba)
>> +{
>> + int val = 0;
>> +
>> + if (ufshcd_get_connected_tx_lanes(hba, &val))
>> + return;
>
> Shouldn't it be reported if ufshcd_get_connected_tx_lanes() fails?
>
>> + if (ufshcd_get_connected_rx_lanes(hba, &val))
>> + return;
>
> Same question here - shouldn't it be reported if
> ufshcd_get_connected_rx_lanes() fails?
>
> Why does this patch only call dev_err() in case of a mismatch instead of adjusting hba->lanes_per_direction or making initialization fail?
Idea was just to warn and catch the failure scenario. But I agree on your feedback. Will fix it.
>
> Thanks,
>
> Bart.
next prev parent reply other threads:[~2026-03-26 16:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-11 6:09 [PATCH v1 0/2] Add post change sequence for link start notify palash.kambar
2026-03-11 6:09 ` [PATCH v1 1/2] ufs: core: Configure only active lanes during link palash.kambar
2026-03-11 6:53 ` Shawn Lin
2026-03-23 13:14 ` Palash Kambar
2026-03-23 15:43 ` Bart Van Assche
2026-03-26 16:17 ` Palash Kambar [this message]
2026-03-11 6:09 ` [PATCH v1 2/2] ufs: ufs-qcom: Enable Auto Hibern8 clock request support palash.kambar
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=93eacde8-41a4-44a2-a427-31e56cde9da0@oss.qualcomm.com \
--to=palash.kambar@oss.qualcomm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=nitin.rawat@oss.qualcomm.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®