From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 40CF7ECAAA1 for ; Tue, 30 Aug 2022 10:43:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F36010E047; Tue, 30 Aug 2022 10:43:26 +0000 (UTC) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3563A10E047; Tue, 30 Aug 2022 10:43:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661856204; x=1693392204; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=1JuE3MlMyluva+oTcotxIb88e/kWe/AXbzFxNtVjZ48=; b=XbHTJVFeRVnNQcBOIvOh1kF00+Os/eenr7cr3Bsqy4NFP73NURXzty6o O9xYFR3mSLbO+11TpjJvCC0V/uns7TGgQmbJO8dCkyZaW2m4071DJ9Juf VxqWfjQ/iq/QH49LzM55a7ayQu0IO3G/0RqsK9PmXqGBE/M7Emim9EvnN RL78TFV4i71Q9TfupDh83y44jIVHfXifiE1qD9A9rMak1M0+B9fRZTdNN GjLMfvYwdluIMG1sgKtSsf8GIXLKoZCkAyihd4+YN3Z8FmhnEB1YFVjlr zTtPIxilzLvyOcMokpLO7FpdVoRXlbYw94oZCPkVF1FF9myx5yEp8VxaG g==; X-IronPort-AV: E=McAfee;i="6500,9779,10454"; a="356857901" X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="356857901" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 03:43:23 -0700 X-IronPort-AV: E=Sophos;i="5.93,274,1654585200"; d="scan'208";a="672807662" Received: from amrabet-mobl.ger.corp.intel.com (HELO localhost) ([10.252.41.211]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2022 03:43:15 -0700 From: Jani Nikula To: Geert Uytterhoeven , Maxime Ripard In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220728-rpi-analog-tv-properties-v2-0-459522d653a7@cerno.tech> <20220728-rpi-analog-tv-properties-v2-14-459522d653a7@cerno.tech> Date: Tue, 30 Aug 2022 13:43:07 +0300 Message-ID: <87czcidnb8.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Intel-gfx] [PATCH v2 14/41] drm/modes: Move named modes parsing to a separate function X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karol Herbst , David Airlie , Nouveau Dev , DRI Development , Phil Elwell , Emma Anholt , Samuel Holland , Jernej Skrabec , Chen-Yu Tsai , Ben Skeggs , linux-sunxi@lists.linux.dev, Thomas Zimmermann , Intel Graphics Development , Maxime Ripard , Rodrigo Vivi , Daniel Vetter , Linux ARM , Dom Cobley , Dave Stevenson , Linux Kernel Mailing List , Mateusz Kwiatkowski , Noralf =?utf-8?Q?Tr=C3=B8nnes?= , Philipp Zabel Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Tue, 30 Aug 2022, Geert Uytterhoeven wrote: > On Mon, Aug 29, 2022 at 3:13 PM Maxime Ripard 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