All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	Igor Mammedov <imammedo@redhat.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	John Snow <jsnow@redhat.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	Shiju Jose <shiju.jose@huawei.com>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 0/1] Sync kernel-doc.py with Linux upstream
Date: Tue, 13 Jan 2026 12:08:48 +0000	[thread overview]
Message-ID: <aWY10BYoJjck3xX8@redhat.com> (raw)
In-Reply-To: <CAFEAcA_TMuZG8VJMs2JZ49Xq+wVxcq_7UGOMF+2FUe0k7AUgwA@mail.gmail.com>

On Tue, Jan 13, 2026 at 11:44:51AM +0000, Peter Maydell wrote:
> On Tue, 6 Jan 2026 at 16:38, Mauro Carvalho Chehab
> <mchehab+huawei@kernel.org> wrote:
> >
> > Hi Peter/John,
> >
> > There were several updates at kernel-doc upstream fixing bugs,
> > doing cleanups and a couple of improvements.
> >
> > Better to keep QEMU in sync with such changes.
> >
> > Worth mentioning that we did some changes on Linux at the
> > kernel-doc.py script itself, to avoid Kernel build to crash
> > with too old Python versions, as there docs build is a
> > separate target, and python >= 3.6 is a new requirement
> > there.
> >
> > On kernel, if python < 3.6, it will simply ignore docs
> > build (emitting a warning).
> >
> > I opted to not backport such changes, but if you prefer
> > doing that, I can do that on a v2.
> > ---
> >
> > For now, I opted to keep kernel-doc libraries at the same
> > directory as before - e.g. at scripts/lib/kdoc. On Linux,
> > we ended moving it to tools/lib/python/kdoc. It could make
> > sense to move it on QEMU too, as it makes a little bit
> > easier to keep things in sync.
> >
> > What do you think?
> 
> Hi; thanks for doing this backport. I checked that the output
> with this patch applied is still the same as with the old
> kernel-doc, and eyeballed the diffs between our kernel-doc
> and the Linux version, to confirm that we have kept our two
> minor QEMU-specific modifications and haven't missed anything
> from Linux's version that we ought to have. So:
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 
> On your two questions:
> 
> (1) As Dan says, QEMU already enforces a new enough
> Python version, so we don't need to handle 3.6. I think
> the main thing driving a choice to backport or not those
> changes would be simply keeping in sync with Linux's
> version of the script so we don't diverge. We want to
> make future re-syncing of the script as easy as possible.
> 
> (2) Regarding the location of the kernel-doc libraries:
> we seem to have two things here, possibly in tension:
>  - we don't want to gratuitously diverge from Linux
>  - QEMU's directory hierarchy is not the kernel's
> 
> In particular, I'm not sure tools/ is where we would
> naturally put python libraries used during the build
> process. Maybe that would be python/ for us, but I defer
> to John or another Python expert on that.

I tend to see the 'python' directory as being for stuff we formally
maintain as a python API for use by multiple internal consumers.

This is just a bunch of helper files exclusively for use by the kernel-doc
tool, and so the scripts/ directory is a decent fit for it, given that this
dir is for a collection of arbitary supporting tools & scripts.

As precedent, see the tracetool, which keeps all its helpers under
scripts/tracetool too.

TL;DR: I would not want to see a new top level tools/ directory
created, and don't think it fits in python/ either; scripts/ is
a fine home.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2026-01-13 12:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 16:38 [PATCH 0/1] Sync kernel-doc.py with Linux upstream Mauro Carvalho Chehab
2026-01-06 16:38 ` [PATCH 1/1] kernel-doc.py: sync with upstream Kernel v6.19-rc4 Mauro Carvalho Chehab
2026-01-20 12:55   ` Michael S. Tsirkin
2026-01-06 16:51 ` [PATCH 0/1] Sync kernel-doc.py with Linux upstream Daniel P. Berrangé
2026-01-13 11:44 ` Peter Maydell
2026-01-13 12:08   ` Daniel P. Berrangé [this message]
2026-01-13 13:04     ` Peter Maydell
2026-01-13 13:20       ` Daniel P. Berrangé
2026-01-13 19:52     ` John Snow
2026-01-13 20:04       ` Mauro Carvalho Chehab

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=aWY10BYoJjck3xX8@redhat.com \
    --to=berrange@redhat.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=imammedo@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=mchehab+huawei@kernel.org \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shiju.jose@huawei.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 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.