linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: pdeschrijver@nvidia.com, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-clk@vger.kernel.org,
	jonathanh@nvidia.com, sboyd@codeaurora.org,
	mturquette@baylibre.com, pgaikwad@nvidia.com
Subject: Re: [PATCH] clk: tegra: dfll: Fix drvdata overwriting issue
Date: Thu, 19 Oct 2017 10:23:10 +0200	[thread overview]
Message-ID: <20171019082310.GC4459@ulmo> (raw)
In-Reply-To: <1507849799-4256-1-git-send-email-nicoleotsuka@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1210 bytes --]

On Thu, Oct 12, 2017 at 04:09:59PM -0700, Nicolin Chen wrote:
> Both tegra124-dfll and clk-dfll are using platform_set_drvdata
> to set drvdata of the exact same pdev while they use different
> pointers for the drvdata. Once the drvdata has been overwritten
> by tegra124-dfll, clk-dfll will never get its td pointer as it
> expects.
> 
> Since tegra124-dfll merely needs its soc pointer in its remove
> function, this patch fixes the bug by removing the overwriting
> in the tegra124-dfll file and letting the tegra_dfll_unregister
> return an soc pointer for it.
> 
> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
> ---
> 
> As I don't have a T124 platform, I can't verify it on a board.
> If someone could provide a Tested-by, it would be very helpful.
> The test could be a simple system suspend/resume that activates
> runtime_suspend/resume() where a platform_get_drvdata() would
> be called. -- Nicolin
> 
>  drivers/clk/tegra/clk-dfll.c               | 10 +++++-----
>  drivers/clk/tegra/clk-dfll.h               |  2 +-
>  drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 12 +++++-------
>  3 files changed, 11 insertions(+), 13 deletions(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2017-10-19  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 23:09 [PATCH] clk: tegra: dfll: Fix drvdata overwriting issue Nicolin Chen
2017-10-19  7:51 ` Peter De Schrijver
2017-10-19  8:23 ` Thierry Reding [this message]

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=20171019082310.GC4459@ulmo \
    --to=thierry.reding@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=nicoleotsuka@gmail.com \
    --cc=pdeschrijver@nvidia.com \
    --cc=pgaikwad@nvidia.com \
    --cc=sboyd@codeaurora.org \
    /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).