ARM:i.MX fix compile errors and warnings
v3 cover ARM:i.MX fix compile errors and warnings
This patch-set fix the compile errors and warnings on i.MX
Jason Liu (3):
ARM:i.MX: fix build error in tzic/avic.c ARM:i.MX: fix the build error in clock-mx51-mx53.c ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
arch/arm/mach-mx5/clock-mx51-mx53.c | 4 ++++ arch/arm/plat-mxc/avic.c | 1 + arch/arm/plat-mxc/tzic.c | 1 + 3 files changed, 6 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.4.1
PATCH v3 1/3 ARM:i.MX: fix build error in tzic/avic.c
arch/arm/plat-mxc/tzic.c:105: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tzic_handle_irq'
--- arch/arm/plat-mxc/avic.c | 1 + arch/arm/plat-mxc/tzic.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/avic.c +1 -0
@@ -22,6 +22,7 @@#include <linux/io.h> #include <mach/common.h> #include <asm/mach/irq.h> +#include <asm/exception.h> #include <mach/hardware.h> #include "irq-common.h"
arch/arm/plat-mxc/tzic.c +1 -0
@@ -17,6 +17,7 @@#include <linux/io.h> #include <asm/mach/irq.h> +#include <asm/exception.h> #include <mach/hardware.h> #include <mach/common.h>
Signature · 1 line
1.7.4.1
PATCH 1/1 ARM: mx25: Add the missing IIM base definition
In reply to Jason LiuThis fix the mx25 building issue of no IIM base definition
--- arch/arm/plat-mxc/include/mach/mx25.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/plat-mxc/include/mach/mx25.h +1 -0
@@ -41,6 +41,7 @@#define MX25_SSI2_BASE_ADDR 0x50014000#define MX25_SSI1_BASE_ADDR 0x50034000#define MX25_NFC_BASE_ADDR 0xbb000000 +#define MX25_IIM_BASE_ADDR 0x53ff0000#define MX25_DRYICE_BASE_ADDR 0x53ffc000#define MX25_ESDHC1_BASE_ADDR 0x53fb4000#define MX25_ESDHC2_BASE_ADDR 0x53fb8000
Signature · 1 line
1.7.4.1
PATCH 1/1 ARM: mx25: Add the missing IIM base definition
Hi, Sascha
2011/11/2 Jason Liu <[email protected]>:
Quoted 13 lines
This fix the mx25 building issue of no IIM base definition
Signed-off-by Jason Liu <[email protected]>Cc Sascha Hauer <[email protected]>---
?arch/arm/plat-mxc/include/mach/mx25.h | ? ?1 +
?1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/plat-mxc/include/mach/mx25.h +0
-0@@ -41,6 +41,7 @@
Quoted 7 lines
?#define
MX25_SSI2_BASE_ADDR? ? ? ? ? ?0x50014000 ?#defineMX25_SSI1_BASE_ADDR? ? ? ? ? ?0x50034000 ?#defineMX25_NFC_BASE_ADDR? ? ? ? ? ?0xbb000000+#defineMX25_IIM_BASE_ADDR? ? ? ? ? ?0x53ff0000?#defineMX25_DRYICE_BASE_ADDR? ? ? ? ?0x53ffc000 ?#defineMX25_ESDHC1_BASE_ADDR? ? ? ? ?0x53fb4000 ?#defineMX25_ESDHC2_BASE_ADDR? ? ? ? ?0x53fb8000
Please ignore this patch, sorry for that.
Jason Liu
Quoted 10 lines
--
1.7.4.1_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 slub: doc: update the slabinfo.c file path
In reply to Jason Liuslabinfo.c has been moved from Documentaion/vm/ to tools/slub/ by commit:0d24db337e6d81c0c620ab65cc6947bd6553f742
Update the slub.txt doc to reflect this change too.
--- Documentation/vm/00-INDEX | 2 -- Documentation/vm/slub.txt | 2 +- 2 files changed, 1 insertions(+), 3 deletions(-)
Documentation/vm/00-INDEX +0 -2
@@ -30,8 +30,6 @@ page_migration - description of page migration in NUMA systems. pagemap.txt - pagemap, from the userspace perspective -slabinfo.c - - source code for a tool to get reports about slabs. slub.txt - a short users guide for SLUB. unevictable-lru.txt
Documentation/vm/slub.txt +1 -1
@@ -17,7 +17,7 @@ data and perform operation on the slabs. By default slabinfo only lists slabs that have data in them. See "slabinfo -h" for more options when running the command. slabinfo can be compiled with -gcc -o slabinfo Documentation/vm/slabinfo.c +gcc -o slabinfo tools/slub/slabinfo.c Some of the modes of operation of slabinfo require that slub debugging be enabled on the command line. F.e. no tracking information will be
Signature · 1 line
1.7.4.1
PATCH 1/1 slub: doc: update the slabinfo.c file path
Quoted 7 lines · Jason Liu
slabinfo.chas been moved from Documentaion/vm/ totools/slub/by commit:0d24db337e6d81c0c620ab65cc6947bd6553f742Update the slub.txt doc to reflect this change too.
Signed-off-by Jason Liu <[email protected]>Cc Christoph Lameter <[email protected]>
This patch shouldn't be part of this patch set; there is nothing IMX specific with it. It is purely a stand-alone bug fix and, therefore, it should stand completely alone as its own patch.
You're not even copying it to those who you claim to be doing so in the commit log above.
It should be copied to the appropriate people and mailing lists.
PATCH 1/1 slub: doc: update the slabinfo.c file path
2011/11/2 Russell King - ARM Linux <[email protected]>:
Quoted 9 lines · Jason Liu
Quoted 7 lines
slabinfo.chas been moved from Documentaion/vm/ totools/slub/by commit:0d24db337e6d81c0c620ab65cc6947bd6553f742Update the slub.txt doc to reflect this change too.
Signed-off-by Jason Liu <[email protected]>Cc Christoph Lameter <[email protected]>
Quoted 8 lines
This patch shouldn't be part of this patch set; there is nothing IMX specific with it. ?It is purely a stand-alone bug fix and, therefore, it should stand completely alone as its own patch.
You're not even copying it to those who you claim to be doing so in the commit log above.
It should be copied to the appropriate people and mailing lists.
Please ignore this patch since this patch has already gone to the next. Sorry for that.
Jason Liu
Quoted 7 lines
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v3 2/3 ARM:i.MX: fix the build error in clock-mx51-mx53.c
In reply to Jason Liuarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1643: error: implicit declaration of function 'for_each_compatible_node' arch/arm/mach-mx5/clock-mx51-mx53.c:1643: error: expected ';' before '{' token
--- arch/arm/mach-mx5/clock-mx51-mx53.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +2 -0
@@ -1637,6 +1637,7 @@ int __init mx53_clocks_init(unsigned long ckil, unsigned long osc,static void __init clk_get_freq_dt (unsigned long *ckil,unsigned long *osc,unsigned long *ckih1,unsigned long *ckih2) { +#ifdef CONFIG_OF struct device_node *np;/* retrieve the freqency of fixed clocks from device tree */
@@ -1654,6 +1655,7 @@ static void __init clk_get_freq_dt(unsigned long *ckil, unsigned long *osc, else if (of_device_is_compatible(np, "fsl,imx-ckih2")) *ckih2 = rate; } +#endif }int __init mx51_clocks_init_dt (void )
Signature · 1 line
1.7.4.1
PATCH v3 3/3 ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
In reply to Jason Liuarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1640: warning: unused variable 'np' arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx53_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckil' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'osc' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih1' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih2' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx51_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckil' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'osc' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih1' is used uninitialized in this function arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih2' is used uninitialized in this function
--- arch/arm/mach-mx5/clock-mx51-mx53.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-mx5/clock-mx51-mx53.c +2 -0
@@ -1662,6 +1662,7 @@ int __init mx51_clocks_init_dt(void) {unsigned long ckil, osc, ckih1, ckih2; + ckil = osc = ckih1 = ckih2 =0 ;clk_get_freq_dt (&ckil, &osc, &ckih1, &ckih2);return mx51_clocks_init (ckil, osc, ckih1, ckih2); }
@@ -1670,6 +1671,7 @@ int __init mx53_clocks_init_dt(void) {unsigned long ckil, osc, ckih1, ckih2; + ckil = osc = ckih1 = ckih2 =0 ;clk_get_freq_dt (&ckil, &osc, &ckih1, &ckih2);return mx53_clocks_init (ckil, osc, ckih1, ckih2); }
Signature · 1 line
1.7.4.1
Sascha Hauer
maintainerPATCH v3 3/3 ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
Quoted 4 lines · Jason Liu
arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1640: warning: unused variable 'np'arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx53_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckil' is used uninitialized in this function
Quoted 8 lines
arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih2' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx51_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih2' is used uninitialized in this function
You only get this warning because you have put the code in clk_get_freq_dt into #ifdef CONFIG_OF in the last patch. Instead please put the whole block including clk_get_freq_dt, mx51_clocks_init_dt and mx53_clocks_init_dt into #ifdef CONFIG_OF.
Sascha
Quoted 31 lines
Signed-off-by Jason Liu <[email protected]>--- arch/arm/mach-mx5/clock-mx51-mx53.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +2
-0@@ -1662,6 +1662,7 @@ int __init mx51_clocks_init_dt(void) {unsigned long ckil, osc, ckih1, ckih2; + ckil = osc = ckih1 = ckih2 =0 ;clk_get_freq_dt (&ckil, &osc, &ckih1, &ckih2);return mx51_clocks_init (ckil, osc, ckih1, ckih2); }@@ -1670,6 +1671,7 @@ int __init mx53_clocks_init_dt(void) {unsigned long ckil, osc, ckih1, ckih2; + ckil = osc = ckih1 = ckih2 =0 ;clk_get_freq_dt (&ckil, &osc, &ckih1, &ckih2);return mx53_clocks_init (ckil, osc, ckih1, ckih2); }Signature · 1 line
1.7.4.1
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH v3 3/3 ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
2011/11/3 Sascha Hauer <[email protected]>:
Quoted 13 lines · Jason Liu
Quoted 11 lines
arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx53_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih2' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx51_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih2' is used uninitialized in this function
Quoted 4 lines
You only get this warning because you have put the code in
clk_get_freq_dtinto #ifdefCONFIG_OFin the last patch. Instead please put the whole block includingclk_get_freq_dt,mx51_clocks_init_dtandmx53_clocks_init_dtinto #ifdefCONFIG_OF.
Yes, I can put #ifdef CONFIG_OF to cover the whole block including clk_get_freq_dt/
mx51_clocks_init_dt/mx53_clocks_init_dt, but after enable CONFIG_OF, you still will
meet these compiling warnings.
But refer to grant before, we don't need place #ifdef CONFIG_OF #endif into the .c file, no-matter enable device_tree support or not. I'm not sure why we still
meet compile error, shawn, any comments?
Jason Liu
Quoted 45 lines
Sascha
Quoted 27 lines
Signed-off-by Jason Liu <[email protected]>---
?arch/arm/mach-mx5/clock-mx51-mx53.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +2
-1@@ -1662,6 +1662,7 @@ int __init mx51_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx51_clocks_init(ckil, osc, ckih1, ckih2); ?}@@ -1670,6 +1671,7 @@ int __init mx53_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx53_clocks_init(ckil, osc, ckih1, ckih2); ?} --Quoted 4 lines
1.7.4.1
--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sascha Hauer
maintainerPATCH v3 3/3 ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
Quoted 19 lines · Jason Liu
2011/11/3 Sascha Hauer <[email protected]>:
Quoted 13 lines · Jason Liu
Quoted 11 lines
arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx53_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih2' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx51_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih2' is used uninitialized in this functionQuoted 4 lines
You only get this warning because you have put the code in
clk_get_freq_dtinto #ifdefCONFIG_OFin the last patch. Instead please put the whole block includingclk_get_freq_dt,mx51_clocks_init_dtandmx53_clocks_init_dtinto #ifdefCONFIG_OF.
Quoted 5 lines
Yes, I can put #ifdef
CONFIG_OFto cover the whole block including clk_get_freq_dt/
mx51_clocks_init_dt/mx53_clocks_init_dt, but after enableCONFIG_OF, you still will
meet these compiling warnings.
I just tried it and no, I do not get any compiler warnings.
When passing the address of a variable to a function gcc considers this variable as initialized after that, unless the function is a static inline function and gcc can see that it actually does not get initialized.
I hope this hasn't changed with gcc 4.6
Quoted 5 lines
But refer to grant before, we don't need place #ifdef
CONFIG_OF#endif into the .c file, no-matter enabledevice_treesupport or not. I'm not sure why we still
meet compile error, shawn, any comments?
for_each_compatible_node is inside #ifdef CONFIG_OF in the header file. So unless there are plans to provide some dummy stub for this without CONFIG_OF I see no way around these ifdefs.
Quoted 49 lines
Jason Liu
Quoted 45 lines
Sascha
Quoted 27 lines
Signed-off-by Jason Liu <[email protected]>---
?arch/arm/mach-mx5/clock-mx51-mx53.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +2
-1@@ -1662,6 +1662,7 @@ int __init mx51_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx51_clocks_init(ckil, osc, ckih1, ckih2); ?}@@ -1670,6 +1671,7 @@ int __init mx53_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx53_clocks_init(ckil, osc, ckih1, ckih2); ?} --Quoted 4 lines
1.7.4.1
--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH v3 3/3 ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
2011/11/3 Sascha Hauer <[email protected]>:
Quoted 20 lines · Jason Liu
Quoted 19 lines
2011/11/3 Sascha Hauer <[email protected]>:
Quoted 17 lines · Jason Liu
Quoted 11 lines
arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx53_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih2' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx51_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih2' is used uninitialized in this functionYou only get this warning because you have put the code in
clk_get_freq_dtinto #ifdefCONFIG_OFin the last patch. Instead please put the whole block includingclk_get_freq_dt,mx51_clocks_init_dtandmx53_clocks_init_dtinto #ifdefCONFIG_OF.
Quoted 7 lines
Quoted 5 lines
Yes, I can put #ifdef
CONFIG_OFto cover the whole block including clk_get_freq_dt/
mx51_clocks_init_dt/mx53_clocks_init_dt, but after enableCONFIG_OF, you still will
meet these compiling warnings.I just tried it and no, I do not get any compiler warnings.
OK, thanks.
Quoted 6 lines
When passing the address of a variable to a function gcc considers this variable as initialized after that, unless the function is a static inline function and gcc can see that it actually does not get initialized.
I hope this hasn't changed with gcc 4.6
you right. After move the #ifdef to cover all the dt related, I did not get any compile
warnings. I will update this patch soon. see v2 for it.
Jason Liu
Quoted 67 lines
Quoted 6 lines
But refer to grant before, we don't need place #ifdef
CONFIG_OF#endif into the .c file, no-matter enabledevice_treesupport or not. I'm not sure why we still
meet compile error, shawn, any comments?
for_each_compatible_nodeis inside #ifdefCONFIG_OFin the header file. So unless there are plans to provide some dummy stub for this withoutCONFIG_OFI see no way around these ifdefs.Quoted 49 lines
Jason Liu
Quoted 45 lines
Sascha
Quoted 27 lines
Signed-off-by Jason Liu <[email protected]>---
?arch/arm/mach-mx5/clock-mx51-mx53.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +2
-1@@ -1662,6 +1662,7 @@ int __init mx51_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx51_clocks_init(ckil, osc, ckih1, ckih2); ?}@@ -1670,6 +1671,7 @@ int __init mx53_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx53_clocks_init(ckil, osc, ckih1, ckih2); ?} --Quoted 4 lines
1.7.4.1
--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |
PATCH v3 3/3 ARM:i.MX: fix the compile warnings in clock-mx51-mx53.c
2011/11/3 Jason Liu <[email protected]>:
Quoted 38 lines
2011/11/3 Sascha Hauer <[email protected]>:
Quoted 20 lines · Jason Liu
Quoted 19 lines
2011/11/3 Sascha Hauer <[email protected]>:
Quoted 17 lines · Jason Liu
Quoted 11 lines
arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'clk_get_freq_dt':arch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx53_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1673: warning: 'ckih2' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c: In function 'mx51_clocks_init_dt':arch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckil' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'osc' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih1' is used uninitialized in this functionarch/arm/mach-mx5/clock-mx51-mx53.c:1665: warning: 'ckih2' is used uninitialized in this functionYou only get this warning because you have put the code in
clk_get_freq_dtinto #ifdefCONFIG_OFin the last patch. Instead please put the whole block includingclk_get_freq_dt,mx51_clocks_init_dtandmx53_clocks_init_dtinto #ifdefCONFIG_OF.Quoted 7 lines
Quoted 5 lines
Yes, I can put #ifdef
CONFIG_OFto cover the whole block including clk_get_freq_dt/
mx51_clocks_init_dt/mx53_clocks_init_dt, but after enableCONFIG_OF, you still will
meet these compiling warnings.I just tried it and no, I do not get any compiler warnings.
OK, thanks.
Quoted 6 lines
When passing the address of a variable to a function gcc considers this variable as initialized after that, unless the function is a static inline function and gcc can see that it actually does not get initialized.
I hope this hasn't changed with gcc 4.6
Quoted 3 lines
you right. After move the #ifdef to cover all the dt related, I did not get any compile
warnings. I will update this patch soon. see v2 for it.
The version for this patch-set is messed up by my local script. In fact, this initial version should be v1 (not v3) and the following is v2. I will be careful
to not run into this issue later. sorry for the reader who confuse about it.
Quoted 71 lines
Jason Liu
Quoted 67 lines
Quoted 6 lines
But refer to grant before, we don't need place #ifdef
CONFIG_OF#endif into the .c file, no-matter enabledevice_treesupport or not. I'm not sure why we still
meet compile error, shawn, any comments?
for_each_compatible_nodeis inside #ifdefCONFIG_OFin the header file. So unless there are plans to provide some dummy stub for this withoutCONFIG_OFI see no way around these ifdefs.Quoted 49 lines
Jason Liu
Quoted 45 lines
Sascha
Quoted 27 lines
Signed-off-by Jason Liu <[email protected]>---
?arch/arm/mach-mx5/clock-mx51-mx53.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)arch/arm/mach-mx5/clock-mx51-mx53.c +2
-1@@ -1662,6 +1662,7 @@ int __init mx51_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx51_clocks_init(ckil, osc, ckih1, ckih2); ?}@@ -1670,6 +1671,7 @@ int __init mx53_clocks_init_dt(void) ?{ ? ? ? unsigned long ckil, osc, ckih1, ckih2; + ? ? ckil = osc = ckih1 = ckih2 = 0; ? ? ? clk_get_freq_dt(&ckil, &osc, &ckih1, &ckih2); ? ? ? return mx53_clocks_init(ckil, osc, ckih1, ckih2); ?} --Quoted 4 lines
1.7.4.1
--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel--
Pengutronix e.K. ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ? ? ? ? ? ? ? ? ? ? ? ? ? | Industrial Linux Solutions ? ? ? ? ? ? ? ? | http://www.pengutronix.de/ ?| Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 ? ?| Amtsgericht Hildesheim, HRA 2686 ? ? ? ? ? | Fax: ? +49-5121-206917-5555 |