ti-gfx: build with GCC 4.8
PATCH 1/1 ti-gfx: build with GCC 4.8
In older kernels clk_disable() is a void function.
--- package/ti-gfx/ti-gfx-newclkapi.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/ti-gfx/ti-gfx-newclkapi.patch +2 -2
@@ -14,7 +14,7 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_disable_unprepare(struct clk *clk) +{ -+ return clk_disable(clk); ++ clk_disable(clk); return 0; +} +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +int clk_disable_unprepare(struct clk *clk)
@@ -35,7 +35,7 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_prepare_enable(struct clk *clk) +{ -+ return clk_enable(clk); ++ clk_enable(clk); return 0; +} +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +int clk_prepare_enable(struct clk *clk)
Signature · 1 line
1.8.3.2
PATCH 1/1 ti-gfx: build with GCC 4.8
Peter, All,
On 2014-02-14 16:29 +0100, Peter K?mmel spake thusly:
Quoted 1 line
In older kernels
clk_disable()is a void function.
Not only in older kernels, but in recent kernels, too.
For example, in v3.14-rc4:
$ git grep 'void clk_disable' include
include/linux/clk.h:void clk_disable(struct clk *clk);Quoted 19 lines
Signed-off-by Peter K?mmel <[email protected]>--- package/ti-gfx/ti-gfx-newclkapi.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/ti-gfx/ti-gfx-newclkapi.patch +1
-1@@ -14,7 +14,7 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_disable_unprepare(struct clk *clk) +{ -+ return clk_disable(clk); ++ clk_disable(clk); return 0; +} +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +int clk_disable_unprepare(struct clk *clk)
package/ti-gfx/ti-gfx-newclkapi.patch Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c · line 38
Quoted 5 lines
package/ti-gfx/ti-gfx-newclkapi.patch +1
-1@@ -35,7 +35,7 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_prepare_enable(struct clk *clk) +{ -+ return clk_enable(clk); ++ clk_enable(clk); return 0;
But why did you change clk_enable too? As far as I can see, it always returned an int, for as long as it existed. Eg. in v2.6.19:
$ git grep 'int clk_enable' include
include/linux/clk.h:int clk_enable(struct clk *clk);Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 ti-gfx: build with GCC 4.8
Quoted 31 lines · Yann E. MORIN
Peter, All,
On 2014-02-14 16:29 +0100, Peter K?mmel spake thusly:
Quoted 1 line
In older kernels
clk_disable()is a void function.Not only in older kernels, but in recent kernels, too.
For example, in v3.14-rc4:
$ git grep 'void clk_disable' include include/linux/clk.h:void clk_disable(struct clk *clk);Quoted 19 lines
Signed-off-by Peter K?mmel <[email protected]>--- package/ti-gfx/ti-gfx-newclkapi.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)package/ti-gfx/ti-gfx-newclkapi.patch +1
-1@@ -14,7 +14,7 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_disable_unprepare(struct clk *clk) +{ -+ return clk_disable(clk); ++ clk_disable(clk); return 0; +} +#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) +int clk_disable_unprepare(struct clk *clk)@@ -35,7 +35,7 @@ Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c
Quoted 8 lines
package/ti-gfx/ti-gfx-newclkapi.patch Index: ti-gfx-4_09_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c · line 38
Quoted 5 lines
package/ti-gfx/ti-gfx-newclkapi.patch +1
-1+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) +int clk_prepare_enable(struct clk *clk) +{ -+ return clk_enable(clk); ++ clk_enable(clk); return 0;But why did you change
clk_enabletoo? As far as I can see, it always returned an int, for as long as it existed. Eg. in v2.6.19:
Yes, this change was wrong.
Quoted 7 lines
$ git grep 'int clk_enable' include include/linux/clk.h:int clk_enable(struct clk *clk);Regards,
Yann E. MORIN.