From patchwork Wed Dec 3 08:53:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 417292 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A27861400DD for ; Wed, 3 Dec 2014 19:57:18 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 903601A0C32 for ; Wed, 3 Dec 2014 19:57:18 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 649171A0BF1 for ; Wed, 3 Dec 2014 19:56:06 +1100 (AEDT) Received: by mail-pd0-f182.google.com with SMTP id r10so15130054pdi.27 for ; Wed, 03 Dec 2014 00:56:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xwl6PGV+f4o46hnBhO94um0OLV/d/P7d7mrmVxgk4/c=; b=mtineJHl+0+lgix49zU8QjslPKH1N+Sf/P9a4Fxb1PaH6DpPPKSSrAR8Yz040j0zxl p5QffcSzC1iZU4p/YtQNilyxEUr8ULzjmUpErfYP87ATKrX6dnH21AHEpWT0r5fle6V1 DyYVbLBbQuuwaGz2cfG2F/nMR2/077a/MdQiu4SrmNY9o2BnxOLeuiycqidAPtHdjWRw lb2/ZTnhTl9o52FSh58U+/LCuhe6BAXbWS9gn8Wr1/yu4r2ZalIi86cMUvsIrUkcBCEo IYft8Sa/s8RYA8eUP43MaD04wW1W1rOz4pXCceVd6c6vWwJyuFFo/9pZZfnyHy5Lexfb AMBg== X-Received: by 10.70.19.226 with SMTP id i2mr6914641pde.26.1417596964387; Wed, 03 Dec 2014 00:56:04 -0800 (PST) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id w4sm11765738pdq.28.2014.12.03.00.56.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Dec 2014 00:56:03 -0800 (PST) From: Kevin Hao To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH v3 1/3] Revert "clk: ppc-corenet: Fix Section mismatch warning" Date: Wed, 3 Dec 2014 16:53:51 +0800 Message-Id: <1417596833-31456-2-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1417596833-31456-1-git-send-email-haokexin@gmail.com> References: <1417596833-31456-1-git-send-email-haokexin@gmail.com> Cc: Mike Turquette , Gerhard Sittig , Yuantian Tang , Jingchang Lu , Scott Wood X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. Cc: stable@vger.kernel.org # 3.17 Signed-off-by: Kevin Hao Acked-by: Scott Wood Acked-by: Michael Turquette --- v3: Cc stable and add ack. v2: 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 b6e6c85507a5..0a47d6f49cd6 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", .of_match_table = ppc_clk_ids,