public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: linux-phy@lists.infradead.org, Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	dri-devel@lists.freedesktop.org,
	 freedreno@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-arm-msm@vger.kernel.org, linux-can@vger.kernel.org,
	 linux-gpio@vger.kernel.org, linux-ide@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
	 linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	 linux-riscv@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	 linux-samsung-soc@vger.kernel.org, linux-sunxi@lists.linux.dev,
	 linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org,
	netdev@vger.kernel.org, 	spacemit@lists.linux.dev,
	UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v2 phy-next 24/24] MAINTAINERS: add regexes for linux-phy
Date: Sun, 08 Mar 2026 15:22:13 -0700	[thread overview]
Message-ID: <9fd14d166e860f26febfbc9061a6dcae6a166961.camel@perches.com> (raw)
In-Reply-To: <20260308205623.5trrqdmdrzj744hi@skbuf>

On Sun, 2026-03-08 at 22:56 +0200, Vladimir Oltean wrote:
> On Sun, Mar 08, 2026 at 12:25:32PM -0700, Joe Perches wrote:
> > On Sun, 2026-03-08 at 21:10 +0200, Vladimir Oltean wrote:
> On Sun, Mar 08, 2026 at 11:40:44AM -0700, Joe Perches wrote:
> > > Perhaps if matching only the include uses:
> > > > (/ is escaped because get_maintainer is stupid)
> > > > something like:
> > > > 
> > > > K:	include\s*\<linux\/phy\/phy(?:-common-props|-provider)?\.h\>
> 
> > > Why is get_maintainer stupid?
> > 
> > The get_maintainer code used to match keywords is
> > 
> 	    foreach my $line (keys %keyword_hash) {
> 		if ($text =~ m/$keyword_hash{$line}/x) {
> > 
> > so it seems the first / in the K: <foo> regex would terminate
> > the match.
> > 
> > It might have been better to use a different delimiter.
> > Maybe:
> > 
> 		if ($text =~ m{$keyword_hash{$line}}/x
> 
> So why does it match in my example?

Not sure really.  But it does match exactly.
Maybe the regex code scans forward until the last /
as the / character is not a "real" metacharacter.

I added some test code and it produced:

line:	<+#include <linux/phy/phy.h>>
kw:	<(?:linux/phy/phy\.h|phy-props\.h|phy-provider\.h)>
test:	<^[+-].*(?:linux/phy/phy\.h|phy-props\.h|phy-provider\.h)>
match:	<+#include <linux/phy/phy.h>

From https://perldoc.perl.org/perlrequick

Not all characters can be used 'as is' in a match.
Some characters, called metacharacters, are considered special,
and reserved for use in regex notation. The metacharacters are

{}[]()^$.|*+?\

A metacharacter can be matched literally by putting a backslash before it:

"2+2=4" =~ /2+2/;    # doesn't match, + is a metacharacter
"2+2=4" =~ /2\+2/;   # matches, \+ is treated like an ordinary +
'C:\WIN32' =~ /C:\\WIN/;                       # matches
"/usr/bin/perl" =~ /\/usr\/bin\/perl/;  # matches

In the last regex, the forward slash '/' is also backslashed, because it is used to delimit the regex.

      reply	other threads:[~2026-03-08 22:22 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-08 11:39 [PATCH v2 phy-next 00/24] Split Generic PHY consumer and provider API vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 01/24] ata: add <linux/pm_runtime.h> where missing vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 02/24] PCI: Add missing headers transitively included by <linux/phy/phy.h> vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 03/24] usb: add " vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 04/24] drm: add <linux/pm_runtime.h> where missing vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 05/24] phy: " vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 06/24] phy: spacemit: include missing <linux/phy/phy.h> vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 07/24] net: lan969x: include missing <linux/of.h> vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 08/24] PCI: Remove device links to PHY vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 09/24] ufs: exynos: stop poking into struct phy guts vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 10/24] drm/rockchip: dw_hdmi: avoid direct dereference of phy->dev.of_node vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 11/24] drm/msm/dp: remove debugging prints with internal struct phy state vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 12/24] phy: move provider API out of public <linux/phy/phy.h> vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 13/24] phy: make phy_get_mode(), phy_(get|set)_bus_width() NULL tolerant vladimir.oltean
2026-03-08 11:39 ` [PATCH v2 phy-next 14/24] phy: introduce phy_get_max_link_rate() helper for consumers vladimir.oltean
2026-03-09  9:18   ` Markus Schneider-Pargmann
2026-03-08 11:40 ` [PATCH v2 phy-next 15/24] drm/rockchip: dsi: include PHY provider header vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 16/24] drm: bridge: cdns-mhdp8546: use consumer API for getting PHY bus width vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 17/24] media: sunxi: a83-mips-csi2: include PHY provider header vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 18/24] net: renesas: rswitch: " vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 19/24] pinctrl: tegra-xusb: " vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 20/24] power: supply: cpcap-charger: include missing <linux/property.h> vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 21/24] phy: include PHY provider header (1/2) vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 22/24] phy: include PHY provider header (2/2) vladimir.oltean
2026-03-08 12:01   ` Russell King (Oracle)
2026-03-08 12:37     ` Vladimir Oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 23/24] phy: remove temporary provider compatibility from consumer header vladimir.oltean
2026-03-08 11:40 ` [PATCH v2 phy-next 24/24] MAINTAINERS: add regexes for linux-phy vladimir.oltean
2026-03-08 18:40   ` Joe Perches
2026-03-08 19:10     ` Vladimir Oltean
2026-03-08 19:25       ` Joe Perches
2026-03-08 20:56         ` Vladimir Oltean
2026-03-08 22:22           ` Joe Perches [this message]

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=9fd14d166e860f26febfbc9061a6dcae6a166961.camel@perches.com \
    --to=joe@perches.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=spacemit@lists.linux.dev \
    --cc=vkoul@kernel.org \
    --cc=vladimir.oltean@nxp.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