Skip to contentSkip to conversation

drivers:uio:fix section mismatch in uio_pdrv_genirq.c

PATCH In review Wanlong Gao 2 participants 7 messages Aug 20, 2011 – Aug 22, 2011

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

PATCH 1/1 drivers:uio:fix section mismatch in uio_pdrv_genirq.c

From: Wanlong Gao <[email protected]>

Remove the __devinitconst to fix the section mismatch.

WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in reference from the variable uio_pdrv_genirq to the variable .devinit.rodata:uio_of_genirq_match
The variable uio_pdrv_genirq references
the variable __devinitconst uio_of_genirq_match
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

---
 drivers/uio/uio_pdrv_genirq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/uio/uio_pdrv_genirq.c +1 -1
index bae96d2..0b2ed71 100644
@@ -253,7 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
+static const struct of_device_id uio_of_genirq_match[] = {
 	{ /* empty for now */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH v2 1/1 drivers:uio:change the goto label to consistent with others

From: Wanlong Gao <[email protected]>

sorry for v1's typo mistake.
Thanks

Remove one *goto* label in uio.c.

---
 drivers/uio/uio.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/uio/uio.c +3 -4
index d2efe82..c89f12a 100644
@@ -750,14 +750,13 @@ static int uio_major_init(void)
 
 	uio_major = MAJOR(uio_dev);
 	uio_cdev = cdev;
-	result = 0;
-out:
-	return result;
+	return 0;
 out_put:
 	kobject_put(&cdev->kobj);
 out_unregister:
 	unregister_chrdev_region(uio_dev, UIO_MAX_DEVICES);
-	goto out;
+out:
+	return result;
 }
 
 static void uio_major_cleanup(void)
Signature · 1 line
1.7.4.1
#2 lore raw

Re: [PATCH v2] drivers:uio:change the goto label to consistent with others

Quoted 6 lines · Wanlong Gao

From: Wanlong Gao <[email protected]>

sorry for v1's typo mistake.
Thanks

Remove one *goto* label in uio.c.

Nice, that makes it a bit cleaner.

Thanks,
Hans

Quoted 2 lines
Quoted 30 lines
---
 drivers/uio/uio.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/uio/uio.c +3 -4
index d2efe82..c89f12a 100644
@@ -750,14 +750,13 @@ static int uio_major_init(void)
 
 	uio_major = MAJOR(uio_dev);
 	uio_cdev = cdev;
-	result = 0;
-out:
-	return result;
+	return 0;
 out_put:
 	kobject_put(&cdev->kobj);
 out_unregister:
 	unregister_chrdev_region(uio_dev, UIO_MAX_DEVICES);
-	goto out;
+out:
+	return result;
 }
 
 static void uio_major_cleanup(void)
Signature · 1 line
1.7.4.1
#3 lore raw
In reply to Wanlong Gao
Quoted 6 lines · Wanlong Gao

From: Wanlong Gao <[email protected]>

Remove the __devinitconst to fix the section mismatch.

WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in reference from the variable uio_pdrv_genirq to the variable

Hmm, I don't see that section mismatch here when I do a make CONFIG_DEBUG_SECTION_MISMATCH=y. How do you produce that?

Quoted 8 lines

.devinit.rodata:uio_of_genirq_match
The variable uio_pdrv_genirq references
the variable __devinitconst uio_of_genirq_match
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Is just removing the __devinitconst really the best solution?

Thanks,
Hans

Quoted 23 lines
---
 drivers/uio/uio_pdrv_genirq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/uio/uio_pdrv_genirq.c +1 -1
