From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B1C8170507 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D5A91703DE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697809338; x=1729345338; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5II17EGmJAiyNI3Q5XungjMq7Um49xLUOEDi/+9mSCY=; b=TnP27UQeANf38vRIqiZi40amw5QkkqW+lWABeEvS9PBnhaI1z0CWpVGF 9YHc9UP1aSJjAsy1xweRbSprzskAfWCOYavdBGR8c3ga0K0KnF2XUDqaZ YHHyBgjV+xMJFSXtNwCm6PpBnUZsTFAz4HFxBWd4oXFUIc2yk5bH+A5w5 JB76MnC+28tQVoBTXdV0FjIJMWi4+XA84XSIU6QRzbh4K0JpjIuDdzgtM zCts1g8AfHDQ3piKsSWi+GbjucX4PF/syVzvWvjqmeSBICb6Hml3SGwYV X20XgUwEeqsCbZtc6VjANFFJRfE6HGHoDv+c1Qdxh9O92c5r6+bYdzEE3 w==; Date: Fri, 20 Oct 2023 16:42:08 +0300 From: Andy Shevchenko Message-ID: References: <20231020084732.17130-1-raag.jadav@intel.com> <20231020084732.17130-5-raag.jadav@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Acpica-devel] [PATCH v1 4/8] ACPI: utils: use acpi_dev_uid_match() for matching _UID List-Id: "This is the central place for ACPICA developer discussions and issues." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Raag Jadav Cc: mark.rutland@arm.com, len.brown@intel.com, will@kernel.org, linux-gpio@vger.kernel.org, mallikarjunappa.sangannavar@intel.com, robert.moore@intel.com, bala.senthil@intel.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, acpica-devel@lists.linuxfoundation.org, linux-hwmon@vger.kernel.org, mika.westerberg@linux.intel.com, linux@roeck-us.net On Fri, Oct 20, 2023 at 02:38:06PM +0300, Raag Jadav wrote: > On Fri, Oct 20, 2023 at 01:36:27PM +0300, Andy Shevchenko wrote: > > On Fri, Oct 20, 2023 at 02:17:28PM +0530, Raag Jadav wrote: > > > Convert manual _UID references to use standard ACPI helpers. > > > > Yes, while not so obvious this is the correct replacement. > > Reviewed-by: Andy Shevchenko > > I think this is the only case which would suffer from the more obvious > behaviour, i.e. No, that's not true. The same with override CPU in the other patch, where the check is simply absent, but the result will be the same. So, all with negation will suffer from the "obvious" implementation. > 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); > } > > That said, we can't be particularly sure about it's potential future users, > especially when the usage will not be limited to just ACPI core since we're > exporting it. -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 683EB1BDDA for ; Fri, 20 Oct 2023 13:42:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NAxTgd4r" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9688D19E; Fri, 20 Oct 2023 06:42:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697809337; x=1729345337; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5II17EGmJAiyNI3Q5XungjMq7Um49xLUOEDi/+9mSCY=; b=NAxTgd4r9MzpxP1FvLhVXHeY++F9KEy7WTlj0QA4LAYXJ9qfqbdvYjNp mCnO3Xesxv6B6gT2rVv0cejIyb7hgyPy23hbLRNlso4tVlnsqgRZZRS4s kOKMM30rNt+ocOqA7n5YHokg0frBpFHJ0DDQxVeNeGRcPRPHCHFklkCDe JSxFF2EWkaeOk8J4el6MU53xn9pVBNDS/K7wH6o803J5oXjFrSEh2EGAS JfIRiM380K87bc5hFh81CGz6gSA2elratP8xqA0RKzZP455AMEa8dmOPE 0YTczm+ANi2TReZH00ZhxftGt6xvzMBN+6ZAD1yvv3FDgkiH0jVGJM8re A==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="5107841" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="5107841" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 06:42:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1004612299" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1004612299" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 06:42:12 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC2) (envelope-from ) id 1qtplQ-000000079Xz-42iV; Fri, 20 Oct 2023 16:42:08 +0300 Date: Fri, 20 Oct 2023 16:42:08 +0300 From: Andy Shevchenko To: Raag Jadav Cc: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, 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 Subject: Re: [PATCH v1 4/8] ACPI: utils: use acpi_dev_uid_match() for matching _UID Message-ID: References: <20231020084732.17130-1-raag.jadav@intel.com> <20231020084732.17130-5-raag.jadav@intel.com> Precedence: bulk X-Mailing-List: linux-acpi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Fri, Oct 20, 2023 at 02:38:06PM +0300, Raag Jadav wrote: > On Fri, Oct 20, 2023 at 01:36:27PM +0300, Andy Shevchenko wrote: > > On Fri, Oct 20, 2023 at 02:17:28PM +0530, Raag Jadav wrote: > > > Convert manual _UID references to use standard ACPI helpers. > > > > Yes, while not so obvious this is the correct replacement. > > Reviewed-by: Andy Shevchenko > > I think this is the only case which would suffer from the more obvious > behaviour, i.e. No, that's not true. The same with override CPU in the other patch, where the check is simply absent, but the result will be the same. So, all with negation will suffer from the "obvious" implementation. > 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); > } > > That said, we can't be particularly sure about it's potential future users, > especially when the usage will not be limited to just ACPI core since we're > exporting it. -- With Best Regards, Andy Shevchenko From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1503C001DF for ; Fri, 20 Oct 2023 13:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=56DJ1GgFDsgOZcGJXw6vOz8DYihcCfejOK4UwJ4h4Z4=; b=2PovogLk46izlj kgglfTTQIk58CsH38HRjrFvqX98mABiV7KC8JGYAtfmQua7hZPIPCBjKA8XKHUkod4myqyIE9JY/5 jjixKxZDGLEpIEV5H6GH4nIbUNbSBQ/p+BGF/ESr64hKd1LJx5kcz9qnpEseiUgfNGenHU47UuDWD 4Y05HgC60agoN/5hajry7jTdJ/ixxLxRJJZ0hY8M4OAPyqpSNszp7cIp03aYPhJexqH7z1iL/EiuZ mYC4KSIAwIXAQGKHcWstrZr2N9QbN19CWHu0iaoYgVntlBttzA46G8kVC1NMwihCj50K2tEf686TY 1G6msaOn4tbm2zM8VesQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qtple-002OmR-0g; Fri, 20 Oct 2023 13:42:22 +0000 Received: from mgamail.intel.com ([198.175.65.9]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qtplb-002OkO-1g for linux-arm-kernel@lists.infradead.org; Fri, 20 Oct 2023 13:42:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697809340; x=1729345340; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=5II17EGmJAiyNI3Q5XungjMq7Um49xLUOEDi/+9mSCY=; b=Ml7JXuBkAYxSA0hlZ4ZUz2DiAQmVqCG2muJJTaz3oHCyLti09XcV63b3 rJHjDcjLqiyopNT8wbgeK559DFAfGL1gZtq26t7A7NN1BbniA76oy1Cbo w5MLDRbiypBWcxcDe5RgSFG9nGnmfNZ53cdDNhoGen3t3vwTCbkVCxKEI /+abeFhlICfzeFDsC0gvDlAjI4aF/D/xRZeB69ljlInPL94zX3Kx2u6cT 0hEb9C9F3tolQuH44LhPDu+Cig1xqsfihZP2a3ilTC5SvLfKMFm+22TIb CdqzEVe6u3of0w3B0oPaYp64fJGB70RAI5XkG3bKQsKY4TBOsnv1lylNQ g==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="5107843" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="5107843" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 06:42:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="1004612299" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="1004612299" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 06:42:12 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.97-RC2) (envelope-from ) id 1qtplQ-000000079Xz-42iV; Fri, 20 Oct 2023 16:42:08 +0300 Date: Fri, 20 Oct 2023 16:42:08 +0300 From: Andy Shevchenko To: Raag Jadav Cc: rafael@kernel.org, len.brown@intel.com, robert.moore@intel.com, mika.westerberg@linux.intel.com, mark.rutland@arm.com, will@kernel.org, linux@roeck-us.net, 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 Subject: Re: [PATCH v1 4/8] ACPI: utils: use acpi_dev_uid_match() for matching _UID Message-ID: References: <20231020084732.17130-1-raag.jadav@intel.com> <20231020084732.17130-5-raag.jadav@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231020_064219_665046_41822CDD X-CRM114-Status: GOOD ( 13.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 20, 2023 at 02:38:06PM +0300, Raag Jadav wrote: > On Fri, Oct 20, 2023 at 01:36:27PM +0300, Andy Shevchenko wrote: > > On Fri, Oct 20, 2023 at 02:17:28PM +0530, Raag Jadav wrote: > > > Convert manual _UID references to use standard ACPI helpers. > > > > Yes, while not so obvious this is the correct replacement. > > Reviewed-by: Andy Shevchenko > > I think this is the only case which would suffer from the more obvious > behaviour, i.e. No, that's not true. The same with override CPU in the other patch, where the check is simply absent, but the result will be the same. So, all with negation will suffer from the "obvious" implementation. > 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); > } > > That said, we can't be particularly sure about it's potential future users, > especially when the usage will not be limited to just ACPI core since we're > exporting it. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel