From patchwork Mon Feb 23 19:29:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 442655 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9CFAF140134 for ; Tue, 24 Feb 2015 06:33:41 +1100 (AEDT) Received: from localhost ([::1]:45101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPyl9-0002dp-R2 for incoming@patchwork.ozlabs.org; Mon, 23 Feb 2015 14:33:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPyhm-0004im-9L for qemu-devel@nongnu.org; Mon, 23 Feb 2015 14:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPyhl-0003HX-Ew for qemu-devel@nongnu.org; Mon, 23 Feb 2015 14:30:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPyhl-0003HQ-78 for qemu-devel@nongnu.org; Mon, 23 Feb 2015 14:30:09 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1NJU7hR015427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 23 Feb 2015 14:30:07 -0500 Received: from localhost (ovpn-113-200.phx2.redhat.com [10.3.113.200]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1NJU56R023235; Mon, 23 Feb 2015 14:30:06 -0500 From: Eduardo Habkost To: Peter Maydell Date: Mon, 23 Feb 2015 16:29:13 -0300 Message-Id: <1424719754-2356-7-git-send-email-ehabkost@redhat.com> In-Reply-To: <1424719754-2356-1-git-send-email-ehabkost@redhat.com> References: <1424719754-2356-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Paolo Bonzini , qemu-devel@nongnu.org, "Michael S. Tsirkin" Subject: [Qemu-devel] [PULL 6/7] numa: Rename option parsing functions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Renaming set_numa_nodes() and numa_init_func() to parse_numa_opts() and parse_numa() makes the purpose of those functions clearer. Reviewed-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Signed-off-by: Eduardo Habkost --- include/sysemu/numa.h | 2 +- numa.c | 6 +++--- vl.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h index d25ada9..453b49a 100644 --- a/include/sysemu/numa.h +++ b/include/sysemu/numa.h @@ -16,7 +16,7 @@ typedef struct node_info { bool present; } NodeInfo; extern NodeInfo numa_info[MAX_NODES]; -void set_numa_nodes(void); +void parse_numa_opts(void); void set_numa_modes(void); void query_numa_node_mem(uint64_t node_mem[]); extern QemuOptsList qemu_numa_opts; diff --git a/numa.c b/numa.c index eb9259b..d5b95e1 100644 --- a/numa.c +++ b/numa.c @@ -123,7 +123,7 @@ static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp) max_numa_nodeid = MAX(max_numa_nodeid, nodenr + 1); } -static int numa_init_func(QemuOpts *opts, void *opaque) +static int parse_numa(QemuOpts *opts, void *opaque) { NumaOptions *object = NULL; Error *err = NULL; @@ -166,11 +166,11 @@ error: return -1; } -void set_numa_nodes(void) +void parse_numa_opts(void) { int i; - if (qemu_opts_foreach(qemu_find_opts("numa"), numa_init_func, + if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, NULL, 1) != 0) { exit(1); } diff --git a/vl.c b/vl.c index 6db7724..a71f015 100644 --- a/vl.c +++ b/vl.c @@ -4157,7 +4157,7 @@ int main(int argc, char **argv, char **envp) default_drive(default_floppy, snapshot, IF_FLOPPY, 0, FD_OPTS); default_drive(default_sdcard, snapshot, IF_SD, 0, SD_OPTS); - set_numa_nodes(); + parse_numa_opts(); if (qemu_opts_foreach(qemu_find_opts("mon"), mon_init_func, NULL, 1) != 0) { exit(1);