* [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove @ 2011-10-05 14:29 Axel Lin 2011-10-11 10:25 ` Guan Xuetao 2011-10-18 7:22 ` Guan Xuetao 0 siblings, 2 replies; 8+ messages in thread From: Axel Lin @ 2011-10-05 14:29 UTC (permalink / raw) To: linux-kernel; +Cc: Guan Xuetao, Alessandro Zummo, rtc-linux Signed-off-by: Axel Lin <axel.lin@gmail.com> --- drivers/rtc/rtc-puv3.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index b3eba3c..e4b6880 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c @@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en) } } -static int puv3_rtc_remove(struct platform_device *dev) +static int __devexit puv3_rtc_remove(struct platform_device *dev) { struct rtc_device *rtc = platform_get_drvdata(dev); @@ -236,7 +236,7 @@ static int puv3_rtc_remove(struct platform_device *dev) return 0; } -static int puv3_rtc_probe(struct platform_device *pdev) +static int __devinit puv3_rtc_probe(struct platform_device *pdev) { struct rtc_device *rtc; struct resource *res; -- 1.7.4.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-05 14:29 [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove Axel Lin @ 2011-10-11 10:25 ` Guan Xuetao 2011-10-12 2:58 ` Guan Xuetao 2011-10-18 7:22 ` Guan Xuetao 1 sibling, 1 reply; 8+ messages in thread From: Guan Xuetao @ 2011-10-11 10:25 UTC (permalink / raw) To: Axel Lin; +Cc: linux-kernel, Alessandro Zummo, rtc-linux Thanks Axel. Signed-off-by: Guan Xuetao<gxt@mprc.pku.edu.cn> Guan Xuetao On Wed, 2011-10-05 at 22:29 +0800, Axel Lin wrote: > Signed-off-by: Axel Lin <axel.lin@gmail.com> > --- > drivers/rtc/rtc-puv3.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c > index b3eba3c..e4b6880 100644 > --- a/drivers/rtc/rtc-puv3.c > +++ b/drivers/rtc/rtc-puv3.c > @@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en) > } > } > > -static int puv3_rtc_remove(struct platform_device *dev) > +static int __devexit puv3_rtc_remove(struct platform_device *dev) > { > struct rtc_device *rtc = platform_get_drvdata(dev); > > @@ -236,7 +236,7 @@ static int puv3_rtc_remove(struct platform_device *dev) > return 0; > } > > -static int puv3_rtc_probe(struct platform_device *pdev) > +static int __devinit puv3_rtc_probe(struct platform_device *pdev) > { > struct rtc_device *rtc; > struct resource *res; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-11 10:25 ` Guan Xuetao @ 2011-10-12 2:58 ` Guan Xuetao 0 siblings, 0 replies; 8+ messages in thread From: Guan Xuetao @ 2011-10-12 2:58 UTC (permalink / raw) To: Axel Lin; +Cc: linux-kernel, Alessandro Zummo, rtc-linux Sorry, I should acknowledge it, not sign off. Acked-by: Guan Xuetao<gxt@mprc.pku.edu.cn> I will push the patch into my repo, thanks. Guan Xuetao On Tue, 2011-10-11 at 18:25 +0800, Guan Xuetao wrote: > Thanks Axel. > > Signed-off-by: Guan Xuetao<gxt@mprc.pku.edu.cn> > > Guan Xuetao > > On Wed, 2011-10-05 at 22:29 +0800, Axel Lin wrote: > > Signed-off-by: Axel Lin <axel.lin@gmail.com> > > --- > > drivers/rtc/rtc-puv3.c | 4 ++-- > > 1 files changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c > > index b3eba3c..e4b6880 100644 > > --- a/drivers/rtc/rtc-puv3.c > > +++ b/drivers/rtc/rtc-puv3.c > > @@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en) > > } > > } > > > > -static int puv3_rtc_remove(struct platform_device *dev) > > +static int __devexit puv3_rtc_remove(struct platform_device *dev) > > { > > struct rtc_device *rtc = platform_get_drvdata(dev); > > > > @@ -236,7 +236,7 @@ static int puv3_rtc_remove(struct platform_device *dev) > > return 0; > > } > > > > -static int puv3_rtc_probe(struct platform_device *pdev) > > +static int __devinit puv3_rtc_probe(struct platform_device *pdev) > > { > > struct rtc_device *rtc; > > struct resource *res; > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-05 14:29 [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove Axel Lin 2011-10-11 10:25 ` Guan Xuetao @ 2011-10-18 7:22 ` Guan Xuetao 2011-10-18 8:44 ` Axel Lin 2011-10-21 8:32 ` Michal Marek 1 sibling, 2 replies; 8+ messages in thread From: Guan Xuetao @ 2011-10-18 7:22 UTC (permalink / raw) To: Axel Lin, Michal Marek, Arnd Bergmann Cc: linux-kernel, Alessandro Zummo, rtc-linux Hi Axel, The patch yield following warnings: WARNING: drivers/rtc/built-in.o(.data+0x90): Section mismatch in reference from the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe() The variable puv3_rtcdrv references the function __devinit puv3_rtc_probe() 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 WARNING: drivers/rtc/built-in.o(.data+0x94): Section mismatch in reference from the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove() The variable puv3_rtcdrv references the function __devexit puv3_rtc_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/built-in.o(.data+0x6c04): Section mismatch in reference from the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe() The variable puv3_rtcdrv references the function __devinit puv3_rtc_probe() 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 WARNING: drivers/built-in.o(.data+0x6c08): Section mismatch in reference from the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove() The variable puv3_rtcdrv references the function __devexit puv3_rtc_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: vmlinux.o(.data+0x1126c): Section mismatch in reference from the variable puv3_rtcdrv to the function .devinit.text:puv3_rtc_probe() The variable puv3_rtcdrv references the function __devinit puv3_rtc_probe() 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 WARNING: vmlinux.o(.data+0x11270): Section mismatch in reference from the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove() The variable puv3_rtcdrv references the function __devexit puv3_rtc_remove() If the reference is valid then annotate the variable with __exit* (see linux/init.h) or name the variable: *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console For puv3_rtc_probe, I think it should be in the white-list, but warnings are yielded. For puv3_rtc_remove, the warning could be disappeared by modifying __devexit to __exit, however is it proper? Also, Cc: Michal Marek <mmarek@suse.cz> Cc: Arnd Bergmann <arnd@arndb.de> Any advice is appreciated, thanks. Guan Xuetao On Wed, 2011-10-05 at 22:29 +0800, Axel Lin wrote: > Signed-off-by: Axel Lin <axel.lin@gmail.com> > --- > drivers/rtc/rtc-puv3.c | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c > index b3eba3c..e4b6880 100644 > --- a/drivers/rtc/rtc-puv3.c > +++ b/drivers/rtc/rtc-puv3.c > @@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en) > } > } > > -static int puv3_rtc_remove(struct platform_device *dev) > +static int __devexit puv3_rtc_remove(struct platform_device *dev) > { > struct rtc_device *rtc = platform_get_drvdata(dev); > > @@ -236,7 +236,7 @@ static int puv3_rtc_remove(struct platform_device *dev) > return 0; > } > > -static int puv3_rtc_probe(struct platform_device *pdev) > +static int __devinit puv3_rtc_probe(struct platform_device *pdev) > { > struct rtc_device *rtc; > struct resource *res; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-18 7:22 ` Guan Xuetao @ 2011-10-18 8:44 ` Axel Lin 2011-10-18 10:35 ` Guan Xuetao 2011-10-21 8:32 ` Michal Marek 1 sibling, 1 reply; 8+ messages in thread From: Axel Lin @ 2011-10-18 8:44 UTC (permalink / raw) To: gxt; +Cc: Michal Marek, Arnd Bergmann, linux-kernel, Alessandro Zummo, rtc-linux hi Guan, > For puv3_rtc_probe, I think it should be in the white-list, but warnings > are yielded. > For puv3_rtc_remove, the warning could be disappeared by modifying > __devexit to __exit, however is it proper? > I'm not able to reproduce it on linux-next tree (20111014). If I Enable loadable module support, I got below build error: CC arch/unicore32/kernel/ksyms.o arch/unicore32/kernel/ksyms.c:39: error: 'csum_partial_copy_nocheck' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:39: warning: type defaults to 'int' in declaration of 'csum_partial_copy_nocheck' arch/unicore32/kernel/ksyms.c:40: error: '__csum_ipv6_magic' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:40: warning: type defaults to 'int' in declaration of '__csum_ipv6_magic' arch/unicore32/kernel/ksyms.c:44: error: '__raw_readsb' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:44: warning: type defaults to 'int' in declaration of '__raw_readsb' arch/unicore32/kernel/ksyms.c:47: error: '__raw_readsw' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:47: warning: type defaults to 'int' in declaration of '__raw_readsw' arch/unicore32/kernel/ksyms.c:50: error: '__raw_readsl' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:50: warning: type defaults to 'int' in declaration of '__raw_readsl' arch/unicore32/kernel/ksyms.c:53: error: '__raw_writesb' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:53: warning: type defaults to 'int' in declaration of '__raw_writesb' arch/unicore32/kernel/ksyms.c:56: error: '__raw_writesw' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:56: warning: type defaults to 'int' in declaration of '__raw_writesw' arch/unicore32/kernel/ksyms.c:59: error: '__raw_writesl' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:59: warning: type defaults to 'int' in declaration of '__raw_writesl' arch/unicore32/kernel/ksyms.c:80: error: '__get_user_1' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:80: warning: type defaults to 'int' in declaration of '__get_user_1' arch/unicore32/kernel/ksyms.c:81: error: '__get_user_2' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:81: warning: type defaults to 'int' in declaration of '__get_user_2' arch/unicore32/kernel/ksyms.c:82: error: '__get_user_4' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:82: warning: type defaults to 'int' in declaration of '__get_user_4' arch/unicore32/kernel/ksyms.c:84: error: '__put_user_1' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:84: warning: type defaults to 'int' in declaration of '__put_user_1' arch/unicore32/kernel/ksyms.c:85: error: '__put_user_2' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:85: warning: type defaults to 'int' in declaration of '__put_user_2' arch/unicore32/kernel/ksyms.c:86: error: '__put_user_4' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:86: warning: type defaults to 'int' in declaration of '__put_user_4' arch/unicore32/kernel/ksyms.c:87: error: '__put_user_8' undeclared here (not in a function) arch/unicore32/kernel/ksyms.c:87: warning: type defaults to 'int' in declaration of '__put_user_8' make[1]: *** [arch/unicore32/kernel/ksyms.o] Error 1 make: *** [arch/unicore32/kernel] Error 2 I also try to clone unicore tree, but I got connection timed out. :-( axel@phoenix:~/repos/git$ git clone git://master.kernel.org/pub/scm/linux/kernel/git/epip/linux-unicore.git Cloning into linux-unicore... master.kernel.org[0: 140.211.167.34]: errno=Connection timed out fatal: unable to connect a socket (Connection timed out) Regards, Axel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-18 8:44 ` Axel Lin @ 2011-10-18 10:35 ` Guan Xuetao 0 siblings, 0 replies; 8+ messages in thread From: Guan Xuetao @ 2011-10-18 10:35 UTC (permalink / raw) To: axel.lin Cc: Michal Marek, Arnd Bergmann, linux-kernel, Alessandro Zummo, rtc-linux On Tue, 2011-10-18 at 16:44 +0800, Axel Lin wrote: > hi Guan, > > > For puv3_rtc_probe, I think it should be in the white-list, but warnings > > are yielded. > > For puv3_rtc_remove, the warning could be disappeared by modifying > > __devexit to __exit, however is it proper? > > > > I'm not able to reproduce it on linux-next tree (20111014). > If I Enable loadable module support, I got below build error: > > CC arch/unicore32/kernel/ksyms.o > arch/unicore32/kernel/ksyms.c:39: error: 'csum_partial_copy_nocheck' > undeclared here (not in a function) > arch/unicore32/kernel/ksyms.c:39: warning: type defaults to 'int' in > declaration of 'csum_partial_copy_nocheck' > arch/unicore32/kernel/ksyms.c:40: error: '__csum_ipv6_magic' > undeclared here (not in a function) > arch/unicore32/kernel/ksyms.c:40: warning: type defaults to 'int' in > declaration of '__csum_ipv6_magic' > arch/unicore32/kernel/ksyms.c:44: error: '__raw_readsb' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:44: warning: type defaults to 'int' in > declaration of '__raw_readsb' > arch/unicore32/kernel/ksyms.c:47: error: '__raw_readsw' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:47: warning: type defaults to 'int' in > declaration of '__raw_readsw' > arch/unicore32/kernel/ksyms.c:50: error: '__raw_readsl' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:50: warning: type defaults to 'int' in > declaration of '__raw_readsl' > arch/unicore32/kernel/ksyms.c:53: error: '__raw_writesb' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:53: warning: type defaults to 'int' in > declaration of '__raw_writesb' > arch/unicore32/kernel/ksyms.c:56: error: '__raw_writesw' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:56: warning: type defaults to 'int' in > declaration of '__raw_writesw' > arch/unicore32/kernel/ksyms.c:59: error: '__raw_writesl' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:59: warning: type defaults to 'int' in > declaration of '__raw_writesl' > arch/unicore32/kernel/ksyms.c:80: error: '__get_user_1' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:80: warning: type defaults to 'int' in > declaration of '__get_user_1' > arch/unicore32/kernel/ksyms.c:81: error: '__get_user_2' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:81: warning: type defaults to 'int' in > declaration of '__get_user_2' > arch/unicore32/kernel/ksyms.c:82: error: '__get_user_4' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:82: warning: type defaults to 'int' in > declaration of '__get_user_4' > arch/unicore32/kernel/ksyms.c:84: error: '__put_user_1' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:84: warning: type defaults to 'int' in > declaration of '__put_user_1' > arch/unicore32/kernel/ksyms.c:85: error: '__put_user_2' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:85: warning: type defaults to 'int' in > declaration of '__put_user_2' > arch/unicore32/kernel/ksyms.c:86: error: '__put_user_4' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:86: warning: type defaults to 'int' in > declaration of '__put_user_4' > arch/unicore32/kernel/ksyms.c:87: error: '__put_user_8' undeclared > here (not in a function) > arch/unicore32/kernel/ksyms.c:87: warning: type defaults to 'int' in > declaration of '__put_user_8' > make[1]: *** [arch/unicore32/kernel/ksyms.o] Error 1 > make: *** [arch/unicore32/kernel] Error 2 This output seems that there is no cross-compiler in your machine. And the cross-compiler could be downloaded from my website: http://mprc.pku.edu.cn/~guanxuetao/linux/uc4-1.0.5-hard.tgz (about 100MB, including glibc for unicore32) > > I also try to clone unicore tree, but I got connection timed out. :-( > > axel@phoenix:~/repos/git$ git clone > git://master.kernel.org/pub/scm/linux/kernel/git/epip/linux-unicore.git > Cloning into linux-unicore... > master.kernel.org[0: 140.211.167.34]: errno=Connection timed out > fatal: unable to connect a socket (Connection timed out) Sorry, I just notify the email by Peter Anvin. And I will re-establish my PGP and repo recently. Thanks, Guan Xuetao > > Regards, > Axel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-18 7:22 ` Guan Xuetao 2011-10-18 8:44 ` Axel Lin @ 2011-10-21 8:32 ` Michal Marek 2011-10-21 8:42 ` Michal Marek 1 sibling, 1 reply; 8+ messages in thread From: Michal Marek @ 2011-10-21 8:32 UTC (permalink / raw) To: gxt; +Cc: Axel Lin, Arnd Bergmann, linux-kernel, Alessandro Zummo, rtc-linux On 18.10.2011 09:22, Guan Xuetao wrote: > Hi Axel, > The patch yield following warnings: > > WARNING: drivers/rtc/built-in.o(.data+0x90): Section mismatch in > reference from the variable puv3_rtcdrv to the > function .devinit.text:puv3_rtc_probe() > The variable puv3_rtcdrv references > the function __devinit puv3_rtc_probe() > 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 [...] > > For puv3_rtc_probe, I think it should be in the white-list, but warnings > are yielded. > For puv3_rtc_remove, the warning could be disappeared by modifying > __devexit to __exit, however is it proper? The warning message tries to hint at the solution. Just name the variable static struct platform_driver puv3_rtc_driver and modpost will know that this is simply a list of pointers to driver functions, in which case the section mismatch is OK (the init function will only be called at init time). Michal ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove 2011-10-21 8:32 ` Michal Marek @ 2011-10-21 8:42 ` Michal Marek 0 siblings, 0 replies; 8+ messages in thread From: Michal Marek @ 2011-10-21 8:42 UTC (permalink / raw) To: gxt; +Cc: Axel Lin, Arnd Bergmann, linux-kernel, Alessandro Zummo, rtc-linux On 21.10.2011 10:32, Michal Marek wrote: > The warning message tries to hint at the solution. Just name the variable > > static struct platform_driver puv3_rtc_driver > > and modpost will know that this is simply a list of pointers to driver > functions, in which case the section mismatch is OK (the init function > will only be called at init time). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Correction: it's actually a probe function with __devinit, which on most setups (with CONFIG_HOTPLUG=y) can be called any time, but then on those setups the __devinit does not cause the section to be freed. Nevertheless, naming the variable puv3_rtc_driver is the correct solution. Michal ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-10-21 8:42 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-10-05 14:29 [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove Axel Lin 2011-10-11 10:25 ` Guan Xuetao 2011-10-12 2:58 ` Guan Xuetao 2011-10-18 7:22 ` Guan Xuetao 2011-10-18 8:44 ` Axel Lin 2011-10-18 10:35 ` Guan Xuetao 2011-10-21 8:32 ` Michal Marek 2011-10-21 8:42 ` Michal Marek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox