mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: 'Greg Kroah-Hartman' <gregkh@linuxfoundation.org>
To: Soha Jin <soha@lohu.info>
Cc: "'Rafael J. Wysocki'" <rafael@kernel.org>,
	'Andy Shevchenko' <andriy.shevchenko@linux.intel.com>,
	'Daniel Scally' <djrscally@gmail.com>,
	'Heikki Krogerus' <heikki.krogerus@linux.intel.com>,
	'Sakari Ailus' <sakari.ailus@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] string: add match_string_nocase() for case-insensitive match
Date: Mon, 10 Oct 2022 08:24:16 +0200	[thread overview]
Message-ID: <Y0O6kDQ9Bxi9jMfo@kroah.com> (raw)
In-Reply-To: <EE2940315EA6EAA4+1b3101d8dc54$c2f83680$48e8a380$@lohu.info>

On Mon, Oct 10, 2022 at 11:02:39AM +0800, Soha Jin wrote:
> Hi Greg,
> > On Mon, Oct 10, 2022 at 12:21:53AM +0800, Soha Jin wrote:
> > > Sometimes we want to make a case-insensitive comparison with strings,
> > > like checking compatible devices in fwnode properties, so this commit
> > > abstracts match_string to __match_string with a compare function. The
> > > original match_string will call __match_string with strcmp, and the
> > > new match_string_nocase will call it with strcasecmp.
> > 
> > Wait, no, fwnode properties are case sensitive, why are you allowing that to
> > be changed?  That sounds like broken firmware to me, right?
> > 
> 
> I am writing regarding the compatibility. In `of_device_is_compatible`, it
> uses `of_compat_cmp` which calls `strcasecmp` to match compatible property.
> 
> As the `fwnode_is_compatible` should be the replacement of the OF way, I
> think we should make the fwnode way and the OF way the same, i.e. either
> both case-insensitive or case-sensitive, to keep the consistency. I am
> afraid that make `of_compat_cmp` case-sensitive may break a great many of
> devices, that is why I am doing this.

Ok, but if you change this with the series, what will break?  What needs
this new case-insensitive comparison that does not work today?

thanks,

greg k-h

  reply	other threads:[~2022-10-10  6:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-09 16:21 [PATCH 0/3] Case-insensitive match_string and fwnode_is_compatible() Soha Jin
2022-10-09 16:21 ` [PATCH 1/3] string: add match_string_nocase() for case-insensitive match Soha Jin
2022-10-09 18:24   ` Greg Kroah-Hartman
2022-10-10  3:02     ` Soha Jin
2022-10-10  6:24       ` 'Greg Kroah-Hartman' [this message]
2022-10-10  7:36         ` Soha Jin
2022-10-09 16:21 ` [PATCH 2/3] device property: add {device,fwnode}_property_match_string_nocase() Soha Jin
2022-10-09 18:25   ` Greg Kroah-Hartman
2022-10-09 18:40   ` kernel test robot
2022-10-09 18:40   ` kernel test robot
2022-10-09 16:21 ` [PATCH 3/3] device property: add fwnode_is_compatible() for compatible match Soha Jin
2022-10-09 18:26   ` Greg Kroah-Hartman
2022-10-09 18:24 ` [PATCH 0/3] Case-insensitive match_string and fwnode_is_compatible() Greg Kroah-Hartman
2022-10-10  3:07   ` Soha Jin
2022-10-10  6:26     ` 'Greg Kroah-Hartman'
2022-10-10  7:40       ` Soha Jin
2022-10-10  6:23 ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y0O6kDQ9Bxi9jMfo@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=djrscally@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=soha@lohu.info \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®