From patchwork Mon Oct 23 05:35:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156666 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090326vqx; Sun, 22 Oct 2023 22:36:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFi6BGXrqLU7iieeiETveIXr1fGFMY1aZxK5EQN4sRbCiQhhkUc8as/OJqHXQXNHnwFhNgx X-Received: by 2002:a05:6808:a1b:b0:3a4:225f:a15b with SMTP id n27-20020a0568080a1b00b003a4225fa15bmr8770957oij.31.1698039409004; Sun, 22 Oct 2023 22:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039408; cv=none; d=google.com; s=arc-20160816; b=Fi6xFNyJJJQVh7gzWxsn3cSovILOj0k3BRvzYepwb/SNNXMQcIf/DtJdjk9BcCbOtO azg7eER6St60OfFiQdAN2WjWybNCJ5OKK7lEZStXuumVIqyqagvbjyOjs/Za9DuZRbup YnCXuhEpk65HoDPcwqRzOsoDPFZx3LtVy5sdFPfrBuubdUz/T0ajKw7TE1jPYd4m9hNb IgASpkR414tlL8yD6uzfxRNgdHEEzbflBpfnKKf9abFZsC0UtBLUYbBcA2XUn1yPV13v XAH4ruJvFVf7+z4C3Nb/mUai1BWFRnlrKoXSYlWIFAGlNiJfCIofypmSL8ATJrJWXdCt X0Rw== 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=SjS9S8NnaVme7XGcirswhT2unTIEYlBoOjv31ot9G50=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=f9xxi2XunTwOgVw0dGgv/lNFD/su5j17Ef1pvqkOrOjW5ZVlqKTLK5JoE6CDqfA0PJ b5kJxHdnJpmKYOqX9WzjRoY9SyIz34ydgR4km46ne5HrKUyruqK23J3AluPGdzpk4CfI qn37z/2hcz6dcGBWES6e5uqn2InEiwRWrKGmMIqO/BkX9z3CwzPJdQnPfYh0VgT2O8SL DeZN6GX8naqXg1IjUz26cxaKIcgUtg5Q3u2CcuSotQ9N5NThmEzD2XSt41H104vVtFJH ijr83PvBqB/HwIUn7wOLBvHD2fgV89wtwa59AcVFaVKcpQU4Lm5+Iuw9iip9DYPm+PXK QOqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RbrLhWum; 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 m188-20020a6326c5000000b0057c7341d568si5860472pgm.645.2023.10.22.22.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:36:48 -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=RbrLhWum; 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 40E9680755D4; Sun, 22 Oct 2023 22:36:48 -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 S229599AbjJWFgb (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjJWFg0 (ORCPT ); Mon, 23 Oct 2023 01:36:26 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7751DD5D; Sun, 22 Oct 2023 22:36:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039384; x=1729575384; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=8Pmv3DZWM/2dbRrEDbbreAnJn6Hwwne5SAiYAHhbnP4=; b=RbrLhWumLqNBeINKT6dIjlbHg/BdSt1vYZ4DWu4WcaTmA9VvdEdgAuLx 2EuLFgR8ygKo04BonKL3mjdRvsJub0zE+6RKQ4HJa8ryiYs+H7ltD7lMK A1K5ydILuOPNF3syF4Zy1yTY+ruC1w1BsWZtFXXAIwKWp8YVaGNR8Tkuo uv+eeA77ABi4l9JE5aFKGinBmG22cbOTX0ER+5pArLOQ+Y28xrxo4MNrl 9MAk59AGRgyDnJCOaTRzLUw0jpbyWGR2+pH0wMiLx3DqZ1fj7s7xd+LVi c6JEIkbSpKctI6f/1hPKKxDE9pPmWbQDeEpXO7eSWv8p1Q9w8lywceXhA w==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905368" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905368" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556678" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556678" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:35:59 -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 v2 1/6] ACPI: utils: Introduce acpi_dev_uid_match() for matching _UID Date: Mon, 23 Oct 2023 11:05:25 +0530 Message-Id: <20231023053530.5525-2-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-1-raag.jadav@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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]); Sun, 22 Oct 2023 22:36:48 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523371026089129 X-GMAIL-MSGID: 1780523371026089129 Introduce acpi_dev_uid_match() helper that matches the device with supplied _UID string. Suggested-by: Andy Shevchenko 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 Mon Oct 23 05:35:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090433vqx; Sun, 22 Oct 2023 22:37:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEq3uWQCMR05vEGBFOvS+aEix9E3FG8XDtqoczldUdD3XUts0KmSSz3FPmU8C6y1x0ydiTk X-Received: by 2002:a05:6870:1d0e:b0:1d5:8e6c:1794 with SMTP id pa14-20020a0568701d0e00b001d58e6c1794mr9719614oab.58.1698039429716; Sun, 22 Oct 2023 22:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039429; cv=none; d=google.com; s=arc-20160816; b=hz0riZKeuz+2hCdjw+02RnREq0zE7sPTRP6MyGdl6Jgwh1aIoM1Xg5koTixmzxsY2D dM806EyhJVqPtf2Kx65GgUgB9fLs5cdYyg4xjm3QgsFdubKt6BSN/e0nVFnfyvRABOCd 65Wytm82RQRnQiF1NJPUDs8PZg90wBuJi/aS+v+wqPrc8SdDDBQ8SX4d7J8wNDL2bpTS o4EC96Pj/Nb5TQYal/Wrtjb8xJfSTKRAqHkK8ibifiCpgK48C7ARTbQPR5tHi68380BS P3pI7yAWhv0mDBhURTw1oY05ZQcOLT/rA09DNB3EMdGIFqXZsgg8FnewSyKN6j5RkIuF h82g== 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=KvEiL7dFRAZW2wIUXQpRkKurWEZEKxOkqTWp/XLRjnc=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=LTs3sdg0La+RCI/Q08jcBROO5wT+ALlY9cqMOe2kM6QSIyHpmcBXMHW1VFfjKlG56u qu/HkOtTwsoq8ijsqq9Ffg1TZoBitU3GbfsgkAmyUemJbhFPtDSZ66kvGCcUtvwT2sgs 0ogvz6kLgAQhSO8JT39eq3rjcoXwUll9r9FziNRf53dBoNJJcVZvJ4BT32DqwfjS5tRO mhPzpdbiCqcYsSDZt2F7CUbnYliiIm2UoYPEnDdtMb1uIoJqNewo7iRuAHl3Ne5pD9a1 0U/78FWKrxoBivJguxP0vBB+DgDCRVMAMfqCTLa+aFnVl7aLgUkWHs38Gp0vqitQ7s8s ybdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TqfhDOae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b005895c80c902si5514507pgb.438.2023.10.22.22.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:37:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TqfhDOae; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id E0DC38074E25; Sun, 22 Oct 2023 22:37:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229696AbjJWFgc (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbjJWFg1 (ORCPT ); Mon, 23 Oct 2023 01:36:27 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D62BFD60; Sun, 22 Oct 2023 22:36:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039385; x=1729575385; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=kUk0ItiaVjzsfP94oC1IH39uZvUKoEr3WDbUZtzQLOo=; b=TqfhDOaeFBtb4wF2pLDQkFapff1OAkEtVjJNTsX3TfrbdnoFsYJYmAa8 gqVe4RlsGh68HSlQCwoq6SFufOIJ9j/SJvhb31u5iFfYMTjx0IPIy2nDA gr9rYul8G/OqFfkPZd3Qv6nIYC6FVi0T/SSOhc3hGagkcps+fyLEGPgq0 3IGJIKwASfWkV8aQg6XQYy9CS68i2DjW2XscN/U7sj+MhZzfMgULAFAyW B08qaIKc4fTwIZYv175M2xBWwqikDlLgpdIf9mj75N2y+lQXsfELYeMfu 2GVNb2N85LhHAmd2Thr+885T0LU/t9PdGCNOmY5iwfr4B4Ie2dZPHPlA6 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905394" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905394" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556683" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556683" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:36:04 -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 v2 2/6] pinctrl: intel: use acpi_dev_uid_match() for matching _UID Date: Mon, 23 Oct 2023 11:05:26 +0530 Message-Id: <20231023053530.5525-3-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-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 morse.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 (morse.vger.email [0.0.0.0]); Sun, 22 Oct 2023 22:37:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523392996806801 X-GMAIL-MSGID: 1780523392996806801 Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav Reviewed-by: Andy Shevchenko --- 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 Mon Oct 23 05:35:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156667 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090359vqx; Sun, 22 Oct 2023 22:36:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGkrTIPdGKi0SShcVH2KA6Up4JzRh/p8nVjN5XERA+PK6Kqxa646T6Zjj1SbyCyxugyJ/Ib X-Received: by 2002:a05:6808:96:b0:3b2:e292:370 with SMTP id s22-20020a056808009600b003b2e2920370mr9223702oic.38.1698039414654; Sun, 22 Oct 2023 22:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039414; cv=none; d=google.com; s=arc-20160816; b=FZR7X2V0wN3D7v5f6ahzK6ul9DBLy4QQSPVrqi2PGDA8jqqI8jq+MRvI07AvGTwTkc /QO8/vYVIPSM9/lfs3c0ipDirVd+jBHCccsC9DPQitpJ+gFPyPnHMJPxO2q60OxcKZ06 tyGGsh30gnVGInv/7vDHj5TLzKmHs2XmLOzKcCwrrv7gLh7a0XLNW/AtibWpUTRGLV4P OpeIW/Su1SXPjSDpNINJXGAw2jBV09Qt04O4s2nBA6Nb+I1QyiidXVp7pErbBaNaA4+r 6zlKkZUA2K98Sj0URaE+Kko/+UvA8tFpVW0fs2Ua0x1SOXA8DdDzx9HujO1uhFVSQ+Gf 7RYg== 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=AD4vF7m/g8KhGYG2Y/i2sn5Dk6GbqV0SUCZ6uo3XVn6EqQkWxSRmqu1Iljze7v/rNf LytKx580sGfh1+Ad2l68AMUYheaHzMQ8VhRlTxRWrcvdInFmG9m+fpJTSDI3gL8dX9kf 6MIsIN0yQTJLNsnPX76Q3xDqigqjASXdODoRpptL9cDRGtHkOuRd9ol1fsqpS45Czg7g B18uc1Uagp4Nv4XKOrYCTeELEXCp+CBwNKrkisZVuBZ9FkkyYOs+j3M23FSLIYv/KmK/ DI6KitfOihfkuRTBD3jNS0FNPufIvGzgbp/tsa6UkcxX+bXJZs7GF6od2mNXZHf458c+ oHRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OmdWhuBj; 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 bu23-20020a632957000000b005b881cc9497si4725501pgb.320.2023.10.22.22.36.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:36:54 -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=OmdWhuBj; 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 48E47805DC35; Sun, 22 Oct 2023 22:36:53 -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 S233270AbjJWFgf (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229551AbjJWFg2 (ORCPT ); Mon, 23 Oct 2023 01:36:28 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26888E9; Sun, 22 Oct 2023 22:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039387; x=1729575387; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ozdZnaBJZ2vqKdOuWyOWr4NX6JLrJWxExqsMlsM/PrM=; b=OmdWhuBjXZMtXB4Xu8i5SrbCQdqF/gxDffg+OT2i7zn5l4+624JaGhIP znziLKOsC3ic65uI4gnA9eLCVNfEoT8C7dQkpL9SYs+jdU8JwAWVq9OY3 7FgN2bbMUzlmbTx42TblXmKD3k7egpp2CTT5D5W2ce4qKODRX3rgsSrkm L52c1Xqt7ySa2Sb27yOnf1ejjCTZ6NJeCLCehDDHY63sJGLJ+qaGAYauC 0K41QQcqa26hA1TJNV8rm+17ltsI5nTrHM7pmUNpw/GFdDfOibADnYwBd ETcL3OpIZA9f3F4s7kOn56dlruRW5PGzPrwFcfT7/lwEh3Z6H/eGHX8fV w==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905409" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905409" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556687" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556687" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:36:09 -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 v2 3/6] ACPI: utils: use acpi_dev_uid_match() for matching _UID Date: Mon, 23 Oct 2023 11:05:27 +0530 Message-Id: <20231023053530.5525-4-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-1-raag.jadav@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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]); Sun, 22 Oct 2023 22:36:53 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523376929412601 X-GMAIL-MSGID: 1780523376929412601 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 Mon Oct 23 05:35:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156668 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090419vqx; Sun, 22 Oct 2023 22:37:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUPPFPaEQeO5xGCEhWL7cTB64DuI6440AC7m0Qjz6dGAIEsH4oUo54Iu9jQNKkmJqYYykW X-Received: by 2002:a05:6870:ebcb:b0:1ea:1b5e:fed4 with SMTP id cr11-20020a056870ebcb00b001ea1b5efed4mr11452609oab.39.1698039427114; Sun, 22 Oct 2023 22:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039427; cv=none; d=google.com; s=arc-20160816; b=mW31Wfm6HRO0vQW2awIWHSEdTk+Ao4kzgskeGZTppTA9vE95cKhPa8hB7XHVjILUod d+nNPsPy6PcFDilfD95bcRPpcPS19c4fn7PFaXXTOHDsW/bj2JItyObTloXOaYkFjBqQ 6ReOaoXgm/RIs7qsONoDrh/96SJedwiaxFEUuBg5qbPXqGc5UCt4RXFNcqdKuXsIJvym UBhWVeHT8YNACvElr2V9iySsdNr7C7ncorHmMQ92fuh7TnbB45JnS2d2JyiwEABixsr6 u+lyVKrUWw0Wdgjz+wGb1ptB5ThtXMUdg+JAP3xQ1M1U0lSsssvLPuC4oHDoOVFvFKUZ DYsQ== 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=sLdhtTPDhbdoxnL9UGOXFbOwGGz6MIHLSHHMKWfWUDc=; fh=jahFJYSZbW5wMNYi6sgvoYqPjA4Ed86fT1kpbcI5rrM=; b=Xd9jPu6Pe0KcfF4troCnzpVxZ52QaS0M38qhl2XXsKElIN8vB3ywtVnHrEPMLFouRy huleeG2UNhCLoFmtAflYYgd8GOiL4Xiu2ZGsQmb3/e3jZoy+t3T8rxy1QYftFh8AkLWu hr9nvYfys3IPp6TU56QdW4Uvo3L1FCGxVPEph3yJVRjSqv7o7FZjLnPVhanRZB1SzPO9 eM8oiXHQzfRscw3elnXubCOzBHAgBfjPBjKuG3LpyAe6oW1w/DLhUj0kr5uf7qgko7qO SCziLwXORk+FzZvoZXeG3Z63XLFBazwE1CdHGfI3l5toEVwp1zhr3IveHIFBUtVfj5P2 G5xA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JXpVVhVn; 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 j69-20020a638048000000b0058974d3c292si5681342pgd.191.2023.10.22.22.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:37:07 -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=JXpVVhVn; 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 A4DB4805D541; Sun, 22 Oct 2023 22:37:04 -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 S233282AbjJWFgh (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjJWFg3 (ORCPT ); Mon, 23 Oct 2023 01:36:29 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2A36D66; Sun, 22 Oct 2023 22:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039387; x=1729575387; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=4ahXNqa6c7vy2x9ujTqdFUKWTVtZ7enEGrd79rmm95E=; b=JXpVVhVn+sefPxYFftPtNWPtpCaeJrBxGwwdmXdS0vAwaG0KYxxcQiNs J3Vzg9k9QxnEL4KbnANhiiRwiS5XMoB8eFLUPWCszWlFua3IVBM672i+N u0tV58lwTgeF+u/5p7251+ZnisYi11w98es8IJ5ASWtNY17sEN8enAsmm PpkXKoIc9UKdfYhp0gox0XBncoA6ll7p+pxlPVeuCJcvzpLvstTk8Hhfj V6Fu+RJrnuy9yz/VnyCoBOjVdkuVqTJM/qGAwzTgaVhC65/p+w861DNhl OsESbfKVK+gprlnY52Xdn3y/LrqNlAOMzqp/AOGy4i2TAfwfCeJMUgDRX w==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905428" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905428" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556690" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556690" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:36:14 -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 v2 4/6] ACPI: x86: use acpi_dev_uid_match() for matching _UID Date: Mon, 23 Oct 2023 11:05:28 +0530 Message-Id: <20231023053530.5525-5-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-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]); Sun, 22 Oct 2023 22:37:04 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523390026444501 X-GMAIL-MSGID: 1780523390026444501 Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav Reviewed-by: Andy Shevchenko --- 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 Mon Oct 23 05:35:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156670 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090435vqx; Sun, 22 Oct 2023 22:37:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOoMcyEivZhAGhHSCP7iWNejwMGwE3+UHu3ShgVIkbIXdUwszd49TMNRZbYGa8aKFTuZYa X-Received: by 2002:a92:d20e:0:b0:357:51fa:ac5a with SMTP id y14-20020a92d20e000000b0035751faac5amr8728945ily.1.1698039429810; Sun, 22 Oct 2023 22:37:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039429; cv=none; d=google.com; s=arc-20160816; b=Y7m13snyMw9tubzrh706NdqoI75LZ7IXglh8OVr2m68HSrfkAwKWJtdeUeYkg6CKeG M07UHIYxzOzkruKGcINs2Unei3+NzyptPdJqbCvuHQdI23sYfzm/yCuG1X5SvZI7G1l7 RDg8tws1zJZWCkFNcgM8clc8tEsTLp01k4Z4BobErbTthbqUIL1JAFv0AH15ikyPErEm nSR5N7iVLpsmqvycs6q3d9R6Sqjp8MSQxdPbAfxDMUQdvV+ZPjdaNNwTmQnTr/0UOvQN vf8pYMrUjldDuHidpvq9x1AMYPMe5XDBzzqIwpmRN6FY0S5jSpzcVVuKJPWKgt+ZcvR6 4YuA== 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=hy00SGED09IntNSmoggZwKohnZIP2BW1jvSdy4KZeXXz9DA3laZW3IuTZsXD6HnOP+ J/B3W75Kpg28XS2pZ6B1L9gg1Ju2jE4hC9nIc+EuC8V22kkp/fTQs9/iAj6kFZBq49SH d5najFmzcaDYk9HVElwmRLCa+nY1DEKcxjx+vOr6Vo0vbnKpVUto/1sbEHEiGT36VjEw +DIs1xgHtGj79fD2ncy4M5M1P9Ab0akUUjh8fPURUfN8X8AnkzGCjtHfeeXCO8/P/6Sj r/oDXQOZ5ThK0P8WiJasj32j87D/qcptIp0ivORjtbODX10PZ0drcpLdSG3+jCilZIi3 klEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=WIyPhERr; 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 q5-20020aa79825000000b006bf537ce976si3350237pfl.260.2023.10.22.22.37.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:37:09 -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=WIyPhERr; 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 8CA37805D5FF; Sun, 22 Oct 2023 22:37:07 -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 S229458AbjJWFgo (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjJWFgb (ORCPT ); Mon, 23 Oct 2023 01:36:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CF3ED60; Sun, 22 Oct 2023 22:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039389; x=1729575389; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=iUljf5QPUJwxYR0tI8SM3GVeSDgYpl24Lk1AfcVvgFI=; b=WIyPhERraJnEeFXMHjmfrbmiHndC/cKjrH4wIqOwOdF2saCZHuMTe15C MThn0Ajy5gfPegeRAUiBPmw9t59JVi0+xVr6v/ADU7BeV7oUWGhj6xdUE +SguOQFVi3Two8T99wJLyJsSqKPBWUeUfePzxrX1DgvJ2LQk4DoQ01FIE 80qz6rwAjVdkPM1Oo+wZSYTcB+VUq+J1F2lJySM4HU+WV/ukmzYLEMsa7 i/zzL+rNTN3iub0r4mEnBmI/ZJ+Fr6EaAXWvgkfzhSdunQOuAziVCqdPV uKRSkmbLE2cYv4+yFpk7ZhyixxNxq8aPc92kbwWgZwL18lkv8cVq361L6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905450" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905450" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556697" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556697" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:36:19 -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 v2 5/6] hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Mon, 23 Oct 2023 11:05:29 +0530 Message-Id: <20231023053530.5525-6-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-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]); Sun, 22 Oct 2023 22:37:07 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523393062921046 X-GMAIL-MSGID: 1780523393062921046 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 Mon Oct 23 05:35:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 156671 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp1090465vqx; Sun, 22 Oct 2023 22:37:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGq1N/ICX78qm6nKAA/hUOOai4/1YSDdppeDk7jyeoXWIVMVH9aXNtRNrPH5GHVUIiNKsC1 X-Received: by 2002:a05:6a00:812:b0:6b5:6c95:4671 with SMTP id m18-20020a056a00081200b006b56c954671mr10019816pfk.34.1698039436536; Sun, 22 Oct 2023 22:37:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698039436; cv=none; d=google.com; s=arc-20160816; b=Zsuq9VcO9iGOhbJKzgJJOYZovnmK1ElK6JLtxrXxXK/UlP9rlcvEmGZh7Ygcv5TuzA 1RvytqHeQbwxyFF98ZXv+nkKKZeMZmhuR4R0iwHJF9ZlxOCSCmjP4y+pwv5TDnzsG6Dp xfxgmqudAjyOB3tFbpT0f8aKVnaBxQZLWLNCunaxihi+2Ir2kaOmqt1R9Od2CtlzgPdc uKv/+an1oqGaWoU3JAmvLbK44LfPYUHh3ZlA3WVzUj69gEJbrQ/BQOkERR1EMxkvgUgd Vl7rFyjnJZPrxnw1o68tP7Ta0j2TxAYuS/KCIOr5bOxnWlM+BpslkJvHvDLpc+ABcyzi BRiw== 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=JAcirhogevP7ILy5Fi0GM0hIEMfrw2Yv27kBmwB+PCEYD7yAkwSohyxcJgQBeWEd1t gK+9JamWcnI858mfmbaYfKBm5NvosBqZpKTZqPNinRyiW8jNJB4EZdXcsUuWD6h5i4dD 05SunUFxuAFfyx05sPdN+NbqzXZ6KVXwqxowD+I726rPNdtKBTg8VC1l2P/+arQ5X15X 1xKHMQSXzrKuFR72/DtheZvfTFUY97ChJRHOrmHn+hkH0NByqGNK2YgruvafY9ee2JGS OED2O/iDB1ydYSB7ytt1TZHyHBaB4OKcmth1GDba/UnWljrUnjYOTOHP2RefZsux9JpP /9ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=limts0eB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id bx29-20020a056a02051d00b0055793097dbesi6451487pgb.469.2023.10.22.22.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 22:37:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=limts0eB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 27B26805E56B; Sun, 22 Oct 2023 22:37:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233341AbjJWFgr (ORCPT + 26 others); Mon, 23 Oct 2023 01:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbjJWFgb (ORCPT ); Mon, 23 Oct 2023 01:36:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27EB1E9; Sun, 22 Oct 2023 22:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698039390; x=1729575390; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3yrAjMBirTIUAhTanyYbEMtK/J+a0HZi5Xr6F7vjCTw=; b=limts0eBIeR5M9GBaWRZJWPuasKW9qBDxQ2p566yP4Yty4lsBbuYtd0K 8b5ra+0vpIcvy4C0L8wBM2g4tQxqFnubUcQx+QmuNMHG8t0taUzkUHniT QYbmo08sYHcofYXGUb7grwPFres+uwHEy6UvwlL6u2vwbgj5JpndLtD1g T21+1BanJ7OKzDnFkISn1bAKKNvL4avXBWnSxwWz5ayhG3Z6QnRQSJgU6 3shnK7Tf6pjL9QHkB7+yfRWBCtZTcKxezwGXtio4mmaDd4SiQ5LvO496o ldFZOTayNOqVdoo+3zlIT6GH0tgUxb2uakzvh9boO5gDhqhDUjR1S4jl9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="417905465" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="417905465" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Oct 2023 22:36:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10871"; a="734556713" X-IronPort-AV: E=Sophos;i="6.03,244,1694761200"; d="scan'208";a="734556713" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga006.jf.intel.com with ESMTP; 22 Oct 2023 22:36:24 -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 v2 6/6] perf: arm_cspmu: use acpi_dev_hid_uid_match() for matching _HID and _UID Date: Mon, 23 Oct 2023 11:05:30 +0530 Message-Id: <20231023053530.5525-7-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231023053530.5525-1-raag.jadav@intel.com> References: <20231023053530.5525-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 pete.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 (pete.vger.email [0.0.0.0]); Sun, 22 Oct 2023 22:37:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780523400081132733 X-GMAIL-MSGID: 1780523400081132733 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);