lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1211011429240.19373@chino.kir.corp.google.com>
Date:	Thu, 1 Nov 2012 14:29:40 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	Wen Congyang <wency@...fujitsu.com>
cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linux-doc@...r.kernel.org, Rob Landley <rob@...dley.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Yasuaki Ishimatsu <isimatu.yasuaki@...fujitsu.com>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	Jiang Liu <jiang.liu@...wei.com>,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Minchan Kim <minchan.kim@...il.com>,
	Mel Gorman <mgorman@...e.de>, Yinghai Lu <yinghai@...nel.org>,
	"rusty@...tcorp.com.au" <rusty@...tcorp.com.au>
Subject: Re: [PART2 Patch] node: cleanup node_state_attr

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@...gle.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