Patch "scripts/kernel-doc: Do not track section counter across processed files" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scripts/kernel-doc: Do not track section counter across processed files

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scripts-kernel-doc-do-not-track-section-counter-acro.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit eae1b8edd88ef929d717ffd49f4191981ae6cf95
Author: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
Date:   Tue Oct 8 16:29:04 2024 +0800

    scripts/kernel-doc: Do not track section counter across processed files
    
    [ Upstream commit be9264110e4e874622d588a75daf930539fdf6ea ]
    
    The section counter tracks how many sections of kernel-doc were added.
    The only real use of the counter value is to check if anything was
    actually supposed to be output and give a warning is nothing is
    available.
    
    The current logic of remembering the initial value and then resetting
    the value then when processing each file means that if a file has the
    same number of sections as the previously processed one, a warning is
    incorrectly given.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
    Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
    Link: https://lore.kernel.org/r/20241008082905.4005524-1-wenst@xxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 2791f81952038..c608820f0bf51 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2322,7 +2322,6 @@ sub process_inline($$) {
 
 sub process_file($) {
     my $file;
-    my $initial_section_counter = $section_counter;
     my ($orig_file) = @_;
 
     $file = map_filename($orig_file);
@@ -2360,8 +2359,7 @@ sub process_file($) {
     }
 
     # Make sure we got something interesting.
-    if ($initial_section_counter == $section_counter && $
-        output_mode ne "none") {
+    if (!$section_counter && $output_mode ne "none") {
         if ($output_selection == OUTPUT_INCLUDE) {
             emit_warning("${file}:1", "'$_' not found\n")
                 for keys %function_table;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux