linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] AVR32: fix building warnings caused by redifinitions of HZ
@ 2013-04-06 16:43 Jiang Liu
  2013-04-07  7:55 ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 4+ messages in thread
From: Jiang Liu @ 2013-04-06 16:43 UTC (permalink / raw)
  Cc: Jiang Liu, Haavard Skinnemoen, Hans-Christian Egtvedt,
	linux-kernel

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

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: linux-kernel@vger.kernel.org
---
 arch/avr32/include/uapi/asm/param.h |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h
index d28aa5e..abda103 100644
--- a/arch/avr32/include/uapi/asm/param.h
+++ b/arch/avr32/include/uapi/asm/param.h
@@ -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
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] AVR32: fix building warnings caused by redifinitions of HZ
  2013-04-06 16:43 [PATCH] AVR32: fix building warnings caused by redifinitions of HZ Jiang Liu
@ 2013-04-07  7:55 ` Hans-Christian Egtvedt
  2013-04-07 15:29   ` Jiang Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Hans-Christian Egtvedt @ 2013-04-07  7:55 UTC (permalink / raw)
  To: Jiang Liu; +Cc: Jiang Liu, Haavard Skinnemoen, linux-kernel

Around Sun 07 Apr 2013 00:43:36 +0800 or thereabout, Jiang Liu wrote:
> 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

Thanks for fixing.

> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> Cc: linux-kernel@vger.kernel.org

Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>

> ---
>  arch/avr32/include/uapi/asm/param.h |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h
> index d28aa5e..abda103 100644
> --- a/arch/avr32/include/uapi/asm/param.h
> +++ b/arch/avr32/include/uapi/asm/param.h
> @@ -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?

>  # define HZ		100
>  #endif
>  
-- 
mvh
Hans-Christian Egtvedt

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AVR32: fix building warnings caused by redifinitions of HZ
  2013-04-07  7:55 ` Hans-Christian Egtvedt
@ 2013-04-07 15:29   ` Jiang Liu
  2013-04-08  6:55     ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 4+ messages in thread
From: Jiang Liu @ 2013-04-07 15:29 UTC (permalink / raw)
  To: Hans-Christian Egtvedt; +Cc: Jiang Liu, Haavard Skinnemoen, linux-kernel

On 04/07/2013 03:55 PM, Hans-Christian Egtvedt wrote:
> Around Sun 07 Apr 2013 00:43:36 +0800 or thereabout, Jiang Liu wrote:
>> 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
> 
> Thanks for fixing.
> 
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
>> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
>> Cc: linux-kernel@vger.kernel.org
> 
> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
> 
>> ---
>>  arch/avr32/include/uapi/asm/param.h |    6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h
>> index d28aa5e..abda103 100644
>> --- a/arch/avr32/include/uapi/asm/param.h
>> +++ b/arch/avr32/include/uapi/asm/param.h
>> @@ -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?
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
> 
>>  # define HZ		100
>>  #endif
>>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] AVR32: fix building warnings caused by redifinitions of HZ
  2013-04-07 15:29   ` Jiang Liu
@ 2013-04-08  6:55     ` Hans-Christian Egtvedt
  0 siblings, 0 replies; 4+ messages in thread
From: Hans-Christian Egtvedt @ 2013-04-08  6:55 UTC (permalink / raw)
  To: Jiang Liu; +Cc: Jiang Liu, Haavard Skinnemoen, linux-kernel

Around Sun 07 Apr 2013 23:29:17 +0800 or thereabout, Jiang Liu wrote:
> On 04/07/2013 03:55 PM, Hans-Christian Egtvedt wrote:
>> Around Sun 07 Apr 2013 00:43:36 +0800 or thereabout, Jiang Liu wrote:
>>> Fix building warnings caused by redifinitions of HZ:

<snipp warning>

>> Thanks for fixing.
>> 
>>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>>> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
>>> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
>>> Cc: linux-kernel@vger.kernel.org
>> 
>> Acked-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
>> 
>>> ---
>>>  arch/avr32/include/uapi/asm/param.h |    6 +++++-
>>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h
>>> index d28aa5e..abda103 100644
>>> --- a/arch/avr32/include/uapi/asm/param.h
>>> +++ b/arch/avr32/include/uapi/asm/param.h
>>> @@ -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?
> Hi Hans,
> 	It's copied from arch/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.

-- 
mvh
Hans-Christian Egtvedt

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-08  6:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-06 16:43 [PATCH] AVR32: fix building warnings caused by redifinitions of HZ Jiang Liu
2013-04-07  7:55 ` Hans-Christian Egtvedt
2013-04-07 15:29   ` Jiang Liu
2013-04-08  6:55     ` Hans-Christian Egtvedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).