Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3700708rwb; Sun, 9 Oct 2022 09:29:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uLRysJacPIMsNvm3lnRNLRsZ8lSyCZGzKVVSffSfg0ZwN71Rix1hsHAIQIHS7EadKX5d7 X-Received: by 2002:a17:906:7055:b0:78b:9148:6b41 with SMTP id r21-20020a170906705500b0078b91486b41mr11511742ejj.629.1665332968253; Sun, 09 Oct 2022 09:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665332968; cv=none; d=google.com; s=arc-20160816; b=g/1jQ0NfIFFLbWP7PxW+Tvb7NwQoSg/OyYv17enhaLR+tzi/83HKXxeIRTC0iR4a4Z +urLP0C3awtPGFXN2j+SzchJuDY7sOzfLK63bnN9YVdYTTllmG4jbNbvfwR9lPH9Qu67 pwDibCFkwKg0Zku97mBevwJVKCD6ee5GETwS3/RLzKlc8ai6m7Bp9cUPC7C1di2xrbui t99TArKXYT+GQ83n7EwutiIrOXFcoXekT5pWeYZE+zTgo2c4TrzE2d4SShb2Vx8M+ka0 pIALBJfRJqRd86iMK8W3BZz+ajoHc1pFpW3uhbFz4hXrkiK6Hl2Fij8ZHHOsRDSXX33i aPAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=6TJJz9lymzLQFADHUzJo4bIo/rNjg6BSfLjvT4yLvbU=; b=r9+ovPMNM2eZwYOUMsXMW+MZcUSn2+sIu9G0niOFEc9Sq8/IJLxb2Bn3RT/fbc/CHw aGXpeTvBC1GIn2IRDDHyBh+JBfAk/vrEDZ/7CNnGI5zwJYULYZsIohwRt/UkOpVxpwWE CvGkJ+qc4kCS/qShlbhr1OsM9RMVJL4es+r2vPDhtxR8x8DNjBhpoYkWGhbieXU7ri/K nhpO74XBPLV5p0soxMbQK2BspoQ5j7GOvP8vXWgLiKRV876UCFmF40HL5jOBA5nPv7AP u6xCS+u6qVsigZKuSXWFgQEYJU8a419QukVfac0xTPirfXo6t8/jw4lmNw7fAsIVbQ0J HBZw== 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 dd17-20020a1709069b9100b00781b6ce15e1si7927631ejc.101.2022.10.09.09.29.02; Sun, 09 Oct 2022 09:29:28 -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 S230127AbiJIQWv (ORCPT + 99 others); Sun, 9 Oct 2022 12:22:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbiJIQWo (ORCPT ); Sun, 9 Oct 2022 12:22:44 -0400 Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.155.67.158]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D6E275FD for ; Sun, 9 Oct 2022 09:22:42 -0700 (PDT) X-QQ-mid: bizesmtp63t1665332545tg35vcz9 Received: from localhost.localdomain ( [58.247.70.42]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 10 Oct 2022 00:22:18 +0800 (CST) X-QQ-SSF: 01100000002000G0Z000B00A0000000 X-QQ-FEAT: DoD8xN2rKozHQmBqd9LmJAE/V3dv05ZHImZ5xKfTLc1VocmPYmpKo4QlQsheE OyZJL84jjHBGKcRPR6jT54Kb5KyCiqdUQL8gLRQfFFd5Ih+IA0WAvoi2haKK2HvaheaMOfS Gl3k5Rmk4oMKHRTPX1+U03xPnK5tlW8fw08Tk3nTxG+RoJ7QDk+coAn/+mKZgI+Gq0qXYsv HJgqwU9ea9FOCuoOOvHxHnsY5dhrPw1BBxNMid7EpRXKpnlM9KHAuwMWxt2dIlfMWnmqku+ jp1eFfur0XzAjJ5aV2viU9ndrr6CkJW7lYTxwhktrSAyydGEE32ttRFZlYORZQvZMJx2ZAi MToX6H8AQCw7xPyYf5rZGpQAcp7VtrXGiKve7sC7qj3MuytKrI= X-QQ-GoodBg: 0 From: Soha Jin To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , linux-kernel@vger.kernel.org, Soha Jin Subject: [PATCH 0/3] Case-insensitive match_string and fwnode_is_compatible() Date: Mon, 10 Oct 2022 00:21:52 +0800 Message-Id: <20221009162155.1318-1-soha@lohu.info> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:lohu.info:qybglogicsvr:qybglogicsvr3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 I am introducing these patches for the patch for ethernet driver which I will send later. In Patch 1, I abstract `match_string` to `__match_string` with a comparison function, make the original name calling it with `strcmp` and add `match_string_nocase` calling it with `strcasecmp`. In Patch 2 & 3, I implement `{device,fwnode}_property_match_string_nocase` and `fwnode_is_compatible` for compatible property matching. Soha Jin (3): string: add match_string_nocase() for case-insensitive match device property: add {device,fwnode}_property_match_string_nocase() device property: add fwnode_is_compatible() for compatible match drivers/base/property.c | 92 ++++++++++++++++++++++++++++++++-------- include/linux/property.h | 13 ++++++ include/linux/string.h | 31 +++++++++++++- lib/string_helpers.c | 10 +++-- 4 files changed, 123 insertions(+), 23 deletions(-) -- 2.30.2