From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIOI5-0008Uu-By for qemu-devel@nongnu.org; Mon, 02 Feb 2015 16:12:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIOI0-0002VC-9p for qemu-devel@nongnu.org; Mon, 02 Feb 2015 16:12:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIOI0-0002V6-1f for qemu-devel@nongnu.org; Mon, 02 Feb 2015 16:12:12 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t12LCB5x002305 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 2 Feb 2015 16:12:11 -0500 Message-ID: <54CFE82A.1040907@redhat.com> Date: Mon, 02 Feb 2015 16:12:10 -0500 From: John Snow MIME-Version: 1.0 References: <1422643333-27926-1-git-send-email-jsnow@redhat.com> <1422643333-27926-18-git-send-email-jsnow@redhat.com> <54CF5380.5080208@redhat.com> In-Reply-To: <54CF5380.5080208@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 17/19] qtest/ahci: Add a macro bootup routine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: famz@redhat.com, armbru@redhat.com, stefanha@redhat.com, mst@redhat.com On 02/02/2015 05:37 AM, Paolo Bonzini wrote: > > > On 30/01/2015 19:42, John Snow wrote: >> +/** >> + * Boot and fully enable the HBA device. >> + * @see ahci_boot, ahci_pci_enable and ahci_hba_enable. >> + */ >> +static AHCIQState *ahci_macro_bootup(void) > > Ugly name... I would just leave out this patch. > > Paolo > >> +{ >> + AHCIQState *ahci; >> + ahci = ahci_boot(); >> + >> + ahci_pci_enable(ahci); >> + ahci_hba_enable(ahci); >> + >> + return ahci; >> +} > It comes in handy later for testing migration so I don't have to do a lot of boilerplate for each instance, though it is just a convenience subroutine with no logic of its own. I like to cut down on boilerplate as much as possible to expose the logic of the test as much as possible. Have a suggestion for a better name, or are you very adamant about culling it? --js