devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Subject: [PATCH] of/pdt: fix section mismatch warning
Date: Tue, 27 Dec 2011 23:04:08 +0100	[thread overview]
Message-ID: <20111227220408.GA18932@merkur.ravnborg.org> (raw)

>From faff5f5b55c50e8ea06b62bd6b97f30d38a2da3a Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
Date: Tue, 27 Dec 2011 22:58:40 +0100
Subject: [PATCH] of/pdt: fix section mismatch warning

Fix the following section mismatch warning - seen when building sparc32:

WARNING: vmlinux.o(.text+0x1ff9c0): Section mismatch in reference from the function kernel_tree_alloc() to the function .init.text:prom_early_alloc()
The function kernel_tree_alloc() references
the function __init prom_early_alloc().
This is often because kernel_tree_alloc lacks a __init
annotation or the annotation of prom_early_alloc is wrong.

prom_early_alloc() is annotated __init, and users of
kernel_tree_alloc() is also annotated __init.
So simply match the annoation of these to fix the warning.

Signed-off-by: Sam Ravnborg <sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: David S. Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
---
 drivers/of/pdt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c
index bc5b399..07cc1d6 100644
--- a/drivers/of/pdt.c
+++ b/drivers/of/pdt.c
@@ -229,7 +229,7 @@ static struct device_node * __init of_pdt_build_tree(struct device_node *parent,
 	return ret;
 }
 
-static void *kernel_tree_alloc(u64 size, u64 align)
+static void * __init kernel_tree_alloc(u64 size, u64 align)
 {
 	return prom_early_alloc(size);
 }
-- 
1.6.0.6

             reply	other threads:[~2011-12-27 22:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-27 22:04 Sam Ravnborg [this message]
     [not found] ` <20111227220408.GA18932-OoSGOWW0KRunlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
2011-12-27 22:13   ` [PATCH] of/pdt: fix section mismatch warning David Miller
     [not found]     ` <20111227.171307.1727824866350984198.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-12-27 22:26       ` Sam Ravnborg
     [not found]         ` <20111227222658.GA19202-OoSGOWW0KRunlFQ6Q1D1Y0B+6BGkLq7r@public.gmane.org>
2011-12-27 22:29           ` David Miller
     [not found]             ` <20111227.172921.750063350996279524.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2011-12-27 22:54               ` Rob Herring
     [not found]                 ` <4EFA4C8F.5080901-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-12-27 23:03                   ` David Miller
2011-12-27 23:07                   ` Sam Ravnborg

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=20111227220408.GA18932@merkur.ravnborg.org \
    --to=sam-uyr5n9q2vtjg9huczpvpmw@public.gmane.org \
    --cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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).