Skip to contentSkip to conversation

drm/i915: acpi/video.c fix section mismatch warning

PATCH Applied Jaswinder Singh Rajput 4 participants 9 messages May 20, 2009 – Jun 1, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/i915: acpi/video.c fix section mismatch warning

Currently acpi_video_exit() is exported as well as using __exit which causes:

WARNING: drivers/acpi/video.o(__ksymtab+0x0): Section mismatch in reference from the variable __ksymtab_acpi_video_exit to the function .exit.text:acpi_video_exit() The symbol acpi_video_exit is exported and annotated __exit
Fix this by removing the __exit annotation of acpi_video_exit or drop the export.

---
 drivers/acpi/video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/video.c +1 -1
index 810cca9..a79b885 100644
@@ -2334,7 +2334,7 @@ static int __init acpi_video_init(void)
 	return acpi_video_register();
 }
 
-void __exit acpi_video_exit(void)
+void acpi_video_exit(void)
 {
 
 	acpi_bus_unregister_driver(&acpi_video_bus);
Signature · 1 line
1.6.1.1
#1 lore raw

PATCH 2/2 drm/i915: intel_lvds.c fix section mismatch warning

intel_no_lvds[] does not require __initdata as it is used only by :

void intel_lvds_init(struct drm_device *dev)

fixes section mismatch warning:

WARNING: drivers/gpu/drm/i915/i915.o(.text+0xf3c5): Section mismatch in reference from the function intel_lvds_init() to the variable .init.data:intel_no_lvds The function intel_lvds_init() references
the variable __initdata intel_no_lvds.
This is often because intel_lvds_init lacks a __initdata

---
 drivers/gpu/drm/i915/intel_lvds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +1 -1
index 439a865..5ffadf9 100644
@@ -391,7 +391,7 @@ static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
 }
 
 /* These systems claim to have LVDS, but really don't */
