From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 2C5D21A5B8D; Thu, 11 Sep 2025 10:46:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757587590; cv=none; b=JQr3+ybAAO/6asjzaFskr5xcNOV+AmH4g4o1CYIWWFvZzujAR7wRzFYunwLwEUl/pgDixhwCoQ6Td3Zgt51Y5cv0e0JW2rqe5X2XY4pIWvEphBdlk/ryrTQ+2F8UdI1mREt11YHLhbo6wji+x3wDqMNkvKxMBVu75r2gD1404tM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757587590; c=relaxed/simple; bh=WAOZDn5QZ0vs3L1qbFBWRG00N1eyQ5jvWWLJJULHrHQ=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R99EawzpPQVodYYep37LF5wx626fuV9OgnRvMlVhUW8i/ThWWGEvEpB/y5INQOqG35paTri9XVQ1tFpvsCJrDJR98FzEerIYnXAdo27iaIcd/TfbZh6NH09n7xeyfQYhfCvVF3b12Di3R/h39DamWx+PnYcr0+35NGppmy/zgi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.186.31]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4cMvMp6b6fz6L56J; Thu, 11 Sep 2025 18:45:10 +0800 (CST) Received: from frapeml500008.china.huawei.com (unknown [7.182.85.71]) by mail.maildlp.com (Postfix) with ESMTPS id F0B2A1400D3; Thu, 11 Sep 2025 18:46:25 +0800 (CST) Received: from localhost (10.203.177.15) by frapeml500008.china.huawei.com (7.182.85.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 11 Sep 2025 12:46:24 +0200 Date: Thu, 11 Sep 2025 11:46:23 +0100 From: Jonathan Cameron To: James Morse CC: , , , D Scott Phillips OS , , , , , , Jamie Iles , Xin Hao , , , , David Hildenbrand , Dave Martin , Koba Ko , Shanker Donthineni , , , Rob Herring , Rohit Mathew , "Rafael Wysocki" , Len Brown , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Catalin Marinas , "Will Deacon" , Greg Kroah-Hartman , Danilo Krummrich Subject: Re: [PATCH v2 02/29] ACPI / PPTT: Stop acpi_count_levels() expecting callers to clear levels Message-ID: <20250911114623.00007cd3@huawei.com> In-Reply-To: <20250910204309.20751-3-james.morse@arm.com> References: <20250910204309.20751-1-james.morse@arm.com> <20250910204309.20751-3-james.morse@arm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500011.china.huawei.com (7.191.174.215) To frapeml500008.china.huawei.com (7.182.85.71) On Wed, 10 Sep 2025 20:42:42 +0000 James Morse wrote: > In acpi_count_levels(), the initial value of *levels passed by the > caller is really an implementation detail of acpi_count_levels(), so it > is unreasonable to expect the callers of this function to know what to > pass in for this parameter. The only sensible initial value is 0, > which is what the only upstream caller (acpi_get_cache_info()) passes. > > Use a local variable for the starting cache level in acpi_count_levels(), > and pass the result back to the caller via the function return value. > > Gid rid of the levels parameter, which has no remaining purpose. > > Fix acpi_get_cache_info() to match. > > Suggested-by: Jonathan Cameron > Signed-off-by: James Morse > Reviewed-by: Lorenzo Pieralisi Reviewed-by: Jonathan Cameron