Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1220376

[PATCH 6/6] scripts/kernel-doc: Processing -nofunc for functions only

From Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
Newsgroups linux.kernel
Subject [PATCH 6/6] scripts/kernel-doc: Processing -nofunc for functions only
Date 2015-09-07 22:10 +0200
Message-ID <q6aTN-7n0-45@gated-at.bofh.it> (permalink)
References <q6aTL-7n0-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 d6129e7..a01b20ea 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1836,7 +1836,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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/6] scripts/kernel-doc: Kernel-doc improvements Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
  [PATCH 2/6] scripts/kernel-doc: Adding infrastructure for markdown support Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
  [PATCH 5/6] scripts/kernel-doc: Improve Markdown results Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
  [PATCH 3/6] drm/doc: Convert to markdown Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
  [PATCH 1/6] scripts/kernel-doc: Replacing highlights hash by an array Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
    Re: [PATCH 1/6] scripts/kernel-doc: Replacing highlights hash by an  array Jonathan Corbet <corbet@lwn.net> - 2015-09-13 22:40 +0200
      Re: [PATCH 1/6] scripts/kernel-doc: Replacing highlights hash by an  array Lukas Wunner <lukas@wunner.de> - 2015-09-13 23:30 +0200
  [PATCH 6/6] scripts/kernel-doc: Processing -nofunc for functions only Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
  [PATCH 4/6] drm/doc: Fixing xml documentation warning Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-07 22:10 +0200
  Re: [PATCH 0/6] scripts/kernel-doc: Kernel-doc improvements Jonathan Corbet <corbet@lwn.net> - 2015-09-12 23:30 +0200
    Re: [PATCH 0/6] scripts/kernel-doc: Kernel-doc improvements Daniel Vetter <daniel@ffwll.ch> - 2015-09-13 12:40 +0200
      Re: [PATCH 0/6] scripts/kernel-doc: Kernel-doc improvements Jonathan Corbet <corbet@lwn.net> - 2015-09-13 21:20 +0200
        Re: [PATCH 0/6] scripts/kernel-doc: Kernel-doc improvements Daniel Vetter <daniel@ffwll.ch> - 2015-09-13 23:00 +0200
          Re: [PATCH 0/6] scripts/kernel-doc: Kernel-doc improvements Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk> - 2015-09-14 14:20 +0200

csiph-web