mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manikanta Maddireddy <mmaddireddy@nvidia.com>
To: phucduc.bui@gmail.com
Cc: Vidya Sagar <vidyas@nvidia.com>,
	Niklas Cassel <cassel@kernel.org>,
	linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	kwilczynski@kernel.org, Manivannan Sadhasivam <mani@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>
Subject: Re: [PATCH 2/2] PCI: tegra194: propagate REFCLK select GPIO errors
Date: Mon, 12 Oct 2026 14:06:54 +0530	[thread overview]
Message-ID: <923d7875-69f7-4c87-869a-fc66727c70a8@nvidia.com> (raw)
In-Reply-To: <20261007104847.507776-2-phucduc.bui@gmail.com>



On 07/10/26 4:18 pm, phucduc.bui@gmail.com wrote:
> From: bui duc phuc <phucduc.bui@gmail.com>
> 
> devm_gpiod_get_optional() returns NULL when the optional GPIO is not
> present, but may return -EPROBE_DEFER or other errors.
> 
> The current code treats GPIO lookup errors as if the GPIO were not
> present.
> 
> Check the return value and propagate errors from the REFCLK select GPIO
> lookup.
> 
I published similar patch 
https://patchwork.kernel.org/project/linux-pci/patch/20260923072237.1139013-2-mmaddireddy@nvidia.com/

I am OK if this patch is merged, I will drop from my series.

With the subject line capitalization style fix,
Reviewed-by: Manikanta Maddireddy <mmaddireddy@nvidia.com>

> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
> ---
>   drivers/pci/controller/dwc/pcie-tegra194.c | 15 +++------------
>   1 file changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 767e11216196..5ebe01f72833 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -1207,18 +1207,9 @@ static int tegra_pcie_dw_parse_dt(struct tegra_pcie_dw *pcie)
>   	pcie->pex_refclk_sel_gpiod = devm_gpiod_get_optional(pcie->dev,
>   							     "nvidia,refclk-select",
>   							     GPIOD_OUT_HIGH);
> -	if (IS_ERR(pcie->pex_refclk_sel_gpiod)) {
> -		int err = PTR_ERR(pcie->pex_refclk_sel_gpiod);
> -		const char *level = KERN_ERR;
> -
> -		if (err == -EPROBE_DEFER)
> -			level = KERN_DEBUG;
> -
> -		dev_printk(level, pcie->dev,
> -			   dev_fmt("Failed to get REFCLK select GPIOs: %d\n"),
> -			   err);
> -		pcie->pex_refclk_sel_gpiod = NULL;
> -	}
> +	if (IS_ERR(pcie->pex_refclk_sel_gpiod))
> +		return dev_err_probe(pcie->dev, PTR_ERR(pcie->pex_refclk_sel_gpiod),
> +				     "Failed to get REFCLK select GPIOs\n");
>   
>   	return 0;
>   }

-- 
nvpublic


  reply	other threads:[~2026-10-12  8:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 10:48 [PATCH 1/2] PCI: tegra194: use dev_err_probe() for PERST GPIO phucduc.bui
2026-10-07 10:48 ` [PATCH 2/2] PCI: tegra194: propagate REFCLK select GPIO errors phucduc.bui
2026-10-12  8:36   ` Manikanta Maddireddy [this message]
2026-10-12  9:41     ` Bui Duc Phuc
2026-10-07 20:46 ` [PATCH 1/2] PCI: tegra194: use dev_err_probe() for PERST GPIO Bjorn Helgaas
2026-10-08 11:08   ` Bui Duc Phuc
2026-10-12  8:38     ` Manikanta Maddireddy
2026-10-12  9:38       ` Bui Duc Phuc

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=923d7875-69f7-4c87-869a-fc66727c70a8@nvidia.com \
    --to=mmaddireddy@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=cassel@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=phucduc.bui@gmail.com \
    --cc=robh@kernel.org \
    --cc=thierry.reding@kernel.org \
    --cc=vidyas@nvidia.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®