qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Cédric Le Goater" <clg@redhat.com>
Cc: "Zhenzhong Duan" <zhenzhong.duan@intel.com>,
	qemu-devel@nongnu.org, alex.williamson@redhat.com,
	eric.auger@redhat.com, chao.p.peng@intel.com,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v3] vfio: Introduce helper vfio_pci_from_vfio_device()
Date: Fri, 1 Aug 2025 16:56:58 +0100	[thread overview]
Message-ID: <CAFEAcA9uc7PFvD8e=+WS-1WSAsqoZR5BRSPDjNeYsHU=TUcrhQ@mail.gmail.com> (raw)
In-Reply-To: <ed8451bd-853a-429e-987c-4ec86e01efe9@redhat.com>

On Fri, 1 Aug 2025 at 16:47, Cédric Le Goater <clg@redhat.com> wrote:
> I have modified your patch with :
>
> +/**
> +  * vfio_pci_from_vfio_device: Transform from VFIODevice to
> +  * VFIOPCIDevice
> +  *
> +  * This function checks if the given @vbasedev is a VFIO PCI device.
> +  * If it is, it returns the containing VFIOPCIDevice.
> +  *
> +  * @vbasedev: The VFIODevice to transform
> +  *
> +  * Return: The VFIOPCIDevice on success, NULL on failure.
> +  */
>
> See https://github.com/legoater/qemu/tree/vfio-10.2.
>
> I don't think it's really necessary, as these are internal APIs and
> none are documented, but Philippe seems keen on it. I guess he plans
> to volunteer to document the rest ;)

This is one of those cases where we have a rule in place
that we apply on code review for newly added prototypes
in header files, as an exercise in trying to at least not
make an existing problem worse :-)

I think Philippe's intent was just to say "put that one
line comment by the prototype in the .h file rather than
by the implementation in the .c file", rather than to
require a full-on doc-comment format comment, though
I do appreciate having one.

thanks
-- PMM


  reply	other threads:[~2025-08-01 17:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-01  2:35 [PATCH v3] vfio: Introduce helper vfio_pci_from_vfio_device() Zhenzhong Duan
2025-08-01  5:42 ` Cédric Le Goater
2025-08-01 15:05   ` Cédric Le Goater
2025-08-01 15:56     ` Peter Maydell [this message]
2025-08-01 16:33       ` Cédric Le Goater
2025-08-04  2:22     ` Duan, Zhenzhong
2025-08-01 14:14 ` Philippe Mathieu-Daudé
2025-08-04  2:27   ` Duan, Zhenzhong

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='CAFEAcA9uc7PFvD8e=+WS-1WSAsqoZR5BRSPDjNeYsHU=TUcrhQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=chao.p.peng@intel.com \
    --cc=clg@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhenzhong.duan@intel.com \
    /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).