From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6bPa-0005H8-JP for qemu-devel@nongnu.org; Fri, 05 May 2017 07:28:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6bPZ-0000eB-NO for qemu-devel@nongnu.org; Fri, 05 May 2017 07:28:38 -0400 Date: Fri, 5 May 2017 13:28:26 +0200 From: Igor Mammedov Message-ID: <20170505132826.29aa8377@nial.brq.redhat.com> In-Reply-To: <20170504114018.zpqvohjxu23bhar7@kamzik.brq.redhat.com> References: <1493816238-33120-1-git-send-email-imammedo@redhat.com> <1493816238-33120-11-git-send-email-imammedo@redhat.com> <20170504114018.zpqvohjxu23bhar7@kamzik.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 10/24] numa: mirror cpu to node mapping in MachineState::possible_cpus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Jones Cc: qemu-devel@nongnu.org, Eduardo Habkost , Peter Maydell , David Gibson , Eric Blake , Paolo Bonzini , Shannon Zhao , qemu-arm@nongnu.org, qemu-ppc@nongnu.org On Thu, 4 May 2017 13:40:18 +0200 Andrew Jones wrote: [...] > > +void machine_set_cpu_numa_node(MachineState *machine, > > + CpuInstanceProperties *props, Error **errp) > > +{ [...] > > + } > > + > > + /* skip slots with explicit mismatch */ > > + if (props->has_thread_id && props->thread_id != slot->props.thread_id) { > > + continue; > > + } > > + > > + if (props->has_core_id && props->core_id != slot->props.core_id) { > > + continue; > > + } > > + > > + if (props->has_socket_id && props->socket_id != slot->props.socket_id) { > > + continue; > > + } > > nit: above 3 if-conditions could be condensed into 1 compound condition this reduces number of lines but result is a bit ugly due to 80chr/line limit: /* skip slots with explicit mismatch */ if ((props->has_thread_id && props->thread_id != slot->props.thread_id) || (props->has_core_id && props->core_id != slot->props.core_id) || (props->has_socket_id && props->socket_id != slot->props.socket_id) ) { continue; } do you still want the change?