Received: from eggs.gnu.org ([2001:4830:134:3::10]:47579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zgcq5-0003EH-Sr for qemu-devel@nongnu.org; Mon, 28 Sep 2015 14:07:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zgcq2-00048p-K6 for qemu-devel@nongnu.org; Mon, 28 Sep 2015 14:07:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46471) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zgcq2-00048h-Eg for qemu-devel@nongnu.org; Mon, 28 Sep 2015 14:07:46 -0400 From: Eduardo Habkost Date: Mon, 28 Sep 2015 15:07:21 -0300 Message-Id: <1443463641-15822-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH] pc: Add a comment explaining why pc_compat_2_4() doesn't exist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Igor Mammedov , Marcel Apfelbaum , qemu-devel@nongnu.org, David Gibson pc_compat_2_4() doesn't exist, and we shouldn't create one. Add a comment explaining why the function doesn't exist and why pc_compat_*() functions are deprecated. Signed-off-by: Eduardo Habkost --- hw/i386/pc_piix.c | 7 +++++++ hw/i386/pc_q35.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3ffb05f..52fdd55 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -301,6 +301,13 @@ static void pc_init1(MachineState *machine, } } +/* Looking for a pc_compat_2_4() function? It doesn't exist. + * pc_compat_*() functions that run on machine-init time and + * change global QEMU state are deprecated. Please don't create + * one, and implement any pc-*-2.4 (and newer) compat code in + * HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options(). + */ + static void pc_compat_2_3(MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1b7d3b6..837e430 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -284,6 +284,13 @@ static void pc_q35_init(MachineState *machine) } } +/* Looking for a pc_compat_2_4() function? It doesn't exist. + * pc_compat_*() functions that run on machine-init time and + * change global QEMU state are deprecated. Please don't create + * one, and implement any pc-*-2.4 (and newer) compat code in + * HW_COMPAT_*, PC_COMPAT_*, or * pc_*_machine_options(). + */ + static void pc_compat_2_3(MachineState *machine) { PCMachineState *pcms = PC_MACHINE(machine); -- 2.1.0