All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: "John Snow" <jsnow@redhat.com>,
	qemu-devel@nongnu.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-block@nongnu.org
Subject: Re: [PATCH 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c
Date: Mon, 19 Feb 2024 19:31:31 +0100	[thread overview]
Message-ID: <7a3b6943-84dd-4007-94a1-cc959a359b7e@redhat.com> (raw)
In-Reply-To: <d2bbe138-72d8-dd66-255b-d3288157dd2d@eik.bme.hu>

On 19/02/2024 12.45, BALATON Zoltan wrote:
> On Mon, 19 Feb 2024, Thomas Huth wrote:
>> qdev.c is a mixture between IDE bus specific functions and IDE device
>> functions. Let's split it up to make it more obvious which part is
>> related to bus handling and which part is related to device handling.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>> hw/ide/ide-bus.c             | 111 +++++++++++++++++++++++++++++++++++
>> hw/ide/{qdev.c => ide-dev.c} |  87 +--------------------------
>> hw/arm/Kconfig               |   2 +
>> hw/ide/Kconfig               |  30 ++++++----
>> hw/ide/meson.build           |   3 +-
>> 5 files changed, 134 insertions(+), 99 deletions(-)
>> create mode 100644 hw/ide/ide-bus.c
>> rename hw/ide/{qdev.c => ide-dev.c} (78%)
> [...]
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index 29abe1da29..b372b819a4 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -275,6 +275,8 @@ config SBSA_REF
>>     select USB_XHCI_SYSBUS
>>     select WDT_SBSA
>>     select BOCHS_DISPLAY
>> +    select IDE_BUS
>> +    select IDE_DEV
>>
>> config SABRELITE
>>     bool
>> diff --git a/hw/ide/Kconfig b/hw/ide/Kconfig
>> index b93d6743d5..6dfc5a2129 100644
>> --- a/hw/ide/Kconfig
>> +++ b/hw/ide/Kconfig
>> @@ -1,51 +1,58 @@
>> config IDE_CORE
>>     bool
>>
>> -config IDE_QDEV
>> +config IDE_BUS
>>     bool
>>     select IDE_CORE
> 
> Maybe we can assume if something has an IDE bus it also wants to connect IDE 
> devices to it so just select IDE_DEV here and not at every place IDE_BUS is 
> selected? Or is there a place that only wants IDE_BUS?

Currently not, but I think it's conceptually much cleaner if we are explicit 
here.

  Thomas



  reply	other threads:[~2024-02-19 18:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 10:49 [PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h Thomas Huth
2024-02-19 10:49 ` [PATCH 1/7] hw/ide: Add the possibility to disable the CompactFlash device in the build Thomas Huth
2024-02-19 10:49 ` [PATCH 2/7] hw/ide: Split qdev.c into ide-bus.c and ide-dev.c Thomas Huth
2024-02-19 11:45   ` BALATON Zoltan
2024-02-19 18:31     ` Thomas Huth [this message]
2024-02-19 10:49 ` [PATCH 3/7] hw/ide: Move IDE device related definitions to ide-dev.h Thomas Huth
2024-02-19 11:32   ` Philippe Mathieu-Daudé
2024-02-19 19:17     ` Thomas Huth
2024-02-20  7:18       ` Philippe Mathieu-Daudé
2024-02-19 10:49 ` [PATCH 4/7] hw/ide: Move IDE bus related definitions to a new header ide-bus.h Thomas Huth
2024-02-19 10:49 ` [PATCH 5/7] hw/ide: Move IDE DMA related definitions to a separate header ide-dma.h Thomas Huth
2024-02-19 11:53   ` BALATON Zoltan
2024-02-19 19:49     ` Thomas Huth
2024-02-19 10:49 ` [PATCH 6/7] hw/ide: Remove the include/hw/ide.h legacy file Thomas Huth
2024-02-19 10:49 ` [PATCH 7/7] hw/ide: Stop exposing internal.h to non-IDE files Thomas Huth
2024-02-19 11:32 ` [PATCH 0/7] hw/ide: Clean up hw/ide/qdev.c and include/hw/ide/internal.h Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7a3b6943-84dd-4007-94a1-cc959a359b7e@redhat.com \
    --to=thuth@redhat.com \
    --cc=balaton@eik.bme.hu \
    --cc=jsnow@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.