* [PATCH] iommu: dmar: fix harmless section mismatch warning
@ 2017-09-12 20:10 Arnd Bergmann
2017-09-19 9:45 ` Joerg Roedel
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-09-12 20:10 UTC (permalink / raw)
To: Joerg Roedel
Cc: Arnd Bergmann, Andy Shevchenko, Rafael J. Wysocki, Jani Nikula,
Jarkko Sakkinen, Lv Zheng, Ashok Raj, iommu, linux-kernel
Building with gcc-4.6 results in this warning due to
dmar_table_print_dmar_entry being inlined as in newer compiler versions:
WARNING: vmlinux.o(.text+0x5c8bee): Section mismatch in reference from the function dmar_walk_remapping_entries() to the function .init.text:dmar_table_print_dmar_entry()
The function dmar_walk_remapping_entries() references
the function __init dmar_table_print_dmar_entry().
This is often because dmar_walk_remapping_entries lacks a __init
annotation or the annotation of dmar_table_print_dmar_entry is wrong.
This removes the __init annotation to avoid the warning. On compilers
that don't show the warning today, this should have no impact since the
function gets inlined anyway.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/iommu/dmar.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index ca5ebaeafd6a..57c920c1372d 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -497,7 +497,7 @@ static int dmar_parse_one_rhsa(struct acpi_dmar_header *header, void *arg)
#define dmar_parse_one_rhsa dmar_res_noop
#endif
-static void __init
+static void
dmar_table_print_dmar_entry(struct acpi_dmar_header *header)
{
struct acpi_dmar_hardware_unit *drhd;
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] iommu: dmar: fix harmless section mismatch warning
2017-09-12 20:10 [PATCH] iommu: dmar: fix harmless section mismatch warning Arnd Bergmann
@ 2017-09-19 9:45 ` Joerg Roedel
0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2017-09-19 9:45 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Andy Shevchenko, Rafael J. Wysocki, Jani Nikula, Jarkko Sakkinen,
Lv Zheng, Ashok Raj, iommu, linux-kernel
On Tue, Sep 12, 2017 at 10:10:21PM +0200, Arnd Bergmann wrote:
> Building with gcc-4.6 results in this warning due to
> dmar_table_print_dmar_entry being inlined as in newer compiler versions:
>
> WARNING: vmlinux.o(.text+0x5c8bee): Section mismatch in reference from the function dmar_walk_remapping_entries() to the function .init.text:dmar_table_print_dmar_entry()
> The function dmar_walk_remapping_entries() references
> the function __init dmar_table_print_dmar_entry().
> This is often because dmar_walk_remapping_entries lacks a __init
> annotation or the annotation of dmar_table_print_dmar_entry is wrong.
>
> This removes the __init annotation to avoid the warning. On compilers
> that don't show the warning today, this should have no impact since the
> function gets inlined anyway.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/iommu/dmar.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-19 9:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-12 20:10 [PATCH] iommu: dmar: fix harmless section mismatch warning Arnd Bergmann
2017-09-19 9:45 ` Joerg Roedel
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®