Linux Documentation
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jonathan Corbet <corbet@lwn.net>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	linux-doc@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>,  Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, Mike Rapoport <rppt@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	 Marco Elver <elver@google.com>,
	Alexander Potapenko <glider@google.com>,
	Shuah Khan <shuah@kernel.org>,  Moritz Fischer <mdf@kernel.org>,
	Wu Hao <hao.wu@intel.com>, Xu Yilun <yilun.xu@intel.com>,
	 Dipen Patel <dipenp@nvidia.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] kernel-doc: Remove deprecated kernel-doc option 'functions'
Date: Tue, 23 Jan 2024 23:17:45 +0100	[thread overview]
Message-ID: <a6adae9df117daab7457260c030cc97d8608eccb.camel@sipsolutions.net> (raw)
In-Reply-To: <87y1cfiu2y.fsf@meer.lwn.net>

On Tue, 2024-01-23 at 15:05 -0700, Jonathan Corbet wrote:
> 
> So I feel like I'm missing something; the problem with Sphinx and
> namespacing is separate from whether kernel-doc recognizes "-functions";
> I don't think that taking out this support will make the other problem
> any harder to solve.  Do you see something I'm not?

Well, I was thinking that today, in the rst files, we use

.. kernel-doc:: include/net/cfg80211.h
   :functions:
        cfg80211_rx_assoc_resp

(for example).

This clearly references the *function* cfg80211_rx_assoc_resp(), at
least it makes that intent clear.

We also had a *struct* called cfg80211_rx_assoc_resp, until we removed
it recently because of the sphinx namespacing issues.


Now if we change the reference to the function to be just

.. kernel-doc:: include/net/cfg80211.h
   :identifiers:
        cfg80211_rx_assoc_resp

then how do you know that it's actually referencing the function vs. the
struct? I mean, OK, today it can only reference the single "thing" (**)
that sphinx accepts ...  but hoping that some day the sphinx namespacing
issue will be solved, we'd need a way to actually reference the
different namespaces from the rst files, no? So it seemed to me that
just unconditionally referencing an "identifier" makes that harder, not
easier?

We have 'struct class' for example, and use

.. kernel-doc:: include/linux/device/class.h
   :identifiers: class

to refer to it. At least you know it's not a function, though if you
also had an 'enum class' you'd not be able to figure it out.


(**) Also, I think a struct or enum name isn't actually called an
identifier in C? So maybe that's a bad term regardless of the
namespacing. But I guess even if I'm right (and I'm not really sure)
then that's too late now.

johannes

      reply	other threads:[~2024-01-23 22:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 13:28 [PATCH 0/2] kernel-doc: Remove deprecated kernel-doc option 'functions' Anna-Maria Behnsen
2024-01-22 13:28 ` [PATCH 1/2] Documentation: Replace deprecated 'functions' by 'identifiers' Anna-Maria Behnsen
2024-01-22 13:28 ` [PATCH 2/2] Documentation: Remove deprecated kernel-doc option 'functions' Anna-Maria Behnsen
2024-01-23 10:46 ` [PATCH 0/2] kernel-doc: " Jiri Kosina
2024-01-23 10:53 ` Johannes Berg
2024-01-23 22:05   ` Jonathan Corbet
2024-01-23 22:17     ` Johannes Berg [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=a6adae9df117daab7457260c030cc97d8608eccb.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=airlied@gmail.com \
    --cc=anna-maria@linutronix.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=daniel@ffwll.ch \
    --cc=davem@davemloft.net \
    --cc=dipenp@nvidia.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=hao.wu@intel.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jikos@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mdf@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mripard@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tzimmermann@suse.de \
    --cc=x86@kernel.org \
    --cc=yilun.xu@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