mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info
@ 2024-08-15 11:34 Jani Nikula
  2024-08-15 11:34 ` [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified Jani Nikula
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jani Nikula @ 2024-08-15 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-doc; +Cc: jani.nikula, Joe Perches, Jonathan Corbet

For example Documentation/adming-guide/bug-hunting.rst suggest using
get_maintainer.pl to get a list of maintainers and mailing lists to
report bugs to, while a number of subsystems and drivers explicitly use
the "B:" MAINTAINERS entry to direct bug reports at issue trackers
instead of mailing lists and people.

Add the --bug option to get_maintainer.pl to print the bug reporting
URIs, if any.

Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 scripts/get_maintainer.pl | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ee1aed7e090c..5ac02e198737 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -54,6 +54,7 @@ my $output_section_maxlen = 50;
 my $scm = 0;
 my $tree = 1;
 my $web = 0;
+my $bug = 0;
 my $subsystem = 0;
 my $status = 0;
 my $letters = "";
@@ -271,6 +272,7 @@ if (!GetOptions(
 		'scm!' => \$scm,
 		'tree!' => \$tree,
 		'web!' => \$web,
+		'bug!' => \$bug,
 		'letters=s' => \$letters,
 		'pattern-depth=i' => \$pattern_depth,
 		'k|keywords!' => \$keywords,
@@ -320,13 +322,14 @@ if ($sections || $letters ne "") {
     $status = 0;
     $subsystem = 0;
     $web = 0;
+    $bug = 0;
     $keywords = 0;
     $keywords_in_file = 0;
     $interactive = 0;
 } else {
-    my $selections = $email + $scm + $status + $subsystem + $web;
+    my $selections = $email + $scm + $status + $subsystem + $web + $bug;
     if ($selections == 0) {
-	die "$P:  Missing required option: email, scm, status, subsystem or web\n";
+	die "$P:  Missing required option: email, scm, status, subsystem, web or bug\n";
     }
 }
 
@@ -631,6 +634,7 @@ my %hash_list_to;
 my @list_to = ();
 my @scm = ();
 my @web = ();
+my @bug = ();
 my @subsystem = ();
 my @status = ();
 my %deduplicate_name_hash = ();
@@ -662,6 +666,11 @@ if ($web) {
     output(@web);
 }
 
+if ($bug) {
+    @bug = uniq(@bug);
+    output(@bug);
+}
+
 exit($exit);
 
 sub self_test {
@@ -847,6 +856,7 @@ sub get_maintainers {
     @list_to = ();
     @scm = ();
     @web = ();
+    @bug = ();
     @subsystem = ();
     @status = ();
     %deduplicate_name_hash = ();
@@ -1069,6 +1079,7 @@ MAINTAINER field selection options:
   --status => print status if any
   --subsystem => print subsystem name if any
   --web => print website(s) if any
+  --bug => print bug reporting info if any
 
 Output type options:
   --separator [, ] => separator for multiple entries on 1 line
@@ -1382,6 +1393,8 @@ sub add_categories {
 		push(@scm, $pvalue . $suffix);
 	    } elsif ($ptype eq "W") {
 		push(@web, $pvalue . $suffix);
+	    } elsif ($ptype eq "B") {
+		push(@bug, $pvalue . $suffix);
 	    } elsif ($ptype eq "S") {
 		push(@status, $pvalue . $suffix);
 	    }
-- 
2.39.2


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

* [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified
  2024-08-15 11:34 [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Jani Nikula
@ 2024-08-15 11:34 ` Jani Nikula
  2024-08-17  3:54   ` Joe Perches
  2024-08-28 14:04   ` Joe Perches
  2024-08-17  3:54 ` [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Joe Perches
  2024-08-26 22:10 ` Jonathan Corbet
  2 siblings, 2 replies; 6+ messages in thread
From: Jani Nikula @ 2024-08-15 11:34 UTC (permalink / raw)
  To: linux-kernel, linux-doc; +Cc: jani.nikula, Joe Perches, Jonathan Corbet

Update bug reporting info in bug-hunting.rst to direct people to
driver/subsystem bug trackers, if explicitly specified with the
MAINTAINERS "B:" entry. Use the new get_maintainer.pl --bug option to
print the info.

Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 Documentation/admin-guide/bug-hunting.rst | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Documentation/admin-guide/bug-hunting.rst b/Documentation/admin-guide/bug-hunting.rst
index 95299b08c405..1d0f8ceb3075 100644
--- a/Documentation/admin-guide/bug-hunting.rst
+++ b/Documentation/admin-guide/bug-hunting.rst
@@ -244,14 +244,14 @@ Reporting the bug
 Once you find where the bug happened, by inspecting its location,
 you could either try to fix it yourself or report it upstream.
 
