linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hao <haokexin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Scott Wood <scottwood@freescale.com>,
	Gerhard Sittig <gsi@denx.de>,
	Mike Turquette <mturquette@linaro.org>,
	Jingchang Lu <jingchang.lu@freescale.com>
Subject: [PATCH v2 1/3] Revert "clk: ppc-corenet: Fix Section mismatch warning"
Date: Sun, 19 Oct 2014 14:11:37 +0800	[thread overview]
Message-ID: <1413699099-25743-2-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <1413699099-25743-1-git-send-email-haokexin@gmail.com>

This reverts commit da788acb28386aa896224e784954bb73c99ff26c.

That commit tried to fix the section mismatch warning by moving the
ppc_corenet_clk_driver struct to init section. This is definitely wrong
because the kernel would free the memories occupied by this struct
after boot while this driver is still registered in the driver core.
The kernel would panic when accessing this driver struct.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
A new patch in v2.

 drivers/clk/clk-ppc-corenet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c
index 8e58edfeeb37..8b284be4efa4 100644
--- a/drivers/clk/clk-ppc-corenet.c
+++ b/drivers/clk/clk-ppc-corenet.c
@@ -291,7 +291,7 @@ static const struct of_device_id ppc_clk_ids[] __initconst = {
 	{}
 };
 
-static struct platform_driver ppc_corenet_clk_driver __initdata = {
+static struct platform_driver ppc_corenet_clk_driver = {
 	.driver = {
 		.name = "ppc_corenet_clock",
 		.owner = THIS_MODULE,
-- 
1.9.3

  reply	other threads:[~2014-10-19  6:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19  6:11 [PATCH v2 0/3] fix a kernel panic on fsl corenet board when CONFIG_CLK_PPC_CORENET is enabled Kevin Hao
2014-10-19  6:11 ` Kevin Hao [this message]
2014-10-19  6:11 ` [PATCH v2 2/3] powerpc: call of_clk_init() from time_init() Kevin Hao
2014-10-19  6:11 ` [PATCH v2 3/3] clk: ppc-corenet: fix section mismatch warning Kevin Hao
2014-10-21  8:10 ` [PATCH v2 0/3] fix a kernel panic on fsl corenet board when CONFIG_CLK_PPC_CORENET is enabled Kevin Hao
2014-11-07  4:07 ` Scott Wood
2014-11-20  2:38   ` Mike Turquette
2014-11-27  3:30   ` Yuantian Tang
2014-12-03  0:38     ` Scott Wood
2014-12-03  6:23       ` Kevin Hao

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=1413699099-25743-2-git-send-email-haokexin@gmail.com \
    --to=haokexin@gmail.com \
    --cc=gsi@denx.de \
    --cc=jingchang.lu@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mturquette@linaro.org \
    --cc=scottwood@freescale.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).