mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH,RFC] fix section mismatch warning in lib/swiotlb.c
Date: Tue, 27 Feb 2007 12:24:54 -0800	[thread overview]
Message-ID: <20070227122454.831c75b8.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070226183800.GA15669@uranus.ravnborg.org>

> On Mon, 26 Feb 2007 19:38:00 +0100 Sam Ravnborg <sam@ravnborg.org> wrote:
> kbuild spits outs following warning on a 
> defconfig x86_64 build:
> WARNING: swiotlb.o - Section mismatch: reference to .init.text:swiotlb_init from __ksymtab between '__ksymtab_swiotlb_init' (at offset 0xa0) and '__ksymtab_swiotlb_free_coherent'
> 
> This warning happens because the function 
> swiotlb_init is marked __init and EXPORT_SYMBOL().
> A 'git grep swiotlb_init' showed no users in drivers/
> so maybe the EXPORT_SYMBOL can be deleted which would cure the warning?
> 
> I took the pragmatic approach and made it non-__init.
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> ---
> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
> index 623a68a..3133495 100644
> --- a/lib/swiotlb.c
> +++ b/lib/swiotlb.c
> @@ -160,7 +160,7 @@ __setup("swiotlb=", setup_io_tlb_npages);
>   * Statically reserve bounce buffer space and initialize bounce buffer data
>   * structures for the software IO TLB used to implement the DMA API.
>   */
> -void __init
> +void
>  swiotlb_init_with_default_size(size_t default_size)
>  {
>  	unsigned long i, bytes;
> @@ -211,7 +211,7 @@ swiotlb_init_with_default_size(size_t default_size)
>  #define __swiotlb_init_with_default_size swiotlb_init_with_default_size
>  #endif
>  
> -void __init
> +void
>  swiotlb_init(void)
>  {
>  	__swiotlb_init_with_default_size(64 * (1<<20)); /* default to 64MB */

eh.  If there's a module anywhere which calls swiotlb_init() then I suspect
it's one which deserves breaking ;)

I'll remove the export.

      reply	other threads:[~2007-02-27 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-26 18:38 Sam Ravnborg
2007-02-27 20:24 ` Andrew Morton [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=20070227122454.831c75b8.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®