mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scripts/kernel-doc: Processing -nofunc for functions only
@ 2015-09-01 17:44 Danilo Cesar Lemes de Paula
  2015-09-11 19:26 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Danilo Cesar Lemes de Paula @ 2015-09-01 17:44 UTC (permalink / raw)
  To: dri-devel
  Cc: Danilo Cesar Lemes de Paula, Daniel Vetter, Jonathan Corbet,
	Andrew Morton, Johannes Berg, linux-kernel, linux-doc, intel-gfx

Docproc process EXPORT_SYMBOL(f1) macro and uses -nofunc f1 to
avoid duplicated documentation in the next call.
It works for most of the cases, but there are some specific situations
where a struct has the same name of an already-exported function.

Current kernel-doc behavior ignores those structs and do not add them
to the final documentation. This patch fixes it.

This is non-usual and the only case I've found is the drm_modeset_lock
(function and struct) defined in drm_modeset_lock.h and
drm_modeset_lock.c. Considering this, it should only affect the DRM
documentation by including struct drm_modeset_lock to the final Docbook.

Signed-off-by: Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Johannes Berg <johannes.berg@intel.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
---
 scripts/kernel-doc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 12a106c..047deb7 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1827,7 +1827,7 @@ sub output_declaration {
     my $func = "output_${functype}_$output_mode";
     if (($function_only==0) ||
 	( $function_only == 1 && defined($function_table{$name})) ||
-	( $function_only == 2 && !defined($function_table{$name})))
+	( $function_only == 2 && !($functype eq "function" && defined($function_table{$name}))))
     {
 	&$func(@_);
 	$section_counter++;
-- 
2.4.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts/kernel-doc: Processing -nofunc for functions only
  2015-09-01 17:44 [PATCH] scripts/kernel-doc: Processing -nofunc for functions only Danilo Cesar Lemes de Paula
@ 2015-09-11 19:26 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2015-09-11 19:26 UTC (permalink / raw)
  To: Danilo Cesar Lemes de Paula
  Cc: dri-devel, Daniel Vetter, Andrew Morton, Johannes Berg,
	linux-kernel, linux-doc, intel-gfx

On Tue,  1 Sep 2015 14:44:14 -0300
Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> wrote:

> Docproc process EXPORT_SYMBOL(f1) macro and uses -nofunc f1 to
> avoid duplicated documentation in the next call.
> It works for most of the cases, but there are some specific situations
> where a struct has the same name of an already-exported function.
> 
> Current kernel-doc behavior ignores those structs and do not add them
> to the final documentation. This patch fixes it.
> 
> This is non-usual and the only case I've found is the drm_modeset_lock
> (function and struct) defined in drm_modeset_lock.h and
> drm_modeset_lock.c. Considering this, it should only affect the DRM
> documentation by including struct drm_modeset_lock to the final Docbook.

I've verified that it indeed affects nothing else; it's in the docs tree
now, thanks.

jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-11 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 17:44 [PATCH] scripts/kernel-doc: Processing -nofunc for functions only Danilo Cesar Lemes de Paula
2015-09-11 19:26 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®