Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp374106rwi; Mon, 10 Oct 2022 01:21:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6SIfgbc6n98Ne2+QB2fH7hio3FYvRPV8mJZLC9DwbIm46FwYa5tzsE2OaY3GhrrsW3FQFg X-Received: by 2002:a17:907:70c:b0:740:33f3:cbab with SMTP id xb12-20020a170907070c00b0074033f3cbabmr13902007ejb.600.1665390108190; Mon, 10 Oct 2022 01:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665390108; cv=none; d=google.com; s=arc-20160816; b=ctXsI/mSfPbW4iwtRFIGLpKChbo5iN80LVeRDeFw7IqT3t8TtilqXwUMXC8o15qEAQ ngTwmnzhCMkzMFXUVfw1XvsQlPlKmtDu2+4Tl5I07GB7oXYRFDDAQbFJlAr619lRtGMT YkgzG7iJ6kqiN/WtJlBwyYpOTHFLnrusBNlIoiSUL4m55x+GE1yhWpn6Yb5q+fQ4cySZ /XsNFNhRd7X3P8SKCqWQYIvAtfHWJ8UHn0savp7N7Vl40Qzbf1bVeCsBfC0LOGZazumx 2+9QjOsUcz2z2rQW8V5wKrsTB9AU7IMr+jyvAXgQdNL5581qwjplOqGs2ntuURKhsI30 K44w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from; bh=rLmARCnlyHEQIQtCTqTrAnbHsEiprAB40Ze1jeUL16E=; b=WMZfS3t/j/G2Q1msUrdU/mnWMLbCMi5X/lXRTx7O5g/LkZu67x0v3V+lM0/zsP3NJF fbf0ItbEvzd38Zn/ZrN56rqONgA0waszg6MCfj27IzuASlqDeVj44gXvrI+tFkHosFHC gCoBoQW8d6oKPs4VdbAiIWgbEezobU357exBjDH8RT9CaYL1i+jEXbNQDVpMqz7MLLJ/ ZqYp60Cth30KhLyouUVsrlgu0wJNSwx+w6Zn3ACxWRsMyx765dL3Vj4ja3W6mQoOaHBp yhqpbmxVpiBdcOoOF5B+8IOH98n6IVAYOPS/OsCpCsTDXbiJ5AdPgTdoCoaVYLkNgZuT yiPw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=lohu.info Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n3-20020a05640206c300b00457f138ed4asi8137090edy.378.2022.10.10.01.21.22; Mon, 10 Oct 2022 01:21:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=lohu.info Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbiJJHmF (ORCPT + 99 others); Mon, 10 Oct 2022 03:42:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbiJJHlP (ORCPT ); Mon, 10 Oct 2022 03:41:15 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.221.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8439218E3F; Mon, 10 Oct 2022 00:36:31 -0700 (PDT) X-QQ-mid: bizesmtpipv601t1665387382tp83 Received: from SJRobe ( [255.42.121.1]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 10 Oct 2022 15:36:20 +0800 (CST) X-QQ-SSF: 01100000000000G0Z000000A0000000 X-QQ-FEAT: +ynUkgUhZJmOErIScuxpTx/+0Yy0w+SE0SOStwMtyuLup+vynL+Az30prc0Ug +wzeVBNTlFUDbI3+TALPy/YBcuVY/smxl75x4UEFnR0MsE2NXAumFx73qIl2khhQxTN/R68 gbzUL+loxLJkv5p7OcNl+f9sVvmJCZnllcOarracExwPMgxYiYTJHBXXgHvTCBakJHbNeQw FGMFpx9ryMSI58IO42MT13wlNAV2K3UARp0CE0CLea4rjdUpvUceh+VyzQiZ1yeKBYu5EI2 t1i/mtz5QQAM3dO+0O8f/zwSwjEX0P56tFFX8tnk67RKp6fXSkXi1Wy4p9OJJEd3jm25+U3 ueyPI7Wc/fvBjBkbQyeWpDb/8IJR8wZSFH++CYDJekPX/p385KmZIjUAM9F1A== X-QQ-GoodBg: 0 From: "Soha Jin" To: "'Greg Kroah-Hartman'" , "'Andy Shevchenko'" , "'Rob Herring'" Cc: "'Rafael J. Wysocki'" , "'Daniel Scally'" , "'Heikki Krogerus'" , "'Sakari Ailus'" , , References: <20221009162155.1318-1-soha@lohu.info> <20221009162155.1318-2-soha@lohu.info> In-Reply-To: Subject: RE: [PATCH 1/3] string: add match_string_nocase() for case-insensitive match Date: Mon, 10 Oct 2022 15:36:17 +0800 Message-ID: <9963070D38F093DB+25d201d8dc7a$fca3e570$f5ebb050$@lohu.info> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJ3YxYd+FPcuiJVmWEOx+0wAFDAtAEC1QTIAidE924DQPre+AIsXv4YrIVsQLA= Content-Language: fr X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtpipv:lohu.info:qybglogicsvr:qybglogicsvr3 X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RCVD_ILLEGAL_IP, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Hi Greg and Andy, > From: 'Greg Kroah-Hartman' > Sent: Monday, October 10, 2022 2:24 PM > > > 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? My changeset will not break something, and make comparison case-sensitive does. Some old device firmwares that did not care about letter case might not function correctly in a newer kernel, because the current kernel checks compatibility case-insensitively and the former developer did not notice this with the just working kernel. > What needs this > new case-insensitive comparison that does not work today? > From: Andy Shevchenko > Sent: Monday, October 10, 2022 2:24 PM > > So, why do we have such in the OF code and do we really need it in the > modern world? Frankly speaking, I think case-insensitive comparison is not needed TODAY, and before I compose this change, I can see codes in kernel like this: of_device_is_compatible(np, "U4-pcie") || of_device_is_compatible(np, "u4-pcie") which means kernel codes is de facto case-sensitive, although this function calls `strcasecmp`. I do not know kernel maintainers' mind when I am composing this change, I just chose the way which will not break anything. Anyway, I am also glad to edit the patch to make it case-sensitive once maintainers have made the final decision. Regards, Soha