From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [RESEND PATCH v3 1/2] device property: Add function to search for named child of device Date: Tue, 21 Jun 2016 14:54:25 +0300 Message-ID: <20160621115425.GY1739@lahna.fi.intel.com> References: <866c9edccdd89805f6a0c0aa92f8a78ae616ed61.1466421714.git.Adam.Thomson.Opensource@diasemi.com> <20160621111126.GX1739@lahna.fi.intel.com> <28758107.YROb1rVtm6@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <28758107.YROb1rVtm6@vostro.rjw.lan> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: "Rafael J. Wysocki" Cc: Sathyanarayana Nujella , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Heikki Krogerus , Support Opensource , Greg Kroah-Hartman , Mark Brown , "Rafael J.Wysocki" , Robert Moore , Liam Girdwood , linux-acpi@vger.kernel.org, Rob Herring , Lv Zheng , Takashi Iwai , Adam Thomson , Andy Shevchenko , Frank Rowand , linux-kernel@vger.kernel.org, Len Brown List-Id: linux-acpi@vger.kernel.org On Tue, Jun 21, 2016 at 01:42:16PM +0200, Rafael J. Wysocki wrote: > > > +static inline bool acpi_data_node_match(struct fwnode_handle *fwnode, > > > + const char *name) > > > +{ > > > + return is_acpi_data_node(fwnode) ? > > > + (!strcasecmp(to_acpi_data_node(fwnode)->name, name)) : false; > > > +} > > > > Looks fine to me. > > > > One question - is it expected that matching ACPI data nodes is always > > case insensitive? > > That would not be a correct expectation in theory, although I don't think it > really matters in practice. OK. Maybe it is good idea to document that in acpi_data_node_match(). A comment explaining why we use strcasecmp() for now.