Re: [PART2 Patch] node: cleanup node_state_attr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 1 Nov 2012, Wen Congyang wrote:

> >> diff --git a/drivers/base/node.c b/drivers/base/node.c
> >> index af1a177..5d7731e 100644
> >> --- a/drivers/base/node.c
> >> +++ b/drivers/base/node.c
> >> @@ -614,23 +614,23 @@ static ssize_t show_node_state(struct device *dev,
> >>  	{ __ATTR(name, 0444, show_node_state, NULL), state }
> >>  
> >>  static struct node_attr node_state_attr[] = {
> >> -	_NODE_ATTR(possible, N_POSSIBLE),
> >> -	_NODE_ATTR(online, N_ONLINE),
> >> -	_NODE_ATTR(has_normal_memory, N_NORMAL_MEMORY),
> >> -	_NODE_ATTR(has_cpu, N_CPU),
> >> +	[N_POSSIBLE] = _NODE_ATTR(possible, N_POSSIBLE),
> >> +	[N_ONLINE] = _NODE_ATTR(online, N_ONLINE),
> >> +	[N_NORMAL_MEMORY] = _NODE_ATTR(has_normal_memory, N_NORMAL_MEMORY),
> >>  #ifdef CONFIG_HIGHMEM
> >> -	_NODE_ATTR(has_high_memory, N_HIGH_MEMORY),
> >> +	[N_HIGH_MEMORY] = _NODE_ATTR(has_high_memory, N_HIGH_MEMORY),
> >>  #endif
> >> +	[N_CPU] = _NODE_ATTR(has_cpu, N_CPU),
> >>  };
> >>  
> > 
> > Why change the index for N_CPU?
> 
> N_CPU > N_HIGH_MEMORY
> 
> We use this array to create attr file in sysfs. So changing the index for N_CPU
> doesn't cause any other problem.
> 

Acked-by: David Rientjes <rientjes@xxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]