public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] numa: Mark __node_set as __always_inline
@ 2013-07-25 12:14 Tom Rini
  2013-07-25 18:08 ` KOSAKI Motohiro
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Rini @ 2013-07-25 12:14 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Jianpeng Ma, Rusty Russell, Lai Jiangshan, Yasuaki Ishimatsu,
	Wen Congyang, Jiang Liu, KOSAKI Motohiro, Minchan Kim, Mel Gorman,
	David Rientjes, Yinghai Lu, Greg KH

It is posible for some compilers to decide that __node_set does not need
to be made turned into an inline function.  When the compiler does this
on an __init function calling it on __initdata we get a section mismatch
warning now.

Reported-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Jianpeng Ma <majianpeng@gmail.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Minchan Kim <minchan.kim@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Tom Rini <trini@ti.com>
---
 include/linux/nodemask.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 4e2cbfa..10d0fd9 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -99,7 +99,7 @@ typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
 extern nodemask_t _unused_nodemask_arg_;
 
 #define node_set(node, dst) __node_set((node), &(dst))
-static inline void __node_set(int node, volatile nodemask_t *dstp)
+static __always_inline void __node_set(int node, volatile nodemask_t *dstp)
 {
 	set_bit(node, dstp->bits);
 }
-- 
1.7.9.5


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

* Re: [PATCH] numa: Mark __node_set as __always_inline
  2013-07-25 12:14 [PATCH] numa: Mark __node_set as __always_inline Tom Rini
@ 2013-07-25 18:08 ` KOSAKI Motohiro
  2013-07-25 18:50   ` Tom Rini
  0 siblings, 1 reply; 3+ messages in thread
From: KOSAKI Motohiro @ 2013-07-25 18:08 UTC (permalink / raw)
  To: Tom Rini
  Cc: linux-kernel, x86, Jianpeng Ma, Rusty Russell, Lai Jiangshan,
	Yasuaki Ishimatsu, Wen Congyang, Jiang Liu, KOSAKI Motohiro,
	Minchan Kim, Mel Gorman, David Rientjes, Yinghai Lu, Greg KH,
	kosaki.motohiro

(7/25/13 8:14 AM), Tom Rini wrote:
> It is posible for some compilers to decide that __node_set does not need
> to be made turned into an inline function.  When the compiler does this
> on an __init function calling it on __initdata we get a section mismatch
> warning now.
> 
> Reported-by: Paul Bolle <pebolle@tiscali.nl>
> Cc: Jianpeng Ma <majianpeng@gmail.com>
> Cc: Rusty Russell <rusty@rustcorp.com.au>
> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
> Cc: Wen Congyang <wency@cn.fujitsu.com>
> Cc: Jiang Liu <jiang.liu@huawei.com>
> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: Minchan Kim <minchan.kim@gmail.com>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: David Rientjes <rientjes@google.com>
> Cc: Yinghai Lu <yinghai@kernel.org>
> Cc: Greg KH <greg@kroah.com>
> Signed-off-by: Tom Rini <trini@ti.com>
> ---
>   include/linux/nodemask.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
> index 4e2cbfa..10d0fd9 100644
> --- a/include/linux/nodemask.h
> +++ b/include/linux/nodemask.h
> @@ -99,7 +99,7 @@ typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
>   extern nodemask_t _unused_nodemask_arg_;
>   
>   #define node_set(node, dst) __node_set((node), &(dst))
> -static inline void __node_set(int node, volatile nodemask_t *dstp)
> +static __always_inline void __node_set(int node, volatile nodemask_t *dstp)

The change looks ok. But, this code doesn't tell us why you changed. Please write
down proper comments here.

>   {
>   	set_bit(node, dstp->bits);
>   }
> 


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

* Re: [PATCH] numa: Mark __node_set as __always_inline
  2013-07-25 18:08 ` KOSAKI Motohiro
@ 2013-07-25 18:50   ` Tom Rini
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Rini @ 2013-07-25 18:50 UTC (permalink / raw)
  To: KOSAKI Motohiro
  Cc: linux-kernel, x86, Jianpeng Ma, Rusty Russell, Lai Jiangshan,
	Yasuaki Ishimatsu, Wen Congyang, Jiang Liu, KOSAKI Motohiro,
	Minchan Kim, Mel Gorman, David Rientjes, Yinghai Lu, Greg KH

On 07/25/2013 02:08 PM, KOSAKI Motohiro wrote:
> (7/25/13 8:14 AM), Tom Rini wrote:
>> It is posible for some compilers to decide that __node_set does not need
>> to be made turned into an inline function.  When the compiler does this
>> on an __init function calling it on __initdata we get a section mismatch
>> warning now.
>>
>> Reported-by: Paul Bolle <pebolle@tiscali.nl>
>> Cc: Jianpeng Ma <majianpeng@gmail.com>
>> Cc: Rusty Russell <rusty@rustcorp.com.au>
>> Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
>> Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
>> Cc: Wen Congyang <wency@cn.fujitsu.com>
>> Cc: Jiang Liu <jiang.liu@huawei.com>
>> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
>> Cc: Minchan Kim <minchan.kim@gmail.com>
>> Cc: Mel Gorman <mgorman@suse.de>
>> Cc: David Rientjes <rientjes@google.com>
>> Cc: Yinghai Lu <yinghai@kernel.org>
>> Cc: Greg KH <greg@kroah.com>
>> Signed-off-by: Tom Rini <trini@ti.com>
>> ---
>>   include/linux/nodemask.h |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
>> index 4e2cbfa..10d0fd9 100644
>> --- a/include/linux/nodemask.h
>> +++ b/include/linux/nodemask.h
>> @@ -99,7 +99,7 @@ typedef struct { DECLARE_BITMAP(bits, MAX_NUMNODES); } nodemask_t;
>>   extern nodemask_t _unused_nodemask_arg_;
>>   
>>   #define node_set(node, dst) __node_set((node), &(dst))
>> -static inline void __node_set(int node, volatile nodemask_t *dstp)
>> +static __always_inline void __node_set(int node, volatile nodemask_t *dstp)
> 
> The change looks ok. But, this code doesn't tell us why you changed. Please write
> down proper comments here.

Done, v2 submitted.

-- 
Tom

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

end of thread, other threads:[~2013-07-25 18:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-25 12:14 [PATCH] numa: Mark __node_set as __always_inline Tom Rini
2013-07-25 18:08 ` KOSAKI Motohiro
2013-07-25 18:50   ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox