Re: [PATCH v2 14/41] drm/modes: Move named modes parsing to a separate function

From: Jani Nikula
Date: Tue Aug 30 2022 - 06:43:31 EST


On Tue, 30 Aug 2022, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
> On Mon, Aug 29, 2022 at 3:13 PM Maxime Ripard <maxime@xxxxxxxxxx> wrote:
>> +#define STR_STRICT_EQ(str, len, cmp) \
>> + ((strlen(cmp) == len) && !strncmp(str, cmp, len))
>
> This is not part of the move, but newly added.

The same construct is also duplicated elsewhere in the series, and I
kept being confused by it. The above is precisely the same as:

str_has_prefix(str, cmp) == len

Which is more intuitive and available in string.h instead of being a
local duplicate.


BR,
Jani.

--
Jani Nikula, Intel Open Source Graphics Center