Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp295618rwi; Sun, 9 Oct 2022 23:47:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5NmDe6ZtQqOgSi88kpN0d6u6hCHyNgHWSXOG7eV3MtSwqA1KyeoovK5ZosDeHEYraaf+eg X-Received: by 2002:a17:907:a43:b0:77b:ba98:d2f with SMTP id be3-20020a1709070a4300b0077bba980d2fmr13432217ejc.270.1665384465138; Sun, 09 Oct 2022 23:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665384465; cv=none; d=google.com; s=arc-20160816; b=hOXOA91NiLWShPSUmMUZjvgd+ovoOwXEGyvB/MV5CAc9TtiG/mtNddEemOIV6Juviw BZMLlK7B1WBCJhsGwveD6hQt3aKkCxJekphHBiIZ9Im1bjACskdokfCkToptIByskX+D nRfapcykshBVrEtWL0TrGNBLgedMgkSTa89EbDDeA4zzrXWIjNCCPz7zx5xewzFIPrXy 1zLLjaGsWs0v3rN5r20kt7n9pK6hFqwKCaGRJMqAP2ZonQ5YiezABioBQjXgFKPVsKJg 7/cPa1uVi9iwJh0pBR/wLN/MoFW3XQ+cBEVwuHxYzSTtptl/Neq7ZD9O6qmoRjy9ng7y QW3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=96jIQMjsnqoXaIJSJYDCrNCp4jMwzk9L/fI3AKrgBps=; b=cukYRvLCeoWgA2pZhkaljRTmR2U1Qir2NU1coSxtQjU9cKaSqu2rN0lR8XrxCdqvQn jzH7oDkCy+xFBTrl3KC2ZCuTVtETpW3klhB8tGPhV1LOCQovH/IyBM+hsm6YEnuBzU3C 2K7da+bWTq39I1uNm+mhdJu6iwfv+ThdwEuqAWetJ0uTajq0oU/kggLD3socLweM39PJ 25FI+f2gmbD50kGu1SAez4iJr3++/ZRorcRnm+AxMZxPHv2mGdgftLAAHj1LoMEQWClN l+tpKzewPJW1HlsDdDLLGF5smUJvQHk9oNL2FmmBQL6GYVZIUWpJRS5ernqLGliNk0LO UVhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nfnZKNfD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn14-20020a1709070d0e00b0078db3ce1e59si3296260ejc.38.2022.10.09.23.47.18; Sun, 09 Oct 2022 23:47:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nfnZKNfD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231534AbiJJGXh (ORCPT + 99 others); Mon, 10 Oct 2022 02:23:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbiJJGXf (ORCPT ); Mon, 10 Oct 2022 02:23:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C7EA54CA3 for ; Sun, 9 Oct 2022 23:23:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ACF1B60DD5 for ; Mon, 10 Oct 2022 06:23:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB1C8C433C1; Mon, 10 Oct 2022 06:23:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1665383013; bh=v+/fx3CHymza6Mrw9mp7QVZMVSEPEAO3TCCmsNiSOQQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nfnZKNfDMgCPXqCIjpMS7Cx0CT97sHXMS2KLZmBJoM4GICoPp/cvNz/VsJuKQVyUz V51nrHHN2jpjRDR8UhssP07zr2R45/deMOUgQFgH2JinrXq/1sgm05vpIiRu1LcBpy yAxsFQ7Mm33HT+BrAK67dfRz1eb30jfes5F1tDq0= Date: Mon, 10 Oct 2022 08:24:16 +0200 From: 'Greg Kroah-Hartman' To: Soha Jin Cc: "'Rafael J. Wysocki'" , 'Andy Shevchenko' , 'Daniel Scally' , 'Heikki Krogerus' , 'Sakari Ailus' , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] string: add match_string_nocase() for case-insensitive match Message-ID: References: <20221009162155.1318-1-soha@lohu.info> <20221009162155.1318-2-soha@lohu.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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