Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16178771rwd; Mon, 26 Jun 2023 06:50:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6n2gcin0FMYwaSKhWz5NVyf0GvMtBIG+HEliog8SYkkupAMzopWvPuF/CTi6kJ5aRowABl X-Received: by 2002:a17:906:30c1:b0:98d:63c5:d132 with SMTP id b1-20020a17090630c100b0098d63c5d132mr8009552ejb.72.1687787425884; Mon, 26 Jun 2023 06:50:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687787425; cv=none; d=google.com; s=arc-20160816; b=R64AlGgiSFFxaYSszIZlth6FgHGqOnsv5Avt56jM5IIARUkZ5uHfyJWljoRLLXcX41 P1YQ2+6yaljC+CqZaQpryyJ5PF7alncg8NAWfDzoU33p45hI+aVEWkA/xkz0m+292E8p cRzig1i++75qnLQWunPdk5rNsW/1AiBlOZmAImNFahEPy0yYwUWfDkvOs+FDEBP2qXlq 4zL9JNxEgRRB+myYLvh+urTmpwA9pcr9CkMVsOVFZzphcIRncIoFTGHlGINH5wuimdfK tDOKJckXAPLCE5f+hTDt62lnQgoxbSfMuJ6peQubsTEm+9VQHSrgiUQDJnV8yBL7fMOc NtXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VqMNaGo4adg78ioPmSmbU/JdoAG3Lonp1o+LqYIug6o=; fh=7kk2dIdOXi+zqDFGTSYw9UMVB1tpnbGBLYaPIvAn2Aw=; b=zB4lG9Xsx1KU0rmlzln8kPdH0VzE8/pkKZPbsv2rzqu9HBpem84flVgm/6Fv0Ge09Z gAVwLEGuivbCyQN4gxpxV9EY9bH69qooT7aYPI/VfveBXIOc+ZsmXUDS3ibHoc+oVnGd /hGXCsAsVlZAWw1pjiySo7nMf2fRdONZGqE6EmfepzPGAqOl7vTQm8nHB+M9U346Zim8 KE4O0U92w1c5mIw2UV5EzGoDncT6o+j2xpMgFkxgbY2JZph5/q2sVGeEf1oAr8YYihC/ XL6jfVoLDe+aya0C5joKm+bAzWdB/imJaryZLHQgaO3jOP6Wz2NfJyX9wnz2su//UluG Zhqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dv08GUdu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qc3-20020a170906d8a300b009864b5a8904si3031650ejb.312.2023.06.26.06.50.01; Mon, 26 Jun 2023 06:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dv08GUdu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbjFZN1L (ORCPT + 99 others); Mon, 26 Jun 2023 09:27:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjFZN1J (ORCPT ); Mon, 26 Jun 2023 09:27:09 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A41E1AB; Mon, 26 Jun 2023 06:27: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=1687786027; x=1719322027; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=9ng5AnCmQfRGGBiaPFf18ARsNicr/v2JOScpItK0kq0=; b=dv08GUdu+H1yXapZ2AwoIyQQAKh8kap1hR07H+nnJ0qTW+mL5OGlgvb2 NwNi3F4Uqz6nRA/5OsJBwxGh2rwAacpISLKntB8Lij9V1keCpSthsbvci 74QnZbLcSM9UuJjyM1nqm76yukEakIDO8WIXMTUygMBG+C0Zo2srzRnMI rBDBO71BfFocnyfzfjLqN37EnjrAuwI0DAzdKIpS1/N/umVIaBa7G32/E EyoyGlAgs9T35rkjrHt5mUz8T/+gv9r1IZoVkYxhkqViY9vgMggan0Acb kURQCDpPnpWLy9hvoqVBYDZJaIkbJo85FG3naoCFWEPozAxiGn8GIDWg0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="340856231" X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="340856231" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 06:27:07 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10753"; a="751095173" X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="751095173" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga001.jf.intel.com with ESMTP; 26 Jun 2023 06:27:04 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qDmFD-0002iG-0w; Mon, 26 Jun 2023 16:27:03 +0300 Date: Mon, 26 Jun 2023 16:27:03 +0300 From: Andy Shevchenko To: "Rafael J. Wysocki" Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, Len Brown , Andi Shyti , Robert Moore , Michael Brunner Subject: Re: [PATCH v2 1/2] ACPI: platform: Ignore SMB0001 only when it has resources Message-ID: References: <20230621151652.79579-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 On Mon, Jun 26, 2023 at 02:11:10PM +0200, Rafael J. Wysocki wrote: > On Mon, Jun 26, 2023 at 12:44 PM Andy Shevchenko > wrote: > > On Mon, Jun 26, 2023 at 11:15:19AM +0300, Andy Shevchenko wrote: > > > On Fri, Jun 23, 2023 at 04:43:55PM +0200, Rafael J. Wysocki wrote: > > > > On Thu, Jun 22, 2023 at 8:19 PM Andy Shevchenko > > > > wrote: > > > > > On Thu, Jun 22, 2023 at 05:53:13PM +0200, Rafael J. Wysocki wrote: > > > > > > On Wed, Jun 21, 2023 at 5:16 PM Andy Shevchenko > > > > > > wrote: ... > > > > BTW, this doesn't need to increment the count even. It could just > > > > terminate the walk on the first valid resource found and tell the > > > > caller to return true in that case. > > > > > > Indeed, thank you for the hint! > > > > Actually it's doesn't matter if we count them or not, we still must use the > > context of the call to set up a flag or whatever. > > No, it is sufficient to pass a pointer to a bool variable. > > > With the current code in mind I prefer to count resources and compare that > > to be non-zero. This will help to read and understand code better. > > I'm not sure. The condition is "if there is at least one valid > resource, skip the device". Counting them all will make casual > readers wonder why IMO. Okay, Can you check v3 for the rest and I can send a v4 if nothing else there? -- With Best Regards, Andy Shevchenko