From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50215) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEeGi-0002PM-CN for qemu-devel@nongnu.org; Fri, 23 Jan 2015 08:27:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEeGf-0000qE-8K for qemu-devel@nongnu.org; Fri, 23 Jan 2015 08:27:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEeGf-0000q9-1v for qemu-devel@nongnu.org; Fri, 23 Jan 2015 08:27:21 -0500 Date: Fri, 23 Jan 2015 15:26:59 +0200 From: "Michael S. Tsirkin" Message-ID: <20150123132659.GB4579@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> <20150123110354.2a376d70@nial.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150123110354.2a376d70@nial.brq.redhat.com> 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: Igor Mammedov Cc: pbonzini@redhat.com, drjones@redhat.com, claudio.fontana@huawei.com, qemu-devel@nongnu.org, marcel.a@redhat.com On Fri, Jan 23, 2015 at 11:03:54AM +0100, Igor Mammedov wrote: > 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? OK. > > > > > 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 > >