From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEb5y-0004Vo-NM for qemu-devel@nongnu.org; Fri, 23 Jan 2015 05:04:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEb5u-0002Rb-Ei for qemu-devel@nongnu.org; Fri, 23 Jan 2015 05:04:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEb5u-0002RE-8V for qemu-devel@nongnu.org; Fri, 23 Jan 2015 05:04:02 -0500 Date: Fri, 23 Jan 2015 11:03:54 +0100 From: Igor Mammedov Message-ID: <20150123110354.2a376d70@nial.brq.redhat.com> In-Reply-To: <20150123080303.GD26711@redhat.com> References: <1421938231-25698-1-git-send-email-imammedo@redhat.com> <1421938231-25698-2-git-send-email-imammedo@redhat.com> <20150123080303.GD26711@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 01/47] acpi: introduce AML composer aml_append() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: pbonzini@redhat.com, drjones@redhat.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, marcel.a@redhat.com On Fri, 23 Jan 2015 10:03:03 +0200 "Michael S. Tsirkin" wrote: > > +typedef enum { > > + NON_BLOCK, > > + PACKAGE, > > + EXT_PACKAGE, > > + BUFFER, > > + RES_TEMPLATE, > > +} AcpiBlockFlags; > > Please prefix values with ACPI_BUILD_ - don't pollute the > global namespace. Could we use AML_ prefix instead? > Same elsewhere: add build_ to functions, and Build to types. Same here i.e. s/acpi_/aml_/ prefix in API calls? > > This makes it clear these are not Acpi spec types, > but helpers to build Aml. > > > + > > +typedef struct AcpiAml { > > + GArray *buf; > > + uint8_t op; > > + AcpiBlockFlags block_flags; > > +} AcpiAml; > > + > > +void aml_append(AcpiAml *parent_ctx, AcpiAml child); > > + > > GArray *build_alloc_array(void); > > void build_free_array(GArray *array); > > void build_prepend_byte(GArray *array, uint8_t val); > > -- > > 1.8.3.1 >