From patchwork Tue Oct 24 06:20:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157245 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747525vqx; Mon, 23 Oct 2023 23:21:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFS9MBYO9nnfuDLDztNZusDwK9NzYv0Hlpb8G6FL3fhFoamsUFZxTDqFbqJsLx4+z1nH290 X-Received: by 2002:a17:902:e746:b0:1c9:fb8e:2c33 with SMTP id p6-20020a170902e74600b001c9fb8e2c33mr11819660plf.7.1698128476525; Mon, 23 Oct 2023 23:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128476; cv=none; d=google.com; s=arc-20160816; b=R7+o/Zk9OqdO7e2tSqUksEJiJKbG8n0FAA52ZenY7zpntYxU11z0W5+RQOrI4l5s1X /m3uFeEO7CgT0cDnwJzZsGGBGeaeJJw4m4XAh/alZMFLM7B2c9rH6QKyDr7GOlPbSWa2 CebmJyQMcyuWuoBHbI1GWIReJ0YIjr4tclbFF3QIcaCEgcj9VpRr2wcbT35mX4pOXarN kwS4MGJ+4+CAWQZv5i3iBe9CVowadCEA25kTvGkh0oGxHB4cxJ4iweR+wnmXgYzjuBlu n9IJyU0QAeOnWpxV91AsymEDZLmXZeuPacNn6LN1vf3/nd/34OBwRhVHzLnslsFDdXJ2 uLHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=/KOIUeLYPS1VHTXFIS0x7AB2VmlFkZFSyne9FFVJXDE=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=YrCMv8xfKsuocDuB5YvxTi5cj1zh1f3bp2IVkhgGdIMdUFdhFbMUxPXgxPBNMpTAmC p3FHDo8isby9/cdEVrlOw+1HtJF5sAfFYj8WKY+mW0DOL0+0LI9cF3elJPRB7qHM+4VR OI4XwMv/wZXPjwwJxt1YM0zv7kkaAyiSRd/rTj+rrxi09ShywuUZcHKqlaknao5mSuRB vwKoWnw1RiFv6kwO4b0RsU0dMxP6JFSObKFubNigrqZbB/PAbJB058qwsacNUuEhO194 BRSeST+6MMRi7E5IZJAhC2G/QrVtyicJbTpXA/0tOTQRJDoIqLF8WTgYTC/x8xeooCDx ZO8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DyHv4prx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id x3-20020a170902ea8300b001c9ad30e4b8si7562555plb.320.2023.10.23.23.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=DyHv4prx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 36DB9802F70F; Mon, 23 Oct 2023 23:21:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232621AbjJXGUq (ORCPT + 27 others); Tue, 24 Oct 2023 02:20:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232609AbjJXGUo (ORCPT ); Tue, 24 Oct 2023 02:20:44 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC24DD; Mon, 23 Oct 2023 23:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128442; x=1729664442; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Kqxv9LhJ7k/94shFEad9R6LAGCDnjlnqdVEYRK8V/Ro=; b=DyHv4prx10Gih+J7BT8iuKyU6E2AOVdfNksaMjFwy98m+IBN3ZoCbF61 T95kLaV6RFoBhhF6ZRx+qISDald57B7Ubl9BkP/asUh8OZRLYD7SMClVY LIHHFmLAWiJDbmkwj8/b6Mdj5RKAW4JFuvw/mnvxkKXtHpdK5tg8WHXkL MKGVuRG+/wQjMeDzZxWUj/y4oQnr+Eh5ie4Rsgjbtpy/3D9mJXuQ6b3oj ip+9DQdLm1FeC7z4nQXZXN7Igp5fpcJM97yGNKdlmZwnOeToOdz694+u8 jRIQ9TpAaEW5hn8IDQ73cVlrbdxeJDunewDjpiSEbdekqeL4TXCv4MbtV Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806560" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806560" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:20:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891316" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891316" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:20:37 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, Jonathan.Cameron@Huawei.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 1/6] ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID Date: Tue, 24 Oct 2023 11:50:13 +0530 Message-Id: <20231024062018.23839-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 23:21:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616765148405929 X-GMAIL-MSGID: 1780616765148405929 Introduce acpi_dev_uid_match() helper that matches the device with supplied _UID string. Signed-off-by: Raag Jadav --- drivers/acpi/utils.c | 31 +++++++++++++++++++++++++++---- include/acpi/acpi_bus.h | 1 + include/linux/acpi.h | 5 +++++ 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index 79915d4a0031..be21b77059af 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -824,20 +824,43 @@ bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs) } EXPORT_SYMBOL(acpi_check_dsm); +/** + * acpi_dev_uid_match - Match device by supplied UID + * @adev: ACPI device to match. + * @uid2: Unique ID of the device. + * + * Matches UID in @adev with given @uid2. + * + * Returns: + * - %true if matches. + * - %false otherwise. + */ +bool acpi_dev_uid_match(struct acpi_device *adev, const char *uid2) +{ + const char *uid1 = acpi_device_uid(adev); + + return uid1 && uid2 && !strcmp(uid1, uid2); +} +EXPORT_SYMBOL_GPL(acpi_dev_uid_match); + /** * acpi_dev_hid_uid_match - Match device by supplied HID and UID * @adev: ACPI device to match. * @hid2: Hardware ID of the device. * @uid2: Unique ID of the device, pass NULL to not check _UID. * - * Matches HID and UID in @adev with given @hid2 and @uid2. - * Returns true if matches. + * Matches HID and UID in @adev with given @hid2 and @uid2. Absence of @uid2 + * will be treated as a match. If user wants to validate @uid2, it should be + * done before calling this function. + * + * Returns: + * - %true if matches or @uid2 is NULL. + * - %false otherwise. */ bool acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2) { const char *hid1 = acpi_device_hid(adev); - const char *uid1 = acpi_device_uid(adev); if (strcmp(hid1, hid2)) return false; @@ -845,7 +868,7 @@ bool acpi_dev_hid_uid_match(struct acpi_device *adev, if (!uid2) return true; - return uid1 && !strcmp(uid1, uid2); + return acpi_dev_uid_match(adev, uid2); } EXPORT_SYMBOL(acpi_dev_hid_uid_match); diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 756b3f3c2c45..afeed6e72049 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -763,6 +763,7 @@ static inline bool acpi_device_can_poweroff(struct acpi_device *adev) adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set); } +bool acpi_dev_uid_match(struct acpi_device *adev, const char *uid2); bool acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2); int acpi_dev_uid_to_integer(struct acpi_device *adev, u64 *integer); diff --git a/include/linux/acpi.h b/include/linux/acpi.h index afd94c9b8b8a..db3a33e19c97 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -787,6 +787,11 @@ static inline bool acpi_dev_present(const char *hid, const char *uid, s64 hrv) struct acpi_device; +static inline bool acpi_dev_uid_match(struct acpi_device *adev, const char *uid2) +{ + return false; +} + static inline bool acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2) { From patchwork Tue Oct 24 06:20:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157246 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747530vqx; Mon, 23 Oct 2023 23:21:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+nBMz0zPY9N08wSxB/wuBNP0TIstWqfSc3UpyzyknB34ekuWKLsNkP+zA7UFC04+nimlk X-Received: by 2002:aca:1003:0:b0:3b2:e219:5518 with SMTP id 3-20020aca1003000000b003b2e2195518mr11172612oiq.11.1698128477329; Mon, 23 Oct 2023 23:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128477; cv=none; d=google.com; s=arc-20160816; b=IBwW3gsac43hyJyL3NmsdQa/4MeKRhh15d7M68ir/iB8vQxZIpKdKd/31j6DsjrRm1 dtF7sPfZyrxkL/eFolvV72WQcVbqKd++MP2kwUo2xzG1CRiQdYcpLdVjurfaDpeGSGne so0N9tI1rxfID8Stq7qyAjhNowUnglLo1BkjJH8dn6Uyxd9UXK7xYOZ63ibuT902KwbZ H3asJR1lWVOKiJBmL1fWY6P0Ef0al7pewBEhAIgtOzfOa0G6U66pMetZwwFJEQ1QPR2o xu5RLYZ5pRJuCaEi1qi7mWzbcJCSy6Q2KFB+vlIdBYu3/lUul04JefypxP/l413UHtxr TJjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=IuCjHBT5+hOPHghBeu3I9tIBhEprTxPg8/wH4Z4JyLg=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=Nc5MGi+HEYp9gZrWo+iriWKI0VeWTCHDOuouvjeM/hbCafMxQuK1dRIgQLPkcEDlrp VJWw/51Qsvs9rHGwrPqgnvr1zJsjJIJv1YtCunHoCWKceh2MAM9/Z1RVXd/0333nJyYE PTDQXoszrOPbC1qGK/Z204Mirox1TazN5BZyBE+u+1IyMPKXssIj3WHkPRa1d7w2CW1Q //2FJbklUPrcFaKUFuyQe24COkbvm7LKT+b/0PNVFHheSe4ACbxKncF+UHB+bXYSLfRP haR44vBMFrqvtqFVgO9xt0pmAFR2kNF0FYBS9my8hzJDtwRmiy6ClCb/4mM/QYef1Wky znHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BV8DmNoZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r18-20020a638f52000000b005b8615b9fe6si7697484pgn.287.2023.10.23.23.21.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BV8DmNoZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2B048802F703; Mon, 23 Oct 2023 23:21:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232653AbjJXGUw (ORCPT + 27 others); Tue, 24 Oct 2023 02:20:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232632AbjJXGUt (ORCPT ); Tue, 24 Oct 2023 02:20:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C240010C6; Mon, 23 Oct 2023 23:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128447; x=1729664447; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Dcfv80fwqkTrnHzYXDt90mV7PVNibcyla57Py1ydYHw=; b=BV8DmNoZSZ19E1ujlr+ztnYRbBDvizESX7F32YxbVnfeD3YmUuSBrK93 ehlUGSKkf3/AvyrcPC7Y4ougAdd53IUMFQpiC/2eL/ckdPsIO2V11WNVl X+ULzt01R8hWl+wzWW3rlp9a/XMzyQo4J2A94NgtkraU7kEu1g86rW5Va vW1EO90hEGtpk3dioSlOrIgNfkFAPd+2wCYCOUlEa3zJ6o39Hx8GjIUOk n959oSPJ6OsPTbIEmv28Sh2EwvxkovySMpRbITa0O+xwGI307FoVwXxZK Pc3UAS7zSLgCuhLwZ3eHFuRg1WRV91xuPv/fGv3HvX27QwT3b5dqLpIFH g==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806564" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806564" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:20:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891335" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891335" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:20:42 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, Jonathan.Cameron@Huawei.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 2/6] pinctrl: intel: use acpi_dev_uid_match() for matching _UID Date: Tue, 24 Oct 2023 11:50:14 +0530 Message-Id: <20231024062018.23839-3-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 23:21:15 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616766553052762 X-GMAIL-MSGID: 1780616766553052762 Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav --- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 3be04ab760d3..999f453344d2 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1694,7 +1694,7 @@ const struct intel_pinctrl_soc_data *intel_pinctrl_get_soc_data(struct platform_ unsigned int i; for (i = 0; table[i]; i++) { - if (!strcmp(adev->pnp.unique_id, table[i]->uid)) { + if (acpi_dev_uid_match(adev, table[i]->uid)) { data = table[i]; break; } From patchwork Tue Oct 24 06:20:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157247 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747576vqx; Mon, 23 Oct 2023 23:21:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEvTC3QfBXdLEsIQoXC4xpQ8cmecDrUmy8QG7ObigifEoiQcYcN8wUDenz+W95JLSq+1gi X-Received: by 2002:a05:6a20:258f:b0:172:83b8:67f7 with SMTP id k15-20020a056a20258f00b0017283b867f7mr1798505pzd.44.1698128482117; Mon, 23 Oct 2023 23:21:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128482; cv=none; d=google.com; s=arc-20160816; b=FdYLu53DYQc5Li2NBr4qx8YIdP1IVnRBjiSQoLbfntd+MIuyNm9aGPJjBw41HBuc26 qBaAVA/GpCTJEl2bGvvOoR5QLL1JIulOXk14f/QJIHPGIqJt2P6OQWOj++DcikDGjV9z NALQxZ1GDsbs2e/m4+/8X+rQeeHgKTcy50PpsTAEmz1edvLwY/n6N1bobKjBxQiZvyAo bEG8Gvz0pprnEef8Q2tzOnQe+iNIqK0tFHrrM70sWT85SBVMu7Cc5C28ZzNAAIFOijVw eMBCojN9stLDhP1HuzuUnoqvkjYCyAcyYVAHds4viGfoBMzgTU2emvwAJBPrL2xzUdUg 5jug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=g0RPfZRiNJr1w2eR6dps+HxVja8sTc08ENu7GkGX2sY=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=YqZfwmdSiywcse4b+eiqydqBNvS1te2O856b3CXWhjMC9SAaeNFGMJ5dLg8bCo2u96 sw8biyf5/m1G2JK37QB4S1ujgjNfMiIF0Pw2dYLyvqag2jxmmWMpkfqEoNxg2dZJqwMn Oa1WdBg4aiOsekm3ssBUmr1BqzWX0Z7jWYrlxNJb6LFUmdZsgWFqDK7DefXZ17pBjO+h VsNxcq9gJ6btrQfc0lw/LDYGyDYqE7Ea7oGMmK+5cywtpoVfBXsdLBEu0vweah8UW1fZ iZrpHyFYbZEtGOKqhkBVxEn17RSJZDQR8+ZefqjZbl6QJuXqsRrQU84fYQSJZTSmb3UQ JNjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IlROYcq5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id t4-20020a63f344000000b00563de199314si7962418pgj.896.2023.10.23.23.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IlROYcq5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 6EE07802F710; Mon, 23 Oct 2023 23:21:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232667AbjJXGU6 (ORCPT + 27 others); Tue, 24 Oct 2023 02:20:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232641AbjJXGUz (ORCPT ); Tue, 24 Oct 2023 02:20:55 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31B510C9; Mon, 23 Oct 2023 23:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128452; x=1729664452; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ozdZnaBJZ2vqKdOuWyOWr4NX6JLrJWxExqsMlsM/PrM=; b=IlROYcq50+jtDybwrbvMZ6DJQAAoxA8hoan2f2XuJkwOLJhp1HbEDzgK DWxbG17JspBVze4BQvra9eDSl4nm9UDBlufhmBPEEcnmR21x2QwEJXUsw EBmDB02/wrDG8kEqRocG84kv3QerdTuftjrZUI0WAuE7F7IvouH5HLZbJ o3yeJ8U1jBp1aB0l7TzgcxRdtfxar2LV2AyvfMfCrx52gYzJ2NJjYP7RO y2uFFhM26lQ5t7WT6ZGAVMiP5zSlbsBU2BXnV1BTSsTZfWaacVIP05PPn S9vcKlasPgF0bO+DA7lmU1vonXyGk9ucA84bGbdSqnjoYjZZGC5bHZL/X g==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806579" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806579" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:20:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891383" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891383" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:20:47 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, Jonathan.Cameron@Huawei.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 3/6] ACPI: utils: use acpi_dev_uid_match() for matching _UID Date: Tue, 24 Oct 2023 11:50:15 +0530 Message-Id: <20231024062018.23839-4-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 23:21:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616771384965830 X-GMAIL-MSGID: 1780616771384965830 Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav --- drivers/acpi/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index be21b77059af..28c75242fca9 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c @@ -942,8 +942,7 @@ static int acpi_dev_match_cb(struct device *dev, const void *data) if (acpi_match_device_ids(adev, match->hid)) return 0; - if (match->uid && (!adev->pnp.unique_id || - strcmp(adev->pnp.unique_id, match->uid))) + if (match->uid && !acpi_dev_uid_match(adev, match->uid)) return 0; if (match->hrv == -1) From patchwork Tue Oct 24 06:20:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747682vqx; Mon, 23 Oct 2023 23:21:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE0SIS3BS2TWC+HhmNLsHZtKcsbRWD4Tw/RKbOKf1AwOHr4cJBcHUSCn3i9fBWMVAu8YF8X X-Received: by 2002:a05:6808:2a51:b0:3a7:2390:3583 with SMTP id fa17-20020a0568082a5100b003a723903583mr10692830oib.38.1698128500339; Mon, 23 Oct 2023 23:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128500; cv=none; d=google.com; s=arc-20160816; b=U0Iin8nc1AgPWV1q0KIkcCW3jbgiRQ/a3/Te+xGj8s4uCFageouel1ACJY0I/7QBXU DI2TaAClhLFDBdu8ApBx1qLS9SOos8z/Zo5Y+nqKC/4R/9AfeGK5kgAjgr4EpsDHKVxD Oyte7ESsSqYusMXfvP86DFF/Zx449R5mgYr743k0bBYXNyioFy93nPjkZzrLoqTvXZWp ENfxYyhilOBjLI0/kUUl25TfyrvQrSggbukYm6prHsIxZXugRRoKFwOyCzzjALjU4AFR 6YwBnwBE2u0o+ECc9M91dtcikDs5jgiDwd3Rvvs/AwoMEulaDQPyPN4asNTtt/0Zdm7Q m9CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=+X+T5ecjQXQJuqkag6rthfeUxUUP1ubaQnWo0ElooTg=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=nHVXv/OKoYCnSbHKQJxX7smw3kZr9zqXUkTBip7hELA+rB90zr1kk04WbEk/JBLacU wlG14UBFMntmEVNk+wCj1cHhjT7tLXKTPE3O47tU8yW4ia7UBn9gkuXEnMW9urSQ1212 YG1CJ5I0fIrY8IeJrsnYnsiosYBNhJSqlZTh6RM5s7GMF9UAHfl7aKQVGRpk0mMGhU6S XI5K/FiDsUhp0khoyqpTF+Ni+FGPNeooTGJzgVjKPITS84yKL+wDk9tKdSjfCcGJHHGK /8NpZcSkorS2nGTwYaqdcU7BTUUkyHYTtPSeOJFqDV8WsmeM9PEAXPnxXoE3MxM+DyAr 2Z6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hurdb5l5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id o8-20020a635a08000000b00565eb0b2e66si8070846pgb.864.2023.10.23.23.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hurdb5l5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 643BB802F689; Mon, 23 Oct 2023 23:21:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233121AbjJXGVQ (ORCPT + 27 others); Tue, 24 Oct 2023 02:21:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232925AbjJXGVI (ORCPT ); Tue, 24 Oct 2023 02:21:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 100F110FE; Mon, 23 Oct 2023 23:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128458; x=1729664458; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=Fp+mcUvbUBGqwzFxRStIIQ/F0gyMOztw8zWtT91yBSs=; b=hurdb5l5qTkiEpBXwWbakMlPkEq0sD+F3JSNpq8lJWeqWOMpsc1fJVNN 5dGADgUMFIDfQcTnDPypXelIpLJpBjeb3ojAcuoqdULZTEOA8wWU9twLe /QjjJE6V3wVssA9LWmJFmqpVrLe/iYDBUEwzRoaGHp6oZJLka5wH91aNs uaCE+1vihonBhpgTxUbNwnjxGWVFzlloGBu6FXLCWkWFnsXOqrfe1YKyp k/FJoTIsQTNAj5V2aEpG6UL5D1IYB8H7u84WMBiUQrZhyt/0SwV4RVQUY zpRFLXNrJJEG5t5NpfAdrulmWHb4+6vN/x3+2N7RzMePXBe9rGdftKrzB Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806592" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806592" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:20:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891416" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891416" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:20:52 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, Jonathan.Cameron@Huawei.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 4/6] ACPI: x86: use acpi_dev_uid_match() for matching _UID Date: Tue, 24 Oct 2023 11:50:16 +0530 Message-Id: <20231024062018.23839-5-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 23 Oct 2023 23:21:37 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616790583978566 X-GMAIL-MSGID: 1780616790583978566 Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav --- drivers/acpi/x86/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c index 63d834dd3811..bc65ebfcdf76 100644 --- a/drivers/acpi/x86/utils.c +++ b/drivers/acpi/x86/utils.c @@ -184,8 +184,7 @@ bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *s if (acpi_match_device_ids(adev, override_status_ids[i].hid)) continue; - if (!adev->pnp.unique_id || - strcmp(adev->pnp.unique_id, override_status_ids[i].uid)) + if (!acpi_dev_uid_match(adev, override_status_ids[i].uid)) continue; } From patchwork Tue Oct 24 06:20:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157248 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747603vqx; Mon, 23 Oct 2023 23:21:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH8OuuxTRZybGpJtqAdpAbJGQLuaD3sEDxmZqoWzykjpqefdQywkw0lOStnUXZfSRr8M/IE X-Received: by 2002:a17:903:2342:b0:1ca:e7f9:a49b with SMTP id c2-20020a170903234200b001cae7f9a49bmr6148153plh.23.1698128486252; Mon, 23 Oct 2023 23:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128486; cv=none; d=google.com; s=arc-20160816; b=YMVBzbclmhGQA25+DHc3tV6AU7aQvUmGcijs6L4Mf/yTW1V1ml5GYM4zX3HLXqE868 PxyMw25m0I0zSh65h3Zv8Ecpa12WQfjXXK1zkEPZ3YCOKXAzJq2RjkoNv8I/Bsfy94BX EnYvp06o4u00GAI654Sd7ecNUSSaRcJNwowS01FMmQ2k0Hz1cRbeQ+uDJDOj/a4cyEPv L2XAs0X0urC3wkeaZnDEOFyoS/O+4K5Qaaf9xgV095OrGZWyzAefxEaDxKQJbMgJUHgk wkBxTiD+5ENE+ra/yA7/ZYBNSkc0pwA5uEuDLsKtXwdV66Fj9BuabBUa+7xtoreyfoxH irwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=/uG3Q5lM+p6ucBILyCOrQLnu0ByvCA+27+HTc2ZIGIU=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=zLbIzApVj44U7Mil2imgmncILfYqzGog42YVzbQa7PL4Fr3onSQv+JE30AKFMhp0ya qsus+uwQqPBzzGQDGl0TGgYdeDFpG8hqa2o/VZUaTDBb1HuDYDVGRS/+U3VP2hmERNDe YzxfaByabP9g0o6963qs96WqvGlrQL8O/95QvPoxfy4IpdzkeM42qbkuoMQ4IkPljqGP g/lqqW2CBjRU/8bRX76k76mbBaH6mA0+VcRR4p3GKh/EQkUrtlqwvMhemw7GPMp8Vd0P SX809lG1ildNAKRbPUhdjuEaZSV9VixTzx2MGkPH07D5ThGmAvjGJpc2o4IP7GDiwIN4 I/Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mqNVFclk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p3-20020a170902a40300b001c5c344a425si7700337plq.418.2023.10.23.23.21.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=mqNVFclk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 87CC2809D3CA; Mon, 23 Oct 2023 23:21:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233443AbjJXGVW (ORCPT + 27 others); Tue, 24 Oct 2023 02:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232771AbjJXGVN (ORCPT ); Tue, 24 Oct 2023 02:21:13 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B788210C0; Mon, 23 Oct 2023 23:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128463; x=1729664463; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=iUljf5QPUJwxYR0tI8SM3GVeSDgYpl24Lk1AfcVvgFI=; b=mqNVFclkGcPzcV4lkF2hf6BzlkrKodmpjy49USEBu6N2S7P02mpveLee hNB9bRSIg1gwgKFip6Fq31YpDPCiE4gtQeoMZYZjosBNK4HwQ7ADXiOs5 m7nBtYHgkzk0vLfd/966Ce0yhcTHYd7f1F2ihET5AhoO/N5LG/awiEWwL pSck4m2yBOqLW91oJ4+6XROnjM02vLSX0FtPbPdEwICO3/+88XnJG67YS JH0iWvIPvTzqwS9xvN+F7vLzzguj+ONiPjWj1Ea82BSG2H+mdIY1OQjGf /6lfvPqyZLp3U7Xb8sZoPwRtkjzGZ4UDP3q4rSpMlkcRYvhfHSERajGhQ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806606" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806606" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:21:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891457" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891457" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:20:57 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, Jonathan.Cameron@Huawei.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 5/6] hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Tue, 24 Oct 2023 11:50:17 +0530 Message-Id: <20231024062018.23839-6-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-1-raag.jadav@intel.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 23 Oct 2023 23:21:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616775683445248 X-GMAIL-MSGID: 1780616775683445248 Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav --- drivers/hwmon/nct6775-platform.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c index 81bf03dad6bb..0adeeab7ee03 100644 --- a/drivers/hwmon/nct6775-platform.c +++ b/drivers/hwmon/nct6775-platform.c @@ -1465,10 +1465,8 @@ static const char * const asus_msi_boards[] = { static int nct6775_asuswmi_device_match(struct device *dev, void *data) { struct acpi_device *adev = to_acpi_device(dev); - const char *uid = acpi_device_uid(adev); - const char *hid = acpi_device_hid(adev); - if (hid && !strcmp(hid, ASUSWMI_DEVICE_HID) && uid && !strcmp(uid, data)) { + if (acpi_dev_hid_uid_match(adev, ASUSWMI_DEVICE_HID, data)) { asus_acpi_dev = adev; return 1; } From patchwork Tue Oct 24 06:20:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 157250 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1747700vqx; Mon, 23 Oct 2023 23:21:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/4ZE+XCcZzOWE2d3OJAwFFEmV9ZzT9MbWlBy/VPwSAGuJW5V3jhZ54cn6DuhHxYBGXeHd X-Received: by 2002:a05:6808:157:b0:39c:59e2:dd79 with SMTP id h23-20020a056808015700b0039c59e2dd79mr13070500oie.36.1698128504104; Mon, 23 Oct 2023 23:21:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698128504; cv=none; d=google.com; s=arc-20160816; b=pgruFwyWOQbGltBMyu9tQi/UkRHotbC8vb+4FMc2tPsi/vjv1Eua90WUwY0BasohLL P9Q718NxdAXrioOY2c41w07cz9ETgxZnNrF5PVDeUJqgf65uFrf9pZ5nczImalieI9S6 I0p7z+s00rMAji//JiFBRPI4u8CP1z7w9ku1sDisJ+gMk+pS21uyuetKjfqdeguWeXK7 XsLFL6cm1BxRwC7v5R7LipJpOSoWcjJ3h1ngoj5jfjrDlpzEd68IZWs9KWMEI3yWmhiB C181tHXHhIxHfdUEhp37LsjatqhKUAIiNcvcrFAhyhCTdMSQtzvXCfqtbAoWCk05H29A /VDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=BipjbGvEMxr0UGYoY5tgoOfYeRH4lM7X8HJ4Q3ZbXdU=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=HQbFwHeuoy5SxfqFEZlSbpscPeLRgVAQ0ugd4AMY3VxUZzMhbtIfixW0XEqAdhgrOb QRYMbiqslynmGySbGcyWqDFb2Ts6pu9AafgxEQy9LZfBry0bYDfgw99rOuDjANdCK9zk zneTzkDCU6bG+mEefApfwQDc8VsgpNVvlwsLJ/EzT/TBI41vp8wf2OGPLEI82AxVOAza WcAcCYKolEUKkF/ONUzFnoOevFHyxQM25A/Pgnl09IV18CB7r7gYixwEShTsFfUizA9V O3nN0wz2JpXkD8WVccjc1AbTm90eL7erPJbN+BzhSynQGWWO3eMcP4lAojVCNmqRWO1e GvuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=miF0FbPh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c15-20020a63da0f000000b005a0737404a7si8217867pgh.258.2023.10.23.23.21.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 23:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=miF0FbPh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 0F447807405C; Mon, 23 Oct 2023 23:21:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232743AbjJXGVe (ORCPT + 27 others); Tue, 24 Oct 2023 02:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232753AbjJXGVT (ORCPT ); Tue, 24 Oct 2023 02:21:19 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EDEC198D; Mon, 23 Oct 2023 23:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698128468; x=1729664468; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3yrAjMBirTIUAhTanyYbEMtK/J+a0HZi5Xr6F7vjCTw=; b=miF0FbPhdv5nYzlLy0kqL4U9Ht1eIN9TUbxeWYzWUAj8NLBbubmAtYd0 tqdC7qcyQyF0PKiOECZWaqWEYhGAFdcFMDv9jvX11U2723r87V1XM+QYR yRPjVHL/ifs2bQ5y1p926bgZyC8G6tX95D2SRf2+NK38c+5cnvXkSJ+2A JGRTG3blE1fgLt8G8BG7gTDYnVF3znaL7kNHtJPjOfHRVFoS5uq2cFBJx ABUi4KN7fAdQelCFfZN0azsvBgDjOg3NnlyG7CUvF74lWlMkrXO6RYDQY YJsW3FzXaO4O1BlYxn2WSm8rhMC81azS9rExPUYhWWV8OF14QmIBj0aiX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="386806618" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="386806618" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Oct 2023 23:21:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10872"; a="751891479" X-IronPort-AV: E=Sophos;i="6.03,246,1694761200"; d="scan'208";a="751891479" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga007.jf.intel.com with ESMTP; 23 Oct 2023 23:21:03 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, Jonathan.Cameron@Huawei.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 6/6] perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Tue, 24 Oct 2023 11:50:18 +0530 Message-Id: <20231024062018.23839-7-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231024062018.23839-1-raag.jadav@intel.com> References: <20231024062018.23839-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 23 Oct 2023 23:21:42 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780616794341085294 X-GMAIL-MSGID: 1780616794341085294 Convert manual _UID references to use the standard ACPI helpers. Signed-off-by: Raag Jadav --- drivers/perf/arm_cspmu/arm_cspmu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c index e2b7827c4563..f0e6d14281d6 100644 --- a/drivers/perf/arm_cspmu/arm_cspmu.c +++ b/drivers/perf/arm_cspmu/arm_cspmu.c @@ -1061,7 +1061,7 @@ static int arm_cspmu_request_irq(struct arm_cspmu *cspmu) static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) { - u32 acpi_uid; + u64 acpi_uid; struct device *cpu_dev; struct acpi_device *acpi_dev; @@ -1071,10 +1071,8 @@ static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid) acpi_dev = ACPI_COMPANION(cpu_dev); while (acpi_dev) { - if (!strcmp(acpi_device_hid(acpi_dev), - ACPI_PROCESSOR_CONTAINER_HID) && - !kstrtouint(acpi_device_uid(acpi_dev), 0, &acpi_uid) && - acpi_uid == container_uid) + if (acpi_dev_hid_uid_match(acpi_dev, ACPI_PROCESSOR_CONTAINER_HID, NULL) && + !acpi_dev_uid_to_integer(acpi_dev, &acpi_uid) && acpi_uid == container_uid) return 0; acpi_dev = acpi_dev_parent(acpi_dev);