-static const struct dmi_system_id __initdata intel_no_lvds[] = {
+static const struct dmi_system_id intel_no_lvds[] = {
 	{
 		.callback = intel_no_lvds_dmi_callback,
 		.ident = "Apple Mac Mini (Core series)",
Signature · 1 line
1.6.1.1
#2 lore raw

Re: [PATCH 2/2 -tip] drm/i915: intel_lvds.c fix section mismatch warning

Quoted 11 lines · On Wednesday 20 May 2009 02:27:35 Jaswinder Singh Rajput wrote:

intel_no_lvds[] does not require __initdata as it is used only by :

void intel_lvds_init(struct drm_device *dev)

fixes section mismatch warning:

WARNING: drivers/gpu/drm/i915/i915.o(.text+0xf3c5): Section mismatch in reference from the function intel_lvds_init() to the variable .init.data:intel_no_lvds The function intel_lvds_init() references
the variable __initdata intel_no_lvds.
This is often because intel_lvds_init lacks a __initdata

This would seem to suggest __initdata should be added to intel_lvds_init, rather than removed from intel_no_lvds...

But I suppose either one would work. Apologies for not catching the initial mismatch... :\

Quoted 18 lines
---
 drivers/gpu/drm/i915/intel_lvds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +1 -1
index 439a865..5ffadf9 100644
@@ -391,7 +391,7 @@ static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
 }
 
 /* These systems claim to have LVDS, but really don't */
-static const struct dmi_system_id __initdata intel_no_lvds[] = {
+static const struct dmi_system_id intel_no_lvds[] = {
 	{
 		.callback = intel_no_lvds_dmi_callback,
 		.ident = "Apple Mac Mini (Core series)",
Signature · 2 lines
Jarod Wilson
[email protected]
#3 lore raw

Re: [PATCH 2/2 -tip] drm/i915: intel_lvds.c fix section mismatch warning

Quoted 8 lines · Jarod Wilson
Quoted 7 lines · On Wednesday 20 May 2009 02:27:35 Jaswinder Singh Rajput wrote:

intel_no_lvds[] does not require __initdata as it is used only by :

void intel_lvds_init(struct drm_device *dev)

fixes section mismatch warning:

Quoted 8 lines
Quoted 4 lines

WARNING: drivers/gpu/drm/i915/i915.o(.text+0xf3c5): Section mismatch in reference from the function intel_lvds_init() to the variable .init.data:intel_no_lvds The function intel_lvds_init() references
the variable __initdata intel_no_lvds.
This is often because intel_lvds_init lacks a __initdata

This would seem to suggest __initdata should be added to intel_lvds_init, rather than removed from intel_no_lvds...

The complete statement is :

WARNING: drivers/gpu/drm/i915/i915.o(.text+0xf3c5): Section mismatch in reference from the function intel_lvds_init() to the variable .init.data:intel_no_lvds The function intel_lvds_init() references
the variable __initdata intel_no_lvds.
This is often because intel_lvds_init lacks a __initdata
annotation or the annotation of intel_no_lvds is wrong.

Quoted 3 lines

But I suppose either one would work. Apologies for not catching the initial mismatch... :\

No another way it will not work.

As intel_no_lvds is used by intel_lvds_init and dmi_check_system.

We can not set intel_lvds_init as intel_lvds_init is used by :
static void intel_setup_outputs(struct drm_device *dev)

We can not set dmi_check_system to __init as it is also exported.

So the only option is to remove __initdata.

It seems the first patch : "[PATCH 1/2 -tip] drm/i915: acpi/video.c fix section mismatch warning" is applied in acpi tree by Len Brown.

I am not sure where this patch should go.

So I am also mailing to Andrew and Dave, it they find this useful then they can add in their tree.

Quoted 20 lines
Quoted 18 lines
---
 drivers/gpu/drm/i915/intel_lvds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_lvds.c +1 -1
index 439a865..5ffadf9 100644
@@ -391,7 +391,7 @@ static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
 }
 
 /* These systems claim to have LVDS, but really don't */
-static const struct dmi_system_id __initdata intel_no_lvds[] = {
+static const struct dmi_system_id intel_no_lvds[] = {
 	{
 		.callback = intel_no_lvds_dmi_callback,
 		.ident = "Apple Mac Mini (Core series)",
Acked-by
#4 lore raw

Re: [PATCH 2/2 -tip] drm/i915: intel_lvds.c fix section mismatch warning

Quoted 18 lines · On Friday 29 May 2009 02:16:35 Jaswinder Singh Rajput wrote:
Quoted 8 lines · Jarod Wilson
Quoted 7 lines · On Wednesday 20 May 2009 02:27:35 Jaswinder Singh Rajput wrote:

intel_no_lvds[] does not require __initdata as it is used only by :

void intel_lvds_init(struct drm_device *dev)

fixes section mismatch warning:

Quoted 8 lines
Quoted 4 lines

WARNING: drivers/gpu/drm/i915/i915.o(.text+0xf3c5): Section mismatch in reference from the function intel_lvds_init() to the variable .init.data:intel_no_lvds The function intel_lvds_init() references
the variable __initdata intel_no_lvds.
This is often because intel_lvds_init lacks a __initdata

This would seem to suggest __initdata should be added to intel_lvds_init, rather than removed from intel_no_lvds...

Quoted 7 lines

The complete statement is :

WARNING: drivers/gpu/drm/i915/i915.o(.text+0xf3c5): Section mismatch in reference from the function intel_lvds_init() to the variable .init.data:intel_no_lvds The function intel_lvds_init() references
the variable __initdata intel_no_lvds.
This is often because intel_lvds_init lacks a __initdata
annotation or the annotation of intel_no_lvds is wrong.

Ah, yeah, I'd have kept my mouth shut if the last line were there the first time, or at least looked at the code more to understand why you went this direction. ;)

Quoted 4 lines

I am not sure where this patch should go.

So I am also mailing to Andrew and Dave, it they find this useful then they can add in their tree.

Dave is on vacation a bit longer, iirc. Not entirely sure where else this might go either. I'm sure *someone* will pick it up sooner or later... In any case, thanks for the fix for my flub.

Signature · 2 lines
Jarod Wilson
[email protected]
#5 lore raw

Re: [PATCH 2/2 -tip] drm/i915: intel_lvds.c fix section mismatch warning

Hi Andrew,

Quoted 12 lines · Jarod Wilson
Quoted 4 lines · On Friday 29 May 2009 02:16:35 Jaswinder Singh Rajput wrote:

I am not sure where this patch should go.

So I am also mailing to Andrew and Dave, it they find this useful then they can add in their tree.

Dave is on vacation a bit longer, iirc. Not entirely sure where else this might go either. I'm sure *someone* will pick it up sooner or later... In any case, thanks for the fix for my flub.

Can you accept this patch with Jarod Ack as Dave is on vacation and Ingo is still busy with perfcounter ;-)

Thanks,
--
JSR

#6 lore raw

Re: [PATCH 2/2 -tip] drm/i915: intel_lvds.c fix section mismatch warning

Quoted 13 lines · On Fri, 29 May 2009 19:58:36 +0530 Jaswinder Singh Rajput…

Hi Andrew,

Quoted 10 lines · Jarod Wilson
Quoted 4 lines · On Friday 29 May 2009 02:16:35 Jaswinder Singh Rajput wrote:

I am not sure where this patch should go.

So I am also mailing to Andrew and Dave, it they find this useful then they can add in their tree.

Dave is on vacation a bit longer, iirc. Not entirely sure where else this might go either. I'm sure *someone* will pick it up sooner or later... In any case, thanks for the fix for my flub.

Quoted 5 lines
Quoted 2 lines

Can you accept this patch with Jarod Ack as Dave is on vacation and Ingo is still busy with perfcounter ;-)

It doesn't sound urgent, or are you seeing crashes due to this? If so I can queue it up to Linus (I'm taking critical fixes while Dave is away, though I think he's back now actually).

Jesse

#7 lore raw

Re: [PATCH 2/2 -tip] drm/i915: intel_lvds.c fix section mismatch warning

Quoted 19 lines · Jesse Barnes
Quoted 16 lines · On Fri, 29 May 2009 19:58:36 +0530 Jaswinder Singh Rajput…

Hi Andrew,

Quoted 12 lines · Jarod Wilson
Quoted 4 lines · On Friday 29 May 2009 02:16:35 Jaswinder Singh Rajput wrote:

I am not sure where this patch should go.

So I am also mailing to Andrew and Dave, it they find this useful then they can add in their tree.

Dave is on vacation a bit longer, iirc. Not entirely sure where else this might go either. I'm sure *someone* will pick it up sooner or later... In any case, thanks for the fix for my flub.

Quoted 7 lines
Quoted 2 lines

Can you accept this patch with Jarod Ack as Dave is on vacation and Ingo is still busy with perfcounter ;-)

It doesn't sound urgent, or are you seeing crashes due to this? If so I can queue it up to Linus (I'm taking critical fixes while Dave is away, though I think he's back now actually).

Ok, then better wait for Dave :-)

--
JSR

reviewer Applied
#8 lore raw
In reply to Jaswinder Singh Rajput

applied to acpi tree.

thanks,
Len Brown, Intel Open Source Technology Center

Quoted 36 lines · Jaswinder Singh Rajput

Currently acpi_video_exit() is exported as well as using __exit which causes:

WARNING: drivers/acpi/video.o(__ksymtab+0x0): Section mismatch in reference from the variable __ksymtab_acpi_video_exit to the function .exit.text:acpi_video_exit() The symbol acpi_video_exit is exported and annotated __exit
Fix this by removing the __exit annotation of acpi_video_exit or drop the export.

---
 drivers/acpi/video.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/video.c +1 -1
index 810cca9..a79b885 100644
@@ -2334,7 +2334,7 @@ static int __init acpi_video_init(void)
 	return acpi_video_register();
 }
 
-void __exit acpi_video_exit(void)
+void acpi_video_exit(void)
 {
 
 	acpi_bus_unregister_driver(&acpi_video_bus);
Signature · 9 lines
1.6.1.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/