-In order to report it upstream, you should identify the mailing list
-used for the development of the affected code. This can be done by using
-the ``get_maintainer.pl`` script.
+In order to report it upstream, you should identify the bug tracker, if any, or
+mailing list used for the development of the affected code. This can be done by
+using the ``get_maintainer.pl`` script.
 
 For example, if you find a bug at the gspca's sonixj.c file, you can get
 its maintainers with::
 
-	$ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c
+	$ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c
 	Hans Verkuil <hverkuil@xs4all.nl> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%)
 	Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%)
 	Tejun Heo <tj@kernel.org> (commit_signer:1/1=100%)
@@ -267,11 +267,12 @@ Please notice that it will point to:
 - The driver maintainer (Hans Verkuil);
 - The subsystem maintainer (Mauro Carvalho Chehab);
 - The driver and/or subsystem mailing list (linux-media@vger.kernel.org);
-- the Linux Kernel mailing list (linux-kernel@vger.kernel.org).
+- The Linux Kernel mailing list (linux-kernel@vger.kernel.org);
+- The bug reporting URIs for the driver/subsystem (none in the above example).
 
-Usually, the fastest way to have your bug fixed is to report it to mailing
-list used for the development of the code (linux-media ML) copying the
-driver maintainer (Hans).
+If the listing contains bug reporting URIs at the end, please prefer them over
+email. Otherwise, please report bugs to the mailing list used for the
+development of the code (linux-media ML) copying the driver maintainer (Hans).
 
 If you are totally stumped as to whom to send the report, and
 ``get_maintainer.pl`` didn't provide you anything useful, send it to
-- 
2.39.2


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

