All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH,RFC] fix section mismatch warning in lib/swiotlb.c
@ 2007-02-26 18:38 Sam Ravnborg
  2007-02-27 20:24 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Sam Ravnborg @ 2007-02-26 18:38 UTC (permalink / raw)
  To: Andrew Morton, LKML

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 */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH,RFC] fix section mismatch warning in lib/swiotlb.c
  2007-02-26 18:38 [PATCH,RFC] fix section mismatch warning in lib/swiotlb.c Sam Ravnborg
@ 2007-02-27 20:24 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2007-02-27 20:24 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: linux-kernel

> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-27 20:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-26 18:38 [PATCH,RFC] fix section mismatch warning in lib/swiotlb.c Sam Ravnborg
2007-02-27 20:24 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.