Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15988477rwd; Mon, 26 Jun 2023 04:22:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Yr23wT8H3/85t72PbTUmrWqP6OI1eACxs15gMUb6XUNPtVVR+B9wyvtKmFTw/5amyabqm X-Received: by 2002:a92:c80a:0:b0:33d:a34a:2d42 with SMTP id v10-20020a92c80a000000b0033da34a2d42mr26577128iln.20.1687778535713; Mon, 26 Jun 2023 04:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687778535; cv=none; d=google.com; s=arc-20160816; b=s/7oKsvm9IyJnuFXvK4CclomvQCpzTTI53hKI3To3AHQeN88l6K5azIPK/x4VlVw0Y 4iXZ9HYx/0wmpwepnU6lIUPqXLxZg7AtKx07edClHfw+0rEdszHO3bihCeMwDIAWZZSy BLI437byK2DfvmEk8rZAczznQ7o4nBrN6z6iIFvFbfU177ObpFAzAl7APUFaWcBqFGat KFGaYx3s3F9Jj9xxQwiS/H/fLg/mKw6i55le3tRIEg/KLewtiLUJ97HO7eEu/eNxYT7k mzj+xZDOf1tx6SQcG0Skg5kViEdKIBagqN0DExFobhdOKS3pB0kKbUE4/q8Y6znmfqW1 nbQA== 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=Fn/VhbEpTMiqu5Rx70G3Oo2aFK8+WIEP4ah15Dd6BIs=; fh=7kk2dIdOXi+zqDFGTSYw9UMVB1tpnbGBLYaPIvAn2Aw=; b=cum4sX3KMu/YlNXYQVXcg8LEJMnZnBC3qMO2T5C9QcETn+GTmvICUWmW8EA34vpX8s f9KFcxQS4nWqywkmI2uFQt8EDr5RG97knzvVFy8qVS8X7xF/rVDtB+9LGaCq9zac+VLG /1MOY0SNa867dE04EWLi8HCeL0gk7qyaAjiH6Fdq0VFMnmpbSmiMG9v7+ss6m7IvJZn4 6BgcmtlGAfXFveXfFUkI/A8RMtDxc3HyCqt68JJYaSMTdpd+AywBizpCOC4AaTAfDlbk bp3VYfc9crRl1og6rscoOkkybLxH3mg9ANfETFiQ1F/nF7v1lUW/vKnby8rJEU/P6UQv 3WTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CGnOFrUv; 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 190-20020a6308c7000000b0054ffec23b91si4811783pgi.153.2023.06.26.04.22.02; Mon, 26 Jun 2023 04:22:15 -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=CGnOFrUv; 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 S229866AbjFZKom (ORCPT + 99 others); Mon, 26 Jun 2023 06:44:42 -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 S229569AbjFZKol (ORCPT ); Mon, 26 Jun 2023 06:44:41 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13DA4E60; Mon, 26 Jun 2023 03:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687776280; x=1719312280; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=ulzjEKt9TPFPosS7yZEKwHAFl3FmcOd566vv02OR1+8=; b=CGnOFrUvzSsjhnlwDqr1GevFin4FsUEoAdqimQEJhNcrwNWcFdCbYdCz zKQ7SF4l/eZz2qNp5BdqKeRyNX+zVyYjJRNpRmauWH01yZpjFTSPdV2Io G7VIEpH6L543UucYBzveR4xQ/Qrp9Gg+k3YsqLw0JZXEIrgRgVkMG4YLf MGrc42owf0l56q7hJqIo2R2wiMmXrrOxPPig9akiBf4DAABzYKG58rV/a TjP9tIqY6YoCLN4DY9VZwCK0sCpeF4l/j+1WL9q0wkNmDAuIE/flS/k97 CP8tqYdfATlN2MNe5FoK57F0MeZc3VyZkZVzRirs60kfZp5Sg79xIkRZJ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="361278902" X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="361278902" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2023 03:44:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="693441712" X-IronPort-AV: E=Sophos;i="6.01,159,1684825200"; d="scan'208";a="693441712" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP; 26 Jun 2023 03:44:36 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qDjhy-006jkH-2a; Mon, 26 Jun 2023 13:44:34 +0300 Date: Mon, 26 Jun 2023 13:44:34 +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_NONE, 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 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. 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. That said, I will go with (*counter)++; -- With Best Regards, Andy Shevchenko