From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbcFUMJl (ORCPT ); Tue, 21 Jun 2016 08:09:41 -0400 Received: from mga02.intel.com ([134.134.136.20]:3150 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbcFUMJd (ORCPT ); Tue, 21 Jun 2016 08:09:33 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,503,1459839600"; d="scan'208";a="980330535" Date: Tue, 21 Jun 2016 14:54:25 +0300 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Adam Thomson , Robert Moore , Lv Zheng , "Rafael J.Wysocki" , Heikki Krogerus , Len Brown , Andy Shevchenko , Rob Herring , Frank Rowand , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Greg Kroah-Hartman , linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Support Opensource , Sathyanarayana Nujella Subject: Re: [RESEND PATCH v3 1/2] device property: Add function to search for named child of device 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-Disposition: inline In-Reply-To: <28758107.YROb1rVtm6@vostro.rjw.lan> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.