* Re: [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified
  2024-08-15 11:34 ` [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified Jani Nikula
@ 2024-08-17  3:54   ` Joe Perches
  2024-08-28 14:04   ` Joe Perches
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2024-08-17  3:54 UTC (permalink / raw)
  To: Jani Nikula, linux-kernel, linux-doc; +Cc: Jonathan Corbet

On Thu, 2024-08-15 at 14:34 +0300, Jani Nikula wrote:
> Update bug reporting info in bug-hunting.rst to direct people to
> driver/subsystem bug trackers, if explicitly specified with the
> MAINTAINERS "B:" entry. Use the new get_maintainer.pl --bug option to
> print the info.
> 
> Cc: Joe Perches <joe@perches.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  Documentation/admin-guide/bug-hunting.rst | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/admin-guide/bug-hunting.rst b/Documentation/admin-guide/bug-hunting.rst
> index 95299b08c405..1d0f8ceb3075 100644
> --- a/Documentation/admin-guide/bug-hunting.rst
> +++ b/Documentation/admin-guide/bug-hunting.rst
> @@ -244,14 +244,14 @@ Reporting the bug
>  Once you find where the bug happened, by inspecting its location,
>  you could either try to fix it yourself or report it upstream.
>  
> -In order to report it upstream, you should identify the mailing list
> -used for the development of the affected code. This can be done by using
> -the ``get_maintainer.pl`` script.
> +In order to report it upstream, you should identify the bug tracker, if any, or
> +mailing list used for the development of the affected code. This can be done by
> +using the ``get_maintainer.pl`` script.
>  
>  For example, if you find a bug at the gspca's sonixj.c file, you can get
>  its maintainers with::
>  
> -	$ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c
> +	$ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c

Might not be the best use as B: entries are URIs and not email addresses

Maybe change the text above it too.

>  	Hans Verkuil <hverkuil@xs4all.nl> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%)
>  	Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%)
>  	Tejun Heo <tj@kernel.org> (commit_signer:1/1=100%)
> @@ -267,11 +267,12 @@ Please notice that it will point to:
>  - The driver maintainer (Hans Verkuil);
>  - The subsystem maintainer (Mauro Carvalho Chehab);
>  - The driver and/or subsystem mailing list (linux-media@vger.kernel.org);
> -- the Linux Kernel mailing list (linux-kernel@vger.kernel.org).
> +- The Linux Kernel mailing list (linux-kernel@vger.kernel.org);
> +- The bug reporting URIs for the driver/subsystem (none in the above example).

Maybe change the example to show a file/subsystem with a B: entry.


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

* Re: [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info
  2024-08-15 11:34 [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Jani Nikula
  2024-08-15 11:34 ` [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified Jani Nikula
@ 2024-08-17  3:54 ` Joe Perches
  2024-08-26 22:10 ` Jonathan Corbet
  2 siblings, 0 replies; 6+ messages in thread
From: Joe Perches @ 2024-08-17  3:54 UTC (permalink / raw)
  To: Jani Nikula, linux-kernel, linux-doc, Andrew Morton; +Cc: Jonathan Corbet

On Thu, 2024-08-15 at 14:34 +0300, Jani Nikula wrote:
> For example Documentation/adming-guide/bug-hunting.rst suggest using
> get_maintainer.pl to get a list of maintainers and mailing lists to
> report bugs to, while a number of subsystems and drivers explicitly use
> the "B:" MAINTAINERS entry to direct bug reports at issue trackers
> instead of mailing lists and people.
> 
> Add the --bug option to get_maintainer.pl to print the bug reporting
> URIs, if any.

Seems sensible, thanks.

Acked-by: Joe Perches <joe@perches.com>

> 
> Cc: Joe Perches <joe@perches.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  scripts/get_maintainer.pl | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> index ee1aed7e090c..5ac02e198737 100755
> --- a/scripts/get_maintainer.pl
> +++ b/scripts/get_maintainer.pl
> @@ -54,6 +54,7 @@ my $output_section_maxlen = 50;
>  my $scm = 0;
>  my $tree = 1;
>  my $web = 0;
> +my $bug = 0;
>  my $subsystem = 0;
>  my $status = 0;
>  my $letters = "";
> @@ -271,6 +272,7 @@ if (!GetOptions(
>  		'scm!' => \$scm,
>  		'tree!' => \$tree,
>  		'web!' => \$web,
> +		'bug!' => \$bug,
>  		'letters=s' => \$letters,
>  		'pattern-depth=i' => \$pattern_depth,
>  		'k|keywords!' => \$keywords,
> @@ -320,13 +322,14 @@ if ($sections || $letters ne "") {
>      $status = 0;
>      $subsystem = 0;
>      $web = 0;
> +    $bug = 0;
>      $keywords = 0;
>      $keywords_in_file = 0;
>      $interactive = 0;
>  } else {
> -    my $selections = $email + $scm + $status + $subsystem + $web;
> +    my $selections = $email + $scm + $status + $subsystem + $web + $bug;
>      if ($selections == 0) {
> -	die "$P:  Missing required option: email, scm, status, subsystem or web\n";
> +	die "$P:  Missing required option: email, scm, status, subsystem, web or bug\n";
>      }
>  }
>  
> @@ -631,6 +634,7 @@ my %hash_list_to;
>  my @list_to = ();
>  my @scm = ();
>  my @web = ();
> +my @bug = ();
>  my @subsystem = ();
>  my @status = ();
>  my %deduplicate_name_hash = ();
> @@ -662,6 +666,11 @@ if ($web) {
>      output(@web);
>  }
>  
> +if ($bug) {
> +    @bug = uniq(@bug);
> +    output(@bug);
> +}
> +
>  exit($exit);
>  
>  sub self_test {
> @@ -847,6 +856,7 @@ sub get_maintainers {
>      @list_to = ();
>      @scm = ();
>      @web = ();
> +    @bug = ();
>      @subsystem = ();
>      @status = ();
>      %deduplicate_name_hash = ();
> @@ -1069,6 +1079,7 @@ MAINTAINER field selection options:
>    --status => print status if any
>    --subsystem => print subsystem name if any
>    --web => print website(s) if any
> +  --bug => print bug reporting info if any
>  
>  Output type options:
>    --separator [, ] => separator for multiple entries on 1 line
> @@ -1382,6 +1393,8 @@ sub add_categories {
>  		push(@scm, $pvalue . $suffix);
>  	    } elsif ($ptype eq "W") {
>  		push(@web, $pvalue . $suffix);
> +	    } elsif ($ptype eq "B") {
> +		push(@bug, $pvalue . $suffix);
>  	    } elsif ($ptype eq "S") {
>  		push(@status, $pvalue . $suffix);
>  	    }


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

* Re: [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info
  2024-08-15 11:34 [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Jani Nikula
  2024-08-15 11:34 ` [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified Jani Nikula
  2024-08-17  3:54 ` [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Joe Perches
@ 2024-08-26 22:10 ` Jonathan Corbet
  2 siblings, 0 replies; 6+ messages in thread
From: Jonathan Corbet @ 2024-08-26 22:10 UTC (permalink / raw)
  To: Jani Nikula, linux-kernel, linux-doc; +Cc: jani.nikula, Joe Perches

Jani Nikula <jani.nikula@intel.com> writes:

> For example Documentation/adming-guide/bug-hunting.rst suggest using
> get_maintainer.pl to get a list of maintainers and mailing lists to
> report bugs to, while a number of subsystems and drivers explicitly use
> the "B:" MAINTAINERS entry to direct bug reports at issue trackers
> instead of mailing lists and people.
>
> Add the --bug option to get_maintainer.pl to print the bug reporting
> URIs, if any.
>
> Cc: Joe Perches <joe@perches.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  scripts/get_maintainer.pl | 17 +++++++++++++++--
>  1 file changed, 15 insertions(+), 2 deletions(-)

I've applied both patches, thanks.

jon

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

* Re: [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified
  2024-08-15 11:34 ` [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified Jani Nikula
  2024-08-17  3:54   ` Joe Perches
@ 2024-08-28 14:04   ` Joe Perches
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2024-08-28 14:04 UTC (permalink / raw)
  To: Jani Nikula, linux-kernel, linux-doc; +Cc: Jonathan Corbet

On Thu, 2024-08-15 at 14:34 +0300, Jani Nikula wrote:
> Update bug reporting info in bug-hunting.rst to direct people to
> driver/subsystem bug trackers, if explicitly specified with the
> MAINTAINERS "B:" entry. Use the new get_maintainer.pl --bug option to
> print the info.
> 
> Cc: Joe Perches <joe@perches.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  Documentation/admin-guide/bug-hunting.rst | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/Documentation/admin-guide/bug-hunting.rst b/Documentation/admin-guide/bug-hunting.rst
> index 95299b08c405..1d0f8ceb3075 100644
> --- a/Documentation/admin-guide/bug-hunting.rst
> +++ b/Documentation/admin-guide/bug-hunting.rst
> @@ -244,14 +244,14 @@ Reporting the bug
>  Once you find where the bug happened, by inspecting its location,
>  you could either try to fix it yourself or report it upstream.
>  
> -In order to report it upstream, you should identify the mailing list
> -used for the development of the affected code. This can be done by using
> -the ``get_maintainer.pl`` script.
> +In order to report it upstream, you should identify the bug tracker, if any, or
> +mailing list used for the development of the affected code. This can be done by
> +using the ``get_maintainer.pl`` script.
>  
>  For example, if you find a bug at the gspca's sonixj.c file, you can get
>  its maintainers with::

Please use examples with and without B: entries.

>  
> -	$ ./scripts/get_maintainer.pl -f drivers/media/usb/gspca/sonixj.c
> +	$ ./scripts/get_maintainer.pl --bug -f drivers/media/usb/gspca/sonixj.c
>  	Hans Verkuil <hverkuil@xs4all.nl> (odd fixer:GSPCA USB WEBCAM DRIVER,commit_signer:1/1=100%)
>  	Mauro Carvalho Chehab <mchehab@kernel.org> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB),commit_signer:1/1=100%)
>  	Tejun Heo <tj@kernel.org> (commit_signer:1/1=100%)
> @@ -267,11 +267,12 @@ Please notice that it will point to:
>  - The driver maintainer (Hans Verkuil);
>  - The subsystem maintainer (Mauro Carvalho Chehab);
>  - The driver and/or subsystem mailing list (linux-media@vger.kernel.org);
> -- the Linux Kernel mailing list (linux-kernel@vger.kernel.org).
> +- The Linux Kernel mailing list (linux-kernel@vger.kernel.org);
> +- The bug reporting URIs for the driver/subsystem (none in the above example).
>  
> -Usually, the fastest way to have your bug fixed is to report it to mailing
> -list used for the development of the code (linux-media ML) copying the
> -driver maintainer (Hans).
> +If the listing contains bug reporting URIs at the end, please prefer them over
> +email. Otherwise, please report bugs to the mailing list used for the
> +development of the code (linux-media ML) copying the driver maintainer (Hans).

I think that's quite poorly described as it could ignore
any other reporter/developer or person that introduced
the defect.



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

end of thread, other threads:[~2024-08-28 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-15 11:34 [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Jani Nikula
2024-08-15 11:34 ` [PATCH 2/2] Documentation: admin-guide: direct people to bug trackers, if specified Jani Nikula
2024-08-17  3:54   ` Joe Perches
2024-08-28 14:04   ` Joe Perches
2024-08-17  3:54 ` [PATCH 1/2] get_maintainer: add --bug option to print bug reporting info Joe Perches
2024-08-26 22:10 ` 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®