AVR32: fix building warnings caused by redifinitions of HZ
PATCH 1/1 AVR32: fix building warnings caused by redifinitions of HZ
Fix building warnings caused by redifinitions of HZ:
In file included from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4,
from include/linux/timex.h:63,
from include/linux/jiffies.h:8,
from include/linux/ktime.h:25,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
from include/linux/srcu.h:34,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:777,
from include/linux/gfp.h:4,
from arch/avr32/mm/init.c:10:
/ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:6:1: warning: "HZ" redefined
In file included from /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:4,
from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4,
from include/linux/timex.h:63,
from include/linux/jiffies.h:8,
from include/linux/ktime.h:25,
from include/linux/timer.h:5,
from include/linux/workqueue.h:8,
from include/linux/srcu.h:34,
from include/linux/notifier.h:15,
from include/linux/memory_hotplug.h:6,
from include/linux/mmzone.h:777,
from include/linux/gfp.h:4,
from arch/avr32/mm/init.c:10:/ws/linux/kernel/linux.git/arch/avr32/include/uapi/asm/param.h:6:1: warning: this is the location of the previous definition
--- arch/avr32/include/uapi/asm/param.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
arch/avr32/include/uapi/asm/param.h +5 -1
@@ -2,7 +2,11 @@#define _UAPI__ASM_AVR32_PARAM_H -#ifndef HZ +#ifndef __KERNEL__ +/* +* Technically, this is wrong, but some old apps still refer to it. +* The proper way to get the HZ value is via sysconf(_SC_CLK_TCK). +*/ # define HZ 100#endif
Signature · 1 line
1.7.9.5
Quoted 27 lines · Jiang Liu
Fix building warnings caused by redifinitions of HZ:
In file included from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4,from include/linux/timex.h:63, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/srcu.h:34, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:777, from include/linux/gfp.h:4, from arch/avr32/mm/init.c:10: /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:6:1: warning: "HZ" redefined In file included from /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:4, from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4, from include/linux/timex.h:63, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/srcu.h:34, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:777, from include/linux/gfp.h:4, from arch/avr32/mm/init.c:10:
Quoted 1 line
/ws/linux/kernel/linux.git/arch/avr32/include/uapi/asm/param.h:6:1: warning: this is the location of the previous definition
Thanks for fixing.
Quoted 4 lines
Signed-off-by Jiang Liu <[email protected]>Cc Haavard Skinnemoen <[email protected]>Cc Hans-Christian Egtvedt <[email protected]>
Quoted 9 lines
--- arch/avr32/include/uapi/asm/param.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/avr32/include/uapi/asm/param.h +0
-0
arch/avr32/include/uapi/asm/param.h line 9
Quoted 9 lines
arch/avr32/include/uapi/asm/param.h +5
-1@@ -2,7 +2,11 @@#define _UAPI__ASM_AVR32_PARAM_H -#ifndef HZ +#ifndef __KERNEL__ +/* +* Technically, this is wrong, but some old apps still refer to it. +* The proper way to get the HZ value is via sysconf(_SC_CLK_TCK). +*/
With this comment, are there AVR32 drivers/users that should be fixed? Or is it parts of the tree in general?
Quoted 3 lines
arch/avr32/include/uapi/asm/param.h +0
-0# define HZ 100#endif
Signature · 2 lines
mvh Hans-Christian Egtvedt
Quoted 51 lines · Hans-Christian Egtvedt
Quoted 27 lines · Jiang Liu
Fix building warnings caused by redifinitions of HZ:
In file included from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4,from include/linux/timex.h:63, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/srcu.h:34, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:777, from include/linux/gfp.h:4, from arch/avr32/mm/init.c:10: /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:6:1: warning: "HZ" redefined In file included from /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:4, from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4, from include/linux/timex.h:63, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/srcu.h:34, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:777, from include/linux/gfp.h:4, from arch/avr32/mm/init.c:10:Quoted 1 line
/ws/linux/kernel/linux.git/arch/avr32/include/uapi/asm/param.h:6:1: warning: this is the location of the previous definition
Thanks for fixing.
Quoted 4 lines
Signed-off-by Jiang Liu <[email protected]>Cc Haavard Skinnemoen <[email protected]>Cc Hans-Christian Egtvedt <[email protected]>Quoted 12 lines
--- arch/avr32/include/uapi/asm/param.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/avr32/include/uapi/asm/param.h +0
-0@@ -2,7 +2,11 @@#define _UAPI__ASM_AVR32_PARAM_H
Quoted 9 lines
arch/avr32/include/uapi/asm/param.h line 9
Quoted 6 lines
arch/avr32/include/uapi/asm/param.h +5
-1-#ifndef HZ +#ifndef __KERNEL__ +/* +* Technically, this is wrong, but some old apps still refer to it. +* The proper way to get the HZ value is via sysconf(_SC_CLK_TCK). +*/ With this comment, are there AVR32
drivers/usersthat should be fixed? Or is it parts of the tree in general?
Hi Hans,
It's copied from arch/ia64/include/uapi/asm/param.h, I feel it should be
the same for AVR32 too.
Regards!
Gerry
Quoted 4 lines
Quoted 4 lines
arch/avr32/include/uapi/asm/param.h +0
-0# define HZ 100#endif
Quoted 3 lines · Jiang Liu
Quoted 2 lines · Hans-Christian Egtvedt
Quoted 1 line · Jiang Liu
Fix building warnings caused by redifinitions of HZ:
<snipp warning>
Quoted 30 lines
Quoted 21 lines
Thanks for fixing.
Quoted 4 lines
Signed-off-by Jiang Liu <[email protected]>Cc Haavard Skinnemoen <[email protected]>Cc Hans-Christian Egtvedt <[email protected]>Quoted 12 lines
--- arch/avr32/include/uapi/asm/param.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)arch/avr32/include/uapi/asm/param.h +0
-0@@ -2,7 +2,11 @@#define _UAPI__ASM_AVR32_PARAM_HQuoted 9 lines
arch/avr32/include/uapi/asm/param.h line 9
Quoted 6 lines
arch/avr32/include/uapi/asm/param.h +5
-1-#ifndef HZ +#ifndef __KERNEL__ +/* +* Technically, this is wrong, but some old apps still refer to it. +* The proper way to get the HZ value is via sysconf(_SC_CLK_TCK). +*/ With this comment, are there AVR32
drivers/usersthat should be fixed? Or is it parts of the tree in general?
Quoted 3 lines
Hi Hans,
It's copied fromarch/ia64/include/uapi/asm/param.h, I feel it should be
the same for AVR32 too.
Most likely yes, the original param.h header file was added by David Howells from RedHat, and has never been touched since.
Again, thanks for fixing.
Signature · 2 lines
mvh Hans-Christian Egtvedt