From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C2A2AC64EC7 for ; Tue, 28 Feb 2023 22:29:25 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX8Su-0000e7-SL; Tue, 28 Feb 2023 17:28:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pX8Ss-0000cD-RT for qemu-devel@nongnu.org; Tue, 28 Feb 2023 17:28:54 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX8Sr-0002Q6-8B for qemu-devel@nongnu.org; Tue, 28 Feb 2023 17:28:54 -0500 Received: by mail-wr1-x42e.google.com with SMTP id bx12so8201666wrb.11 for ; Tue, 28 Feb 2023 14:28:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677623331; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=e+Uoa9havPFpkGRSwJnaTYxQPKUfGPPt+Jit4IgbJQs=; b=MEN0q5agSTefijXYjNSnHP1SylbVRNaY5lzt0vpR7biI7wFbbpLeq+HmcPKOSzs6Zb CwhiuPNtzxGZexQCXDvPoZRzl4fSNRO/c+kP9yMa1H2XCOhlrNVR9xE0ESRkEraCtaDD CKCQONo1inAVc6Zfy2f9SpQ7XxI+RNZiLKxFiFzDTvQfkxYZ3swr9e8hXgfb5EZcswnX mG+0TrcC/GF922fiS8tY3gN1wqKdWWpRgcZzQBHkib35mezt9Yyez1XIN4iIfIqUL93f Rle36IyM7I5Fjs+75eyEpSunrNEAenVdKrMFwTcTT9R7A/DildlaYn1WHtJ0Re3fGCmJ gyRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677623331; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e+Uoa9havPFpkGRSwJnaTYxQPKUfGPPt+Jit4IgbJQs=; b=mIiPa5pMH02XpF0J1ywHlMs9chlqxbreP5wIZ1yAr8PlGEyQbwbWU+O3PYVRMyNl9u t281k9PHyiO/kbh4A0wrFAC0nKaioeDxH+He9sEjMBE8+zNC1kbqRYLw1WWUiw1Jv+Ux mT9fpFIqHtYfi0iMe0HmjlYPII47ZntcWmFbXKcWRXgfxKHusR6NDwPYykUqCnJxoyU1 I261qh7Z+H32OF6eGrOHYVnDflX/ErGWhGygYMTCsEFzWdb7uOnkEmsqnREUdRUwczRs F80OBTN2UUyBQsm+74Nx7E0l+jTyuKzh9K6x+mGEBiCDoeydchHUz0X3evOV2AdDlh0i KbAQ== X-Gm-Message-State: AO0yUKWk8OaSgSc73ZSRg37pIHL+AmdkhTuzn4XPYY+cSs8fYIrGcvJ6 7e572v/YPoQTLxzXh2677645Rw== X-Google-Smtp-Source: AK7set8QPI2UIObttH3MhJVbuEjyM+P6TMo2kMuKJTjD7IVQYVwBX+e0KjXAnY1au7iwmDZvgNkE+g== X-Received: by 2002:adf:cf04:0:b0:2c7:19c1:5557 with SMTP id o4-20020adfcf04000000b002c719c15557mr4027240wrj.64.1677623331614; Tue, 28 Feb 2023 14:28:51 -0800 (PST) Received: from [192.168.68.175] (166.red-88-28-30.dynamicip.rima-tde.net. [88.28.30.166]) by smtp.gmail.com with ESMTPSA id u5-20020a5d6ac5000000b002c5a1bd5280sm10696129wrw.95.2023.02.28.14.28.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Feb 2023 14:28:51 -0800 (PST) Message-ID: Date: Tue, 28 Feb 2023 23:28:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 1/4] hw/southbridge/piix: Use OBJECT_DECLARE_SIMPLE_TYPE() macro Content-Language: en-US To: Bernhard Beschow , qemu-devel@nongnu.org Cc: Eduardo Habkost , Thomas Huth , "Michael S. Tsirkin" , Richard Henderson , =?UTF-8?Q?Herv=c3=a9_Poussineau?= , Aurelien Jarno , Marcel Apfelbaum References: <20230210165754.34342-1-philmd@linaro.org> <20230210165754.34342-2-philmd@linaro.org> <6C95F114-3CC2-4258-8151-8CB678AA8DC3@gmail.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= In-Reply-To: <6C95F114-3CC2-4258-8151-8CB678AA8DC3@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.092, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 28/2/23 22:35, Bernhard Beschow wrote: > > > Am 10. Februar 2023 16:57:51 UTC schrieb "Philippe Mathieu-Daudé" : >> Manually convert to OBJECT_DECLARE_SIMPLE_TYPE() macro, >> similarly to automatic conversion from commit 8063396bf3 >> ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> include/hw/southbridge/piix.h | 8 +++----- >> 1 file changed, 3 insertions(+), 5 deletions(-) >> >> diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h >> index 0bf48e936d..a58bf13a41 100644 >> --- a/include/hw/southbridge/piix.h >> +++ b/include/hw/southbridge/piix.h >> @@ -29,7 +29,7 @@ >> #define PIIX_NUM_PIC_IRQS 16 /* i8259 * 2 */ >> #define PIIX_NUM_PIRQS 4ULL /* PIRQ[A-D] */ >> >> -struct PIIXState { >> +struct PIIX3State { >> PCIDevice dev; >> >> /* >> @@ -57,14 +57,12 @@ struct PIIXState { >> /* IO memory region for Reset Control Register (PIIX_RCR_IOPORT) */ >> MemoryRegion rcr_mem; >> }; >> -typedef struct PIIXState PIIX3State; >> >> #define TYPE_PIIX3_PCI_DEVICE "pci-piix3" >> -DECLARE_INSTANCE_CHECKER(PIIX3State, PIIX3_PCI_DEVICE, >> - TYPE_PIIX3_PCI_DEVICE) >> - >> #define TYPE_PIIX3_DEVICE "PIIX3" >> #define TYPE_PIIX3_XEN_DEVICE "PIIX3-xen" >> #define TYPE_PIIX4_PCI_DEVICE "piix4-isa" >> >> +OBJECT_DECLARE_SIMPLE_TYPE(PIIX3State, PIIX3_PCI_DEVICE) >> + >> #endif > > The PIIX consolidation series drops the "3" for reuse by PIIX4. Do we really need this? Unfortunately we do to be able to use the OBJECT_DECLARE_SIMPLE_TYPE() macro which generates the typedefs. When I get to your patches later this indeed ends as (PIIXState, PIIX_PCI_DEVICE).