linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Krishna Yarlagadda <kyarlagadda@nvidia.com>,
	broonie@kernel.org, thierry.reding@gmail.com,
	linux-spi@vger.kernel.org, linux-tegra@vger.kernel.org
Cc: skomatineni@nvidia.com, ldewangan@nvidia.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] spi: tegra210-quad: Fix duplicate resource error
Date: Fri, 11 Nov 2022 09:49:58 +0000	[thread overview]
Message-ID: <4fa0b4b4-b2a0-d3ef-b7c5-6c9c90fefebc@nvidia.com> (raw)
In-Reply-To: <20221001122148.9158-2-kyarlagadda@nvidia.com>


On 01/10/2022 13:21, Krishna Yarlagadda wrote:
> controller data alloc is done with client device data causing duplicate
> resource error. Allocate memory using controller device when using devm
> 
> Signed-off-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
> ---
>   drivers/spi/spi-tegra210-quad.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-tegra210-quad.c b/drivers/spi/spi-tegra210-quad.c
> index 904972606bd4..06bf19d0cfc1 100644
> --- a/drivers/spi/spi-tegra210-quad.c
> +++ b/drivers/spi/spi-tegra210-quad.c
> @@ -918,8 +918,9 @@ static int tegra_qspi_start_transfer_one(struct spi_device *spi,
>   static struct tegra_qspi_client_data *tegra_qspi_parse_cdata_dt(struct spi_device *spi)
>   {
>   	struct tegra_qspi_client_data *cdata;
> +	struct tegra_qspi *tqspi = spi_master_get_devdata(spi->master);
>   
> -	cdata = devm_kzalloc(&spi->dev, sizeof(*cdata), GFP_KERNEL);
> +	cdata = devm_kzalloc(tqspi->dev, sizeof(*cdata), GFP_KERNEL);
>   	if (!cdata)
>   		return NULL;
>   


This fixes the following error I have been observing ...

  CRIT KERN spi spi0.0: Resources present before probing

Krishna, can you resend this with the following fixes tag?

Fixes: f89d2cc3967a ("spi: tegra210-quad: use devm call for cdata memory")

May be worth sending this separately from the reset of the series if 
that still needs work. Also, it could be worth indicating that this 
fixes the above error that we are observing and that the wrong device 
was being used for devm. Otherwise ...

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>

Jon

-- 
nvpublic

  reply	other threads:[~2022-11-11  9:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-01 12:21 [PATCH 1/5] spi: tegra210-quad: Fix combined sequence Krishna Yarlagadda
2022-10-01 12:21 ` [PATCH 2/5] spi: tegra210-quad: Fix duplicate resource error Krishna Yarlagadda
2022-11-11  9:49   ` Jon Hunter [this message]
2022-10-01 12:21 ` [PATCH 3/5] spi: tegra210-quad: Use nbits in combined seq Krishna Yarlagadda
2022-10-03 15:24   ` Mark Brown
2022-10-01 12:21 ` [PATCH 4/5] spi: tegra210-quad: combined seq for 4READ Krishna Yarlagadda
2022-10-01 12:21 ` [PATCH 5/5] spi: tegra210-quad: native dma support Krishna Yarlagadda
2022-10-01 20:08   ` kernel test robot
2022-10-01 20:50   ` kernel test robot
2022-10-02 10:37   ` Geert Uytterhoeven
2022-10-03 16:47 ` (subset) [PATCH 1/5] spi: tegra210-quad: Fix combined sequence Mark Brown

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=4fa0b4b4-b2a0-d3ef-b7c5-6c9c90fefebc@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=broonie@kernel.org \
    --cc=kyarlagadda@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=skomatineni@nvidia.com \
    --cc=thierry.reding@gmail.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;
as well as URLs for NNTP newsgroup(s).