[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f8ca0f82-2851-40d9-983b-2a143b44263a@collabora.com>
Date: Mon, 4 Nov 2024 14:10:22 +0100
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Krzysztof Wilczyński <kw@...ux.com>,
linux-pci@...r.kernel.org
Cc: ryder.lee@...iatek.com, jianjun.wang@...iatek.com, lpieralisi@...nel.org,
robh@...nel.org, bhelgaas@...gle.com, matthias.bgg@...il.com,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kernel@...labora.com,
fshao@...omium.org, Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
Subject: Re: [PATCH v4 1/2] PCI: mediatek-gen3: Add support for setting
max-link-speed limit
Il 04/11/24 14:06, Krzysztof Wilczyński ha scritto:
> Hello,
>
>> + if (err > 0) {
>
> You could drop > 0 here.
>
I have no strong opinions about that, would be fine for me.
>> + /* Get the maximum speed supported by the controller */
>> + max_speed = mtk_pcie_get_controller_max_link_speed(pcie);
>> +
>> + /* Set max_link_speed only if the controller supports it */
>> + if (max_speed >= 0 && max_speed <= err) {
>> + pcie->max_link_speed = err;
>> + dev_dbg(pcie->dev,
>> + "Max controller link speed Gen%d, override to Gen%u",
>> + max_speed, pcie->max_link_speed);
>> + }
>> + }
>
> I wonder if this debug message would be better served as a warning to let
> the user know that the speed has been overridden due to the platform
> limitation. Thoughts?
>
> Also, there is no need to sent a new series if you fine with the
> suggestions. I will mend the code on the branch when applying.
>
A warning seems to be a bit too much and would appear like something to worry
about (or something unintended)...
Perhaps a dev_info() would work better here?
Thanks,
Angelo
> Krzysztof
Powered by blists - more mailing lists