Re: [PATCH v3 01/10] string: provide strends()

From: Andy Shevchenko

Date: Wed Oct 29 2025 - 11:20:29 EST


On Wed, Oct 29, 2025 at 01:36:55PM +0100, Bartosz Golaszewski wrote:
> On Wed, Oct 29, 2025 at 12:42 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxx> wrote:
> > On Wed, Oct 29, 2025 at 12:20:37PM +0100, Bartosz Golaszewski wrote:

...

> > Can you rather re-use strcmp_suffix() from drivers/of/property.c?
>
> I think that strends() and its boolean return value are a bit more
> intuitive to use than strcmp_suffix() and its integer return value,
> the meaning of which you typically have to look-up to figure out. If
> there are no objections, I'd like to keep it and - when it's upstream
> - convert property.c to using it instead. Also: the name
> strcmp_suffix() could use some improvement, seeing how I wasn't able
> to find it, even though I looked hard across the kernel source, while
> I easily stumbled upon a similar implementation of strends() already
> existing in dtc sources.

I fine as long as the replacement (deduplication) change is provided.

--
With Best Regards,
Andy Shevchenko