Message ID | 20231023053530.5525-3-raag.jadav@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> 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 <rfc822;a1648639935@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <raag.jadav@intel.com> 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 <raag.jadav@intel.com> 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: <linux-kernel.vger.kernel.org> 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 |
Series |
Refine _UID references across kernel
|
|
Commit Message
Raag Jadav
Oct. 23, 2023, 5:35 a.m. UTC
Convert manual _UID references to use the standard ACPI helper. Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/pinctrl/intel/pinctrl-intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Mon, Oct 23, 2023 at 11:05:26AM +0530, Raag Jadav wrote: > Convert manual _UID references to use the standard ACPI helper. > Signed-off-by: Raag Jadav <raag.jadav@intel.com> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> As I asked you, please drop this one. It has a hidden logic that is not aligned with acpi_dev_hid_uid_match(). Or revert to your v1 I assume.
On Mon, Oct 23, 2023 at 02:35:13PM +0300, Andy Shevchenko wrote: > On Mon, Oct 23, 2023 at 11:05:26AM +0530, Raag Jadav wrote: > > Convert manual _UID references to use the standard ACPI helper. > > > Signed-off-by: Raag Jadav <raag.jadav@intel.com> > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > It has a hidden logic that is not aligned with acpi_dev_hid_uid_match(). > Or revert to your v1 I assume. I don't see how this has to be aligned with acpi_dev_hid_uid_match() or if acpi_dev_hid_uid_match() implementation concerns this specific change, since that's not what we intend to do here. Also, I think acpi_dev_uid_match() implementation in v2 is actually more aligned with the previous logic that we're replacing here, since it gives us a guaranteed match result as originally intended with strcmp in this case. And the "hidden logic" in v1 implementation (match with @uid2 == NULL) is what ends up breaking it in my opinion. Regardless, for any version (v1 or v2) the usage still remains the same in this case. > As I asked you, please drop this one. But okay, as you wish :( Rafael, should I send a v3 with dropped tags? Raag
On Mon, Oct 23, 2023 at 4:43 PM Raag Jadav <raag.jadav@intel.com> wrote: > > On Mon, Oct 23, 2023 at 02:35:13PM +0300, Andy Shevchenko wrote: > > On Mon, Oct 23, 2023 at 11:05:26AM +0530, Raag Jadav wrote: > > > Convert manual _UID references to use the standard ACPI helper. > > > > > Signed-off-by: Raag Jadav <raag.jadav@intel.com> > > > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > > > It has a hidden logic that is not aligned with acpi_dev_hid_uid_match(). > > Or revert to your v1 I assume. > > I don't see how this has to be aligned with acpi_dev_hid_uid_match() or > if acpi_dev_hid_uid_match() implementation concerns this specific change, > since that's not what we intend to do here. > > Also, I think acpi_dev_uid_match() implementation in v2 is actually more > aligned with the previous logic that we're replacing here, since it gives > us a guaranteed match result as originally intended with strcmp in this > case. And the "hidden logic" in v1 implementation (match with @uid2 == NULL) > is what ends up breaking it in my opinion. > > Regardless, for any version (v1 or v2) the usage still remains the same > in this case. Right, so it is a bit unclear what all of the fuss is about. > > As I asked you, please drop this one. > > But okay, as you wish :( > > Rafael, should I send a v3 with dropped tags? No need to resend in general, I can drop tags from the patches just fine. For this one, though, I'd like to get a maintainer's ACK, so it may be necessary to resend it without the tag.
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; }