Re: [PATCH 1/4] kernel-doc: Revert "scripts/kernel-doc: Processing -nofunc for functions only"

2019-04-08 Thread Jonathan Corbet
On Fri,  5 Apr 2019 14:44:50 -0700
Sean Christopherson  wrote:

> Now that Docbook has been deprecated in favor of Sphinx, the -nofunction
> option in kernel-doc is defunct, e.g. Sphinx doesn't currently support
> it.  Furthermore, "functions only" behavior was used by Docproc to avoid
> duplicating exported symbols, which is now handled by -export and
> -internal.
> 
> The end goal is to enable using :nofunction: in .rst files to split
> documentation of structures into separate categories.
> 
> This reverts commit 23aebb3c05f3b3fb06a68bf6b1539a05a5f8aaab.
> 
> Signed-off-by: Sean Christopherson 

It seems strange to express this as a revert - it's far from a clean
revert of the original patch.  I think it's probably better to just merge
this series into a single patch that implements the functionality you're
after.

As for the single/plural question, let's go with singular to match
--function.

Thanks,

jon


[PATCH 1/4] kernel-doc: Revert "scripts/kernel-doc: Processing -nofunc for functions only"

2019-04-05 Thread Sean Christopherson
Now that Docbook has been deprecated in favor of Sphinx, the -nofunction
option in kernel-doc is defunct, e.g. Sphinx doesn't currently support
it.  Furthermore, "functions only" behavior was used by Docproc to avoid
duplicating exported symbols, which is now handled by -export and
-internal.

The end goal is to enable using :nofunction: in .rst files to split
documentation of structures into separate categories.

This reverts commit 23aebb3c05f3b3fb06a68bf6b1539a05a5f8aaab.

Signed-off-by: Sean Christopherson 
---
 scripts/kernel-doc | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 3350e498b4ce..1b40b10794da 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1026,9 +1026,10 @@ sub output_declaration {
(($output_selection == OUTPUT_INCLUDE ||
  $output_selection == OUTPUT_EXPORTED) &&
 defined($function_table{$name})) ||
-   (($output_selection == OUTPUT_EXCLUDE ||
- $output_selection == OUTPUT_INTERNAL) &&
-!($functype eq "function" && defined($function_table{$name}
+   ($output_selection == OUTPUT_INTERNAL &&
+!($functype eq "function" && defined($function_table{$name}))) ||
+   ($output_selection == OUTPUT_EXCLUDE &&
+!defined($function_table{$name})))
 {
&$func(@_);
$section_counter++;
-- 
2.21.0