index bae96d2..0b2ed71 100644
@@ -253,7 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
+static const struct of_device_id uio_of_genirq_match[] = {
 	{ /* empty for now */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
Signature · 1 line
1.7.4.1
#4 lore raw
Quoted 10 lines · Hans J. Koch
Quoted 6 lines · Wanlong Gao

From: Wanlong Gao <[email protected]>

Remove the __devinitconst to fix the section mismatch.

WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in reference from the variable uio_pdrv_genirq to the variable

Hmm, I don't see that section mismatch here when I do a make CONFIG_DEBUG_SECTION_MISMATCH=y. How do you produce that?

I produced in arch of mips like
make O=../latest ARCH=mips CROSS_COMILE=mips-linux-

Quoted 10 lines
Quoted 9 lines

.devinit.rodata:uio_of_genirq_match
The variable uio_pdrv_genirq references
the variable __devinitconst uio_of_genirq_match
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Quoted 4 lines

Is just removing the __devinitconst really the best solution?

Thanks,
Hans

Do you have any better suggestions?

Thanks
-Wanlong Gao

Quoted 24 lines
Quoted 24 lines
---
 drivers/uio/uio_pdrv_genirq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/uio/uio_pdrv_genirq.c +1 -1
index bae96d2..0b2ed71 100644
@@ -253,7 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
+static const struct of_device_id uio_of_genirq_match[] = {
 	{ /* empty for now */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
Signature · 1 line
1.7.4.1
#5 lore raw

[Added linux-mips to Cc:]

Quoted 6 lines · Wanlong Gao
Quoted 5 lines · Hans J. Koch
Quoted 4 lines · Wanlong Gao

From: Wanlong Gao <[email protected]>

Remove the __devinitconst to fix the section mismatch.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in reference from the variable uio_pdrv_genirq to the variable

Hmm, I don't see that section mismatch here when I do a make CONFIG_DEBUG_SECTION_MISMATCH=y. How do you produce that?

I produced in arch of mips like
make O=../latest ARCH=mips CROSS_COMILE=mips-linux-

That seems to be a MIPS specific problem. It was tested OK on arm and x86.

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines

.devinit.rodata:uio_of_genirq_match
The variable uio_pdrv_genirq references
the variable __devinitconst uio_of_genirq_match
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Quoted 6 lines
Quoted 4 lines

Is just removing the __devinitconst really the best solution?

Thanks,
Hans

Do you have any better suggestions?

No, maybe the MIPS guys can shed some light on it.

Thanks,
Hans

Quoted 31 lines

Thanks
-Wanlong Gao

Quoted 24 lines
Quoted 24 lines
---
 drivers/uio/uio_pdrv_genirq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/uio/uio_pdrv_genirq.c +1 -1
index bae96d2..0b2ed71 100644
@@ -253,7 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
+static const struct of_device_id uio_of_genirq_match[] = {
 	{ /* empty for now */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
Signature · 1 line
1.7.4.1
#6 lore raw
Quoted 12 lines · Hans J. Koch

[Added linux-mips to Cc:]

Quoted 9 lines · Wanlong Gao
Quoted 8 lines · Hans J. Koch
Quoted 6 lines · Wanlong Gao

From: Wanlong Gao <[email protected]>

Remove the __devinitconst to fix the section mismatch.

WARNING: drivers/uio/built-in.o(.data+0x2e8): Section mismatch in reference from the variable uio_pdrv_genirq to the variable

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Hmm, I don't see that section mismatch here when I do a make CONFIG_DEBUG_SECTION_MISMATCH=y. How do you produce that?

I produced in arch of mips like
make O=../latest ARCH=mips CROSS_COMILE=mips-linux-

That seems to be a MIPS specific problem. It was tested OK on arm and x86.

Yeah, I see.

Quoted 12 lines
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines

.devinit.rodata:uio_of_genirq_match
The variable uio_pdrv_genirq references
the variable __devinitconst uio_of_genirq_match
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

Is just removing the __devinitconst really the best solution?

Thanks,
Hans

Do you have any better suggestions?

No, maybe the MIPS guys can shed some light on it.

It will be better.

Thanks
-Wanlong Gao

Quoted 35 lines

Thanks,
Hans

Quoted 31 lines

Thanks
-Wanlong Gao

Quoted 24 lines
Quoted 24 lines
---
 drivers/uio/uio_pdrv_genirq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/uio/uio_pdrv_genirq.c +1 -1
index bae96d2..0b2ed71 100644
@@ -253,7 +253,7 @@ static const struct dev_pm_ops uio_pdrv_genirq_dev_pm_ops = {
 };
 
 #ifdef CONFIG_OF
-static const struct of_device_id __devinitconst uio_of_genirq_match[] = {
+static const struct of_device_id uio_of_genirq_match[] = {
 	{ /* empty for now */ },
 };
 MODULE_DEVICE_TABLE(of, uio_of_genirq_match);
Signature · 1 line
1.7.4.1