On Mon, Mar 11, 2013 at 05:12:25PM +0800, Osier Yang wrote:
On 2013年03月11日 16:57, Hu Tao wrote:
>
>Signed-off-by: Hu Tao<hutao(a)cn.fujitsu.com>
>---
> src/nodeinfo.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
>diff --git a/src/nodeinfo.c b/src/nodeinfo.c
>index b80e389..415c2e5 100644
>--- a/src/nodeinfo.c
>+++ b/src/nodeinfo.c
>@@ -102,7 +102,6 @@ static int linuxNodeGetMemoryStats(FILE *meminfo,
> int cellNum,
> virNodeMemoryStatsPtr params,
> int *nparams);
>-static unsigned long long nodeGetCellMemory(int cell);
>
> /* Return the positive decimal contents of the given
> * DIR/cpu%u/FILE, or -1 on error. If DEFAULT_VALUE is non-negative
>@@ -1473,6 +1472,8 @@ cleanup:
> # define MASK_CPU_ISSET(mask, cpu) \
> (((mask)[((cpu) / n_bits(*(mask)))]>> ((cpu) % n_bits(*(mask))))& 1)
>
>+static unsigned long long nodeGetCellMemory(int cell);
>+
> static virBitmapPtr
> virNodeGetSiblingsList(const char *dir, int cpu_id)
> {
>@@ -1733,11 +1734,4 @@ unsigned long long nodeGetFreeMemory(virConnectPtr conn
ATTRIBUTE_UNUSED)
> _("NUMA memory information not available on this
platform"));
> return 0;
> }
>-
>-static unsigned long long nodeGetCellMemory(int cell)
>-{
>- virReportError(VIR_ERR_NO_SUPPORT, "%s",
>- _("NUMA memory information not available on this
platform"));
>- return 0;
>-}
> #endif
Duplicate with Guido's patch:
https://www.redhat.com/archives/libvir-list/2013-March/msg00406.html
Just noticed this one.
But I like this more, as it avoids the "WITH_NUMACTL".
nodGetCellMemory can be removed on the #else branch indeed as it's
only for internal use, the caller already errored out if no
WITH_NUMACTL.
So ACK.
Thanks!