qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>
Subject: [PATCH for-5.1 0/3] Move and improve qdev API doc comments
Date: Sat, 11 Jul 2020 15:24:22 +0100	[thread overview]
Message-ID: <20200711142425.16283-1-peter.maydell@linaro.org> (raw)

This patchset adds documentation comments to qdev-core.h (and in a few
cases qdev-properties.h) to functions (but not all functions!) which
were missing them.

The prompt for this was Markus' recent welcome cleanup and correction
of the qdev realize functions to get reference count and bus parenting
handling right. Markus put doc comments for new/changed functions in
the qdev.c file. This is something where I have a fairly strong opinion:
 * the right place for doc comments for functions which expose API
   to the rest of QEMU is in the header file, not the .c file
 * we should be consistent about this, especially within a single
   header file but more generally as a project

So patch 1 moves doc comments from qdev.c to qdev-core.h (or
for a few functions qdev-properties.h) to join the doc comments
that were already in those header files. I have expanded on the
comments in some places where I thought that summaries of the
intended use case for the API was helpful.

Because I didn't want to send out a patch that was moving doc
comments around to fit my asserted preferred style and nothing else,
I have attempted to sweeten the pot a bit with patches 2 and 3, which
provide new doc comments for previously undocumented functions:
qdev_unrealize(), and also all the GPIO creation/connection APIs.

thanks
-- PMM

Peter Maydell (3):
  qdev: Move doc comments from qdev.c to qdev-core.h
  qdev: Document qdev_unrealize()
  qdev: Document GPIO related functions

 include/hw/qdev-core.h       | 267 ++++++++++++++++++++++++++++++++++-
 include/hw/qdev-properties.h |  13 ++
 hw/core/qdev.c               |  33 -----
 3 files changed, 278 insertions(+), 35 deletions(-)

-- 
2.20.1


             reply	other threads:[~2020-07-11 14:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-11 14:24 Peter Maydell [this message]
2020-07-11 14:24 ` [PATCH for-5.1 1/3] qdev: Move doc comments from qdev.c to qdev-core.h Peter Maydell
2020-07-11 14:24 ` [PATCH for-5.1 2/3] qdev: Document qdev_unrealize() Peter Maydell
2020-07-11 14:24 ` [PATCH for-5.1 3/3] qdev: Document GPIO related functions Peter Maydell
2020-07-12 22:39 ` [PATCH for-5.1 0/3] Move and improve qdev API doc comments Richard Henderson

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=20200711142425.16283-1-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=armbru@redhat.com \
    --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).