[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c81
From: |
Peter Maydell |
Subject: |
Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions |
Date: |
Thu, 6 Sep 2018 15:50:56 +0100 |
On 6 September 2018 at 13:02, Thomas Huth <address@hidden> wrote:
> I somehow fail to see that something outside of lsi53c895a.c should
> really need to access the internals of LSIState. If there is something
> that needs to be configured from the outside, it should be done via QOM
> properties instead, shouldn't it? So I think I'd rather prefer if you
> could do it the other way round and change the lsi*_create() functions
> to return a pointer to PCIDevice instead, if possible.
Nothing typically does, but the "modern" style of having QOM objects which
use other QOM objects do so by embedding the child object's struct into
the struct of the parent requires that the struct definition is available.
The only thing of it that is used is (effectively) its size and alignment
requirements.
(I had an RFC patch some years back that would allow you to mark
up the fields of the struct as private, so the struct could be
put in the header but the compiler would complain if you tried
to actually access any of its fields:
http://lists.gnu.org/archive/html/qemu-devel/2014-05/msg01846.html )
thanks
-- PMM
- [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/06
- [Qemu-ppc] [PATCH 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/06
- [Qemu-ppc] [PATCH 2/3] scsi: move lsi53c895a_create() and lsi53c810_create() callers to pci_create_simple(), Mark Cave-Ayland, 2018/09/06
- [Qemu-ppc] [PATCH 1/3] scsi: move lsi53c895a structures and defines into separate lsi53c895a.h file, Mark Cave-Ayland, 2018/09/06
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Thomas Huth, 2018/09/06
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions,
Peter Maydell <=
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Thomas Huth, 2018/09/06
- Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Peter Maydell, 2018/09/06
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/06
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Thomas Huth, 2018/09/07
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions, Mark Cave-Ayland, 2018/09/07