public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
To: "Krzysztof Wilczyński" <kw@linux.com>, linux-pci@vger.kernel.org
Cc: ryder.lee@mediatek.com, jianjun.wang@mediatek.com,
	lpieralisi@kernel.org, robh@kernel.org, bhelgaas@google.com,
	matthias.bgg@gmail.com, linux-mediatek@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, kernel@collabora.com,
	fshao@chromium.org,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH v4 1/2] PCI: mediatek-gen3: Add support for setting max-link-speed limit
Date: Mon, 4 Nov 2024 14:10:22 +0100	[thread overview]
Message-ID: <f8ca0f82-2851-40d9-983b-2a143b44263a@collabora.com> (raw)
In-Reply-To: <D5DF0QIO2UZQ.29U999LYCC05M@rocinante>

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





  reply	other threads:[~2024-11-04 13:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-04 11:49 [PATCH v4 0/2] PCI: mediatek-gen3: Support limiting link speed and width AngeloGioacchino Del Regno
2024-11-04 11:49 ` [PATCH v4 1/2] PCI: mediatek-gen3: Add support for setting max-link-speed limit AngeloGioacchino Del Regno
2024-11-04 13:06   ` Krzysztof Wilczyński
2024-11-04 13:10     ` AngeloGioacchino Del Regno [this message]
2024-11-04 13:25       ` Krzysztof Wilczyński
2024-11-08  1:43         ` Jianjun Wang (王建军)
2024-11-11 20:47           ` Krzysztof Wilczyński
2024-11-06  1:22   ` Bjorn Helgaas
2024-11-04 11:49 ` [PATCH v4 2/2] PCI: mediatek-gen3: Add support for restricting link width AngeloGioacchino Del Regno
2024-11-04 13:20   ` Krzysztof Wilczyński
2024-11-06 13:29     ` AngeloGioacchino Del Regno
2024-11-06 14:02       ` Krzysztof Wilczyński
2024-11-06  1:24   ` Bjorn Helgaas
2024-11-06  7:43     ` Jianjun Wang (王建军)
2024-11-04 17:00 ` [PATCH v4 0/2] PCI: mediatek-gen3: Support limiting link speed and width Krzysztof Wilczyński
2024-11-04 17:02   ` Krzysztof Wilczyński

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=f8ca0f82-2851-40d9-983b-2a143b44263a@collabora.com \
    --to=angelogioacchino.delregno@collabora.com \
    --cc=bhelgaas@google.com \
    --cc=fshao@chromium.org \
    --cc=jianjun.wang@mediatek.com \
    --cc=kernel@collabora.com \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh@kernel.org \
    --cc=ryder.lee@mediatek.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