linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl
@ 2022-06-16 18:33 Mario Limonciello
  2022-06-17  2:37 ` Joe Perches
  2022-06-17  2:40 ` Joe Perches
  0 siblings, 2 replies; 3+ messages in thread
From: Mario Limonciello @ 2022-06-16 18:33 UTC (permalink / raw)
  To: benjamin.tissoires, jikos, open list; +Cc: Mario Limonciello

Recently trying to send a patch, I found that `./scripts/get_maintainer.pl`
didn't want to parse the usbhid section because of too long of a line
leading to a missing parenthesis.  To fix this, change () to [] so it can
parse even the long line.

```
(to-cmd) Adding to: linux-usb@vger.kernel.org (open list:USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REM...) from: 'scripts/get_maintainer.pl'
(to-cmd) Adding to: linux-input@vger.kernel.org (open list:HID CORE LAYER) from: 'scripts/get_maintainer.pl'
(to-cmd) Adding to: linux-kernel@vger.kernel.org (open list) from: 'scripts/get_maintainer.pl'
Unmatched () '(open list:USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REM...)' '' at /usr/lib/git-core/git-send-email line 546.
error: unable to extract a valid address from: linux-usb@vger.kernel.org (open list:USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REM...)
```

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 43d3d07afccd..f4658912c007 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20537,7 +20537,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
 F:	drivers/usb/gadget/
 F:	include/linux/usb/gadget*
 
-USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
+USB HID/HIDBP DRIVERS [USB KEYBOARDS, MICE, REMOTE CONTROLS, ...]
 M:	Jiri Kosina <jikos@kernel.org>
 M:	Benjamin Tissoires <benjamin.tissoires@redhat.com>
 L:	linux-usb@vger.kernel.org
-- 
2.25.1


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

* Re: [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl
  2022-06-16 18:33 [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl Mario Limonciello
@ 2022-06-17  2:37 ` Joe Perches
  2022-06-17  2:40 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2022-06-17  2:37 UTC (permalink / raw)
  To: Mario Limonciello, benjamin.tissoires, jikos, open list; +Cc: Andrew Morton

On Thu, 2022-06-16 at 13:33 -0500, Mario Limonciello wrote:
> Recently trying to send a patch, I found that `./scripts/get_maintainer.pl`
> didn't want to parse the usbhid section because of too long of a line
> leading to a missing parenthesis.  To fix this, change () to [] so it can
> parse even the long line.

It'd almost certainly better to change get_maintainer as there are many
possible entries like this.

Perhaps:
---
 scripts/get_maintainer.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index ab123b498fd9b..2a8ee64cd7208 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -1256,6 +1256,9 @@ sub get_subsystem_name {
 	$subsystem = substr($subsystem, 0, $output_section_maxlen - 3);
 	$subsystem =~ s/\s*$//;
 	$subsystem = $subsystem . "...";
+	my $openparens  = () = $subsystem =~ /\(/g;
+	my $closeparens = () = $subsystem =~ /\)/g;
+	$subsystem .= ')' x ($openparens - $closeparens) if ($openparens > $closeparens);
     }
     return $subsystem;
 }


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

* Re: [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl
  2022-06-16 18:33 [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl Mario Limonciello
  2022-06-17  2:37 ` Joe Perches
@ 2022-06-17  2:40 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2022-06-17  2:40 UTC (permalink / raw)
  To: Mario Limonciello, benjamin.tissoires, jikos, open list; +Cc: Andrew Morton

On Thu, 2022-06-16 at 13:33 -0500, Mario Limonciello wrote:
> Recently trying to send a patch, I found that `./scripts/get_maintainer.pl`
> didn't want to parse the usbhid section because of too long of a line
> leading to a missing parenthesis.  To fix this, change () to [] so it can
> parse even the long line.
[]
> (to-cmd) Adding to: linux-usb@vger.kernel.org (open list:USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REM...) from: 'scripts/get_maintainer.pl'
> (to-cmd) Adding to: linux-input@vger.kernel.org (open list:HID CORE LAYER) from: 'scripts/get_maintainer.pl'
> (to-cmd) Adding to: linux-kernel@vger.kernel.org (open list) from: 'scripts/get_maintainer.pl'
> Unmatched () '(open list:USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REM...)' '' at /usr/lib/git-core/git-send-email line 546.
> error: unable to extract a valid address from: linux-usb@vger.kernel.org (open list:USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REM...)

And it wasn't get_maintainer, it was git send-email that found that
the specific get_maintainer output was not a 'valid' email address
with a balanced parenthesis comment.

> diff --git a/MAINTAINERS b/MAINTAINERS
[]
> @@ -20537,7 +20537,7 @@ T:	git git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git
>  F:	drivers/usb/gadget/
>  F:	include/linux/usb/gadget*
>  
> -USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
> +USB HID/HIDBP DRIVERS [USB KEYBOARDS, MICE, REMOTE CONTROLS, ...]
>  M:	Jiri Kosina <jikos@kernel.org>
>  M:	Benjamin Tissoires <benjamin.tissoires@redhat.com>
>  L:	linux-usb@vger.kernel.org


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

end of thread, other threads:[~2022-06-17  2:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 18:33 [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl Mario Limonciello
2022-06-17  2:37 ` Joe Perches
2022-06-17  2:40 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).