Re: [PATCH V2 1/2] ufs: core: Configure only active lanes during link

From: Bart Van Assche

Date: Fri Mar 27 2026 - 17:18:19 EST


On 3/27/26 2:03 AM, palash.kambar@xxxxxxxxxxxxxxxx wrote:
+static int ufshcd_validate_link_params(struct ufs_hba *hba)
+{
+ int ret = 0;
+ int val = 0;

Both initializers are superfluous. Please remove at least the
initializer for "ret" since the first statement in this function assigns
a value to "ret".

+ ret = ufshcd_dme_get(hba,
+ UIC_ARG_MIB(PA_CONNECTEDTXDATALANES), &val);

The formatting of the above statement does not follow the Linux kernel
coding style. Please format it as follows:

ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_CONNECTEDTXDATALANES),
&val);

A possible alternative to formatting code manually is to run something
like "git clang-format HEAD^" from the command line.

+ val = 0;

This assignment is superfluous, isn't it?

+ ret = ufshcd_dme_get(hba,
+ UIC_ARG_MIB(PA_CONNECTEDRXDATALANES), &val);

Please move the UIC_ARG_MIB() to the previous line.

Thanks,

Bart.