lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqLK84jg4O0QdZ8zDTniqL5ehmTy9YEm0D3qHyHf00tkug@mail.gmail.com>
Date: Tue, 16 Dec 2025 06:57:48 -0600
From: Rob Herring <robh@...nel.org>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] of: replace strcmp_suffix() with strends()

On Tue, Dec 16, 2025 at 1:45 AM Bartosz Golaszewski <brgl@...ev.pl> wrote:
>
> On Mon, Dec 15, 2025 at 8:44 PM Rob Herring <robh@...nel.org> wrote:
> >
> > On Mon, Dec 15, 2025 at 04:48:09PM +0100, Bartosz Golaszewski wrote:
> > > string.h now provides strends() which fulfills the same role as the
> > > locally implemented strcmp_suffix(). Use it in of/property.c.
> > >
> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@....qualcomm.com>
> > > ---
> > > @@ -1416,7 +1405,7 @@ DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
> > >  static struct device_node *parse_gpios(struct device_node *np,
> > >                                      const char *prop_name, int index)
> > >  {
> > > -     if (!strcmp_suffix(prop_name, ",nr-gpios"))
> > > +     if (!strends(prop_name, ",nr-gpios"))
> >
> > Don't you need to negate these?
> >
>
> I'm not following, am I not negating this?

strcmp() returns 0 on match. strends() returns True on match.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