The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx+linux-hardening@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Alejandro Colomar <alx@kernel.org>,
	linux-hardening@vger.kernel.org,
	 Krzysztof Kozlowski <krzk@kernel.org>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>,
	 Geert Uytterhoeven <geert@linux-m68k.org>,
	Andreas Schwab <schwab@linux-m68k.org>,
	 Andy Shevchenko <andy@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	 Daniel Scally <djrscally@gmail.com>,
	Danilo Krummrich <dakr@kernel.org>,
	 Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	 Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Joe Perches <joe@perches.com>, Johan Hovold <johan@kernel.org>,
	 Kees Cook <kees@kernel.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	 Len Brown <lenb@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	 Linus Walleij <linusw@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	 "Rafael J. Wysocki" <rafael@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	Saravana Kannan <saravanak@kernel.org>,
	 Steven Rostedt <rostedt@goodmis.org>,
	Tom Zanussi <zanussi@kernel.org>,
	linux-acpi@vger.kernel.org,  driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: Re: [PATCH v7 4/4] device property: Fix fwnode_name_eq() for empty node names
Date: Wed, 25 Nov 2026 23:18:16 +0100	[thread overview]
Message-ID: <awddHt_xvc-lIygA@devuan> (raw)
In-Reply-To: <awdaYz9NNVv5fHv9@ashevche-desk.local>

[-- Attachment #1: Type: text/plain, Size: 2014 bytes --]

Hi Andy,

> Date: 2026-11-26 00:00:03+0200
> From: Andy Shevchenko <andriy.shevchenko@intel.com>
>
> On Wed, Nov 25, 2026 at 10:03:55PM +0100, Alejandro Colomar wrote:
> > str_has_prefix() returns the prefix length on match and 0 on mismatch,
> > so the mistmatch case can't be told from "empty prefix matched an empty
> > string".
> > 
> > For instance: the OF root node's name as returned by
> > fwnode_get_name() is "" and will return 0 for any name matched against
> > it and since len is 0 too, fwnode_name_eq() will return true.
> > 
> > Let's use strprefix() instead, which also makes this function simpler.
> 
> ...
> 
> > Message-ID: <avrSUUM3HMgxTNpl@kekkonen.localdomain>
> > Message-ID: <nat4ilqmzzpuyrjbuahl367ip22tfnmjorydlppuwqiscxaujo@kf63j4lb3flk>
> > Message-ID: <nat4ilqmzzpuyrjbuahl367ip22tfnmjorydlppuwqiscxaujo@kf63j4lb3flk>
> 
> What is this?

git-am(1) has --message-id and the corresponding am.messageId, which
stores the Message-ID from the email header field from which the patch
is taken, to document where the patch was taken from.  It is stored by
git-am(1) right below the last trailer tag from the patch (which should
be the 'Signed-off-by' of the author), and before the 'Signed-off-by'
appended by git-am(1) itself.

	$ MANWIDTH=64 man git-am | grep -A5 messageId
	     am.messageId
		 Add a Message-ID trailer based on the email header to
		 the commit when using git‐am(1) (see git‐interpret‐
		 trailers(1)). See also the --message-id and
		 --no-message-id options.

It's useful to document where those tags come from, in case it's
historically useful.

I've extended its use to other tags I take from emails.

> Is it documented tag nowadays?

It is not documented in the kernel, AFAIK.  It is documented in
git-am(1).  I included it, because I find it useful.  Feel free to drop
it if it's not wanted (I can remove in in v8 if it's not wanted).


Have a lovely night!
Alex

-- 
<https://www.alejandro-colomar.es>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2026-11-25 22:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 21:03 [PATCH v7 0/4] Add strprefix() and fix a bug with it Alejandro Colomar
2026-11-25 21:03 ` [PATCH v7 1/4] string: Add streq() Alejandro Colomar
2026-11-25 21:03 ` [PATCH v7 2/4] string: Add strprefix() Alejandro Colomar
2026-11-25 21:03 ` [PATCH v7 3/4] string: Document corner-case misbehavior in str_has_prefix() for empty prefix Alejandro Colomar
2026-11-25 21:03 ` [PATCH v7 4/4] device property: Fix fwnode_name_eq() for empty node names Alejandro Colomar
2026-11-25 22:00   ` Andy Shevchenko
2026-11-25 22:18     ` Alejandro Colomar [this message]
2026-11-26  8:52       ` Geert Uytterhoeven
2026-11-26  9:32       ` Bartosz Golaszewski
2026-11-26  9:30 ` [PATCH v7 0/4] Add strprefix() and fix a bug with it Bartosz Golaszewski

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=awddHt_xvc-lIygA@devuan \
    --to=alx+linux-hardening@kernel.org \
    --cc=alx@kernel.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=andy@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=dakr@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=djrscally@gmail.com \
    --cc=driver-core@lists.linux.dev \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=joe@perches.com \
    --cc=johan@kernel.org \
    --cc=kees@kernel.org \
    --cc=krzk@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lenb@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=namhyung@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=saravanak@kernel.org \
    --cc=schwab@linux-m68k.org \
    --cc=torvalds@linux-foundation.org \
    --cc=zanussi@kernel.org \
    /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