From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
Markus Armbruster <armbru@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PULL 00/84] QOM patches for 2020-06-15
Date: Mon, 29 Jun 2020 09:25:09 +0200 [thread overview]
Message-ID: <2541e062-d3c5-fdfd-eeaf-4072ac178b08@redhat.com> (raw)
In-Reply-To: <CAFEAcA_fV4nf8paMXvfo-b+73oZTcEQHtyXV1u2gc9qbrEYc6g@mail.gmail.com>
On 6/27/20 5:11 PM, Peter Maydell wrote:
> On Sat, 27 Jun 2020 at 12:53, Markus Armbruster <armbru@redhat.com> wrote:
>> Peter Maydell <peter.maydell@linaro.org> writes:
>>> Hi. I've just noticed that this commit added new global-scope
>>> functions to header files without documentation comments, eg
>>>
>>> bool qdev_realize_and_unref(DeviceState *dev, BusState *bus, Error **errp);
>>
>> They actually have doc comments: next to their definition, just like the
>> functions they replace.
>
>>> Please could you provide some follow-up patches that document them?
>>> I don't think we have any hope of getting people to follow whatever
>>> the correct new way to create/configure/realize devices is if we
>>> don't document it :-( [Concrete example: I now have no idea
>>> how this is supposed to work after this patchset.]
>>
>> Please check out my function comments, and if they leave you confused,
>> let's talk about improvements.
>
> I will have a look at them, but we should move them (wholesale
> with other documentation comments for qdev) to the header files.
> (That we are having this discussion at all demonstrates why -- people
> don't look in the C files for API documentation of functions.)
> The headers are where the API that faces the rest of QEMU should
> be documented; comments in the C files are for people who care
> about the internals of the implementation. "New prototype in a header
> file should have a doc comment" is a standard part of my code review
> I apply to any code which I see going past. We absolutely have not
> been good about documenting our facing-the-rest-of-QEMU functions
> in the past but this is an area where I think we should be raising the bar.
>
>> I'm content to use comment placement / formatting I dislike to make my
>> code blend in, but I'm not willing to do conversion work from a style I
>> like to style I dislike. That's a job for someone who won't feel icky
>> afterwards :)
>
> Fair enough. I'm happy to write some patches to consistently put
> all the qdev doc info into the headers.
As a start I can respin
https://www.mail-archive.com/qemu-devel@nongnu.org/msg593422.html if you
want.
prev parent reply other threads:[~2020-06-29 7:26 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-15 20:38 [PULL 00/84] QOM patches for 2020-06-15 Markus Armbruster
2020-06-15 20:38 ` [PULL 01/84] qom: Constify object_get_canonical_path{, _component}()'s parameter Markus Armbruster
2020-06-15 20:38 ` [PULL 02/84] qom: Make "info qom-tree" show children sorted Markus Armbruster
2020-06-15 20:38 ` [PULL 03/84] arm/stm32f405: Fix realization of "stm32f2xx-adc" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 04/84] display/xlnx_dp: Fix to realize "i2c-ddc" and "aux-to-i2c-bridge" Markus Armbruster
2020-06-15 20:38 ` [PULL 05/84] sd/pxa2xx_mmci: Fix to realize "pxa2xx-mmci" device Markus Armbruster
2020-06-15 20:38 ` [PULL 06/84] arm/aspeed: Compute the number of CPUs from the SoC definition Markus Armbruster
2020-06-15 20:38 ` [PULL 07/84] arm/aspeed: Rework NIC attachment Markus Armbruster
2020-06-15 20:38 ` [PULL 08/84] armv7m: Delete unused "ARM,bitband-memory" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 09/84] auxbus: Fix aux-to-i2c-bridge to be a subtype of aux-slave Markus Armbruster
2020-06-15 20:38 ` [PULL 10/84] mac_via: Fix to realize "mos6522-q800-via*" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 11/84] macio: Fix to realize "mos6522-cuda" and "mos6522-pmu" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 12/84] macio: Delete unused "macio-gpio" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 13/84] pnv/phb4: Delete unused "pnv-phb4-pec-stack" devices Markus Armbruster
2020-06-15 20:38 ` [PULL 14/84] MAINTAINERS: Make section PowerNV cover pci-host/pnv* as well Markus Armbruster
2020-06-15 20:38 ` [PULL 15/84] ppc4xx: Drop redundant device realization Markus Armbruster
2020-06-15 20:39 ` [PULL 16/84] macio: Put "macio-nvram" device on the macio bus Markus Armbruster
2020-06-15 20:58 ` BALATON Zoltan
2020-06-16 6:48 ` Philippe Mathieu-Daudé
2020-06-15 20:39 ` [PULL 17/84] macio: Fix macio-bus to be a subtype of System bus Markus Armbruster
2020-06-15 20:39 ` [PULL 18/84] ppc/pnv: Put "*-pnv-chip" and "pnv-xive" on the main system bus Markus Armbruster
2020-06-15 20:39 ` [PULL 19/84] pnv/psi: Correct the pnv-psi* devices not to be sysbus devices Markus Armbruster
2020-06-15 20:39 ` [PULL 20/84] display/sm501 display/ati: Fix to realize "i2c-ddc" Markus Armbruster
2020-06-15 20:39 ` [PULL 21/84] riscv: Fix to put "riscv.hart_array" devices on sysbus Markus Armbruster
2020-06-15 20:39 ` [PULL 22/84] riscv: Fix type of SiFive[EU]SocState, member parent_obj Markus Armbruster
2020-06-15 20:39 ` [PULL 23/84] sparc/leon3: Fix to put grlib,* devices on sysbus Markus Armbruster
2020-06-15 20:39 ` [PULL 24/84] qdev: Assert devices are plugged into a bus that can take them Markus Armbruster
2020-06-15 20:39 ` [PULL 25/84] sd: Hide the qdev-but-not-quite thing created by sd_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 26/84] qdev: Assert onboard devices all get realized properly Markus Armbruster
2020-06-15 20:39 ` [PULL 27/84] qdev: Rename qbus_realize() to qbus_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 28/84] Revert "hw/prep: realize the PCI root bus as part of the prep init" Markus Armbruster
2020-06-15 20:39 ` [PULL 29/84] Revert "hw/versatile: realize the PCI root bus as part of the versatile init" Markus Armbruster
2020-06-15 20:39 ` [PULL 30/84] qdev: New qdev_new(), qdev_realize(), etc Markus Armbruster
2020-06-15 20:39 ` [PULL 31/84] qdev: Put qdev_new() to use with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 32/84] qdev: Convert to qbus_realize(), qbus_unrealize() Markus Armbruster
2020-06-15 20:39 ` [PULL 33/84] qdev: Convert to qdev_unrealize() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 34/84] qdev: Convert to qdev_unrealize() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 35/84] qdev: Convert uses of qdev_create() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 36/84] qdev: Convert uses of qdev_create() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 37/84] qdev: Convert uses of qdev_set_parent_bus() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 38/84] qdev: Convert uses of qdev_set_parent_bus() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 39/84] pci: New pci_new(), pci_realize_and_unref() etc Markus Armbruster
2020-06-15 20:39 ` [PULL 40/84] hw/ppc: Eliminate two superfluous QOM casts Markus Armbruster
2020-06-15 20:39 ` [PULL 41/84] pci: Convert uses of pci_create() etc. with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 42/84] pci: Convert uses of pci_create() etc. manually Markus Armbruster
2020-06-15 20:39 ` [PULL 43/84] pci: pci_create(), pci_create_multifunction() are now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 44/84] isa: New isa_new(), isa_realize_and_unref() etc Markus Armbruster
2020-06-15 20:39 ` [PULL 45/84] isa: Convert uses of isa_create() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 46/84] isa: Convert uses of isa_create(), isa_try_create() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 47/84] isa: isa_create(), isa_try_create() are now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 48/84] ssi: ssi_auto_connect_slaves() never does anything, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 49/84] ssi: Convert uses of ssi_create_slave_no_init() with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 50/84] ssi: Convert last use of ssi_create_slave_no_init() manually Markus Armbruster
2020-06-15 20:39 ` [PULL 51/84] ssi: ssi_create_slave_no_init() is now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 52/84] usb: New usb_new(), usb_realize_and_unref() Markus Armbruster
2020-06-15 20:39 ` [PULL 53/84] usb: Convert uses of usb_create() Markus Armbruster
2020-06-15 20:39 ` [PULL 54/84] usb: usb_create() is now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 55/84] usb: Eliminate usb_try_create_simple() Markus Armbruster
2020-06-15 20:39 ` [PULL 56/84] qdev: qdev_create(), qdev_try_create() are now unused, drop Markus Armbruster
2020-06-15 20:39 ` [PULL 57/84] auxbus: Rename aux_init_bus() to aux_bus_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 58/84] auxbus: New aux_bus_realize(), pairing with aux_bus_init() Markus Armbruster
2020-06-15 20:39 ` [PULL 59/84] auxbus: Convert a use of qdev_set_parent_bus() Markus Armbruster
2020-06-15 20:39 ` [PULL 60/84] auxbus: Eliminate aux_create_slave() Markus Armbruster
2020-06-15 20:39 ` [PULL 61/84] qom: Tidy up a few object_initialize_child() calls Markus Armbruster
2020-06-15 20:39 ` [PULL 62/84] qom: Less verbose object_initialize_child() Markus Armbruster
2020-06-15 20:39 ` [PULL 63/84] macio: Convert use of qdev_set_parent_bus() Markus Armbruster
2020-06-15 20:39 ` [PULL 64/84] macio: Eliminate macio_init_child_obj() Markus Armbruster
2020-06-15 20:39 ` [PULL 65/84] sysbus: Drop useless OBJECT() in sysbus_init_child_obj() calls Markus Armbruster
2020-06-15 20:39 ` [PULL 66/84] microbit: Tidy up sysbus_init_child_obj() @child argument Markus Armbruster
2020-06-15 20:39 ` [PULL 67/84] sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 1 Markus Armbruster
2020-06-15 20:39 ` [PULL 68/84] hw/arm/armsse: Pass correct child size to sysbus_init_child_obj() Markus Armbruster
2020-06-15 20:39 ` [PULL 69/84] sysbus: Tidy up sysbus_init_child_obj()'s @childsize arg, part 2 Markus Armbruster
2020-06-15 20:39 ` [PULL 70/84] sysbus: New sysbus_realize(), sysbus_realize_and_unref() Markus Armbruster
2020-06-15 20:39 ` [PULL 71/84] sysbus: Convert to sysbus_realize() etc. with Coccinelle Markus Armbruster
2020-06-15 20:39 ` [PULL 72/84] qdev: Drop qdev_realize() support for null bus Markus Armbruster
2020-06-15 20:39 ` [PULL 73/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 1 Markus Armbruster
2020-06-15 20:39 ` [PULL 74/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 2 Markus Armbruster
2020-06-15 20:39 ` [PULL 75/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 3 Markus Armbruster
2020-06-15 20:40 ` [PULL 76/84] sysbus: Convert qdev_set_parent_bus() use with Coccinelle, part 4 Markus Armbruster
2020-06-15 20:40 ` [PULL 77/84] sysbus: sysbus_init_child_obj() is now unused, drop Markus Armbruster
2020-06-15 20:40 ` [PULL 78/84] microbit: Eliminate two local variables in microbit_init() Markus Armbruster
2020-06-15 20:40 ` [PULL 79/84] s390x/event-facility: Simplify creation of SCLP event devices Markus Armbruster
2020-06-15 20:40 ` [PULL 80/84] qdev: Make qdev_realize() support bus-less devices Markus Armbruster
2020-06-15 20:40 ` [PULL 81/84] qdev: Use qdev_realize() in qdev_device_add() Markus Armbruster
2020-06-15 20:40 ` [PULL 82/84] qdev: Convert bus-less devices to qdev_realize() with Coccinelle Markus Armbruster
2020-06-15 20:40 ` [PULL 83/84] qdev: qdev_init_nofail() is now unused, drop Markus Armbruster
2020-06-15 20:40 ` [PULL 84/84] MAINTAINERS: Make section QOM cover hw/core/*bus.c as well Markus Armbruster
2020-06-16 12:26 ` [PULL 00/84] QOM patches for 2020-06-15 Peter Maydell
2020-06-16 15:26 ` Thomas Huth
2020-06-17 3:30 ` Philippe Mathieu-Daudé
2020-06-26 18:28 ` Peter Maydell
2020-06-27 11:53 ` Markus Armbruster
2020-06-27 15:11 ` Peter Maydell
2020-06-29 7:25 ` Philippe Mathieu-Daudé [this message]
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=2541e062-d3c5-fdfd-eeaf-4072ac178b08@redhat.com \
--to=philmd@redhat.com \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).