From patchwork Mon Sep 2 09:51:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 271846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A7A2E2C008A for ; Mon, 2 Sep 2013 19:53:54 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VGQpE-0005Bw-VF; Mon, 02 Sep 2013 09:53:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VGQpD-0003Qv-Dr; Mon, 02 Sep 2013 09:53:35 +0000 Received: from intranet.asianux.com ([58.214.24.6]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VGQp8-0003QK-0P for linux-mtd@lists.infradead.org; Mon, 02 Sep 2013 09:53:32 +0000 Received: by intranet.asianux.com (Postfix, from userid 103) id 22FC51840319; Mon, 2 Sep 2013 17:53:00 +0800 (CST) X-Spam-Score: -100.9 X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on intranet.asianux.com X-Spam-Level: X-Spam-Status: No, score=-100.9 required=5.0 tests=AWL,BAYES_00, RATWARE_GECKO_BUILD,USER_IN_WHITELIST autolearn=no version=3.1.9 Received: from [10.1.100.108] (unknown [61.148.203.198]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by intranet.asianux.com (Postfix) with ESMTP id B7BF71840242; Mon, 2 Sep 2013 17:52:59 +0800 (CST) Message-ID: <52245FBD.30202@asianux.com> Date: Mon, 02 Sep 2013 17:51:57 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: joern@lazybastard.org, dwmw2@infradead.org, dedekind1@gmail.com Subject: [PATCH] drivers: mtd: remove '__init' from phram_param_call() and ubi_mtd_param_parse() X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130902_055330_444506_94D7B2F6 X-CRM114-Status: GOOD ( 14.98 ) X-Spam-Score: -4.3 (----) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-4.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org phram_param_call() and ubi_mtd_param_parse() are used by module_param_call(), usually, it need normal funcitons (no '__init'), so recommend to remove '__init' from them. The related warnings: WARNING: drivers/mtd/devices/phram.o(.data+0xc): Section mismatch in reference from the variable ___param_ops_phram to the variable .init.text:_phram_param_call The variable ___param_ops_phram references the variable __init _phram_param_call If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/mtd/ubi/ubi.o(.data+0x1a4): Section mismatch in reference from the variable ___param_ops_mtd to the variable .init.text:_ubi_mtd_param_parse The variable ___param_ops_mtd references the variable __init _ubi_mtd_param_parse If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Signed-off-by: Chen Gang --- drivers/mtd/devices/phram.c | 2 +- drivers/mtd/ubi/build.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index 67823de..bd7496a 100644 --- a/drivers/mtd/devices/phram.c +++ b/drivers/mtd/devices/phram.c @@ -264,7 +264,7 @@ static int __init phram_setup(const char *val) return ret; } -static int __init phram_param_call(const char *val, struct kernel_param *kp) +static int phram_param_call(const char *val, struct kernel_param *kp) { /* * This function is always called before 'init_phram()', whether diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 315dcc6..c8b9493 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -1382,7 +1382,7 @@ static int __init bytes_str_to_int(const char *str) * This function returns zero in case of success and a negative error code in * case of error. */ -static int __init ubi_mtd_param_parse(const char *val, struct kernel_param *kp) +static int ubi_mtd_param_parse(const char *val, struct kernel_param *kp) { int i, len; struct mtd_dev_param *p;