mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Mario Limonciello <mario.limonciello@amd.com>,
	benjamin.tissoires@redhat.com, jikos@kernel.org,
	open list <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] MAINTAINERS: Fix parsing usbhid from scripts/get_maintainer.pl
Date: Thu, 16 Jun 2022 19:37:25 -0700	[thread overview]
Message-ID: <3c56ffea031f0b0d05fd856e10a2c1f6f72291e0.camel@perches.com> (raw)
In-Reply-To: <20220616183322.14861-1-mario.limonciello@amd.com>

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;
 }


  reply	other threads:[~2022-06-17  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 18:33 Mario Limonciello
2022-06-17  2:37 ` Joe Perches [this message]
2022-06-17  2:40 ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c56ffea031f0b0d05fd856e10a2c1f6f72291e0.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®