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

Jani Nikula jani.nikula at linux.intel.com
Tue Aug 30 10:43:07 UTC 2022


On Tue, 30 Aug 2022, Geert Uytterhoeven <geert at linux-m68k.org> wrote:
> On Mon, Aug 29, 2022 at 3:13 PM Maxime Ripard <maxime at cerno.tech> 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


More information about the dri-devel mailing list