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 00F1ACA1016 for ; Thu, 11 Sep 2025 10:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To: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=4wpTdPipBWuIDTDv6Uaa+PXysqwu6kvKoBzY39K01/o=; b=3zXoY0C8owW6swaGKnK3fPzKRF IBO36aOyWGi7Lp21EkNJ5x0/qXfw+vJ+zQiLlZAVEHZVJxw5fIauBKNF8IRlO1jY0v1hw0jHQ8hoK zAhd3awpBodYmZK/4k23v43+nI7r5yiLrnNqb+RrCL7k7uJAMITAqzE65uzBiC87n2P5uN87IGfN1 fOgXqdtFavEHv7nyZogS8Fe7301Kwr/aqezV67F0o0Va67KnW78Qr3Zp25otA1J60iFOxqh9rx1EE cmErUEO55xdfdW/kWFyVf/SRZCwtFhXjhpGLrTJQMtCrRj8KQ4pBEzp2JebCI8efr1SDjFwC8WARB af8zXTmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uweow-00000002Sbq-2O9G; Thu, 11 Sep 2025 10:46:30 +0000 Received: from frasgout.his.huawei.com ([185.176.79.56]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uweou-00000002Sb8-0Ehj for linux-arm-kernel@lists.infradead.org; Thu, 11 Sep 2025 10:46:29 +0000 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) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.203.177.15] X-ClientProxiedBy: lhrpeml500011.china.huawei.com (7.191.174.215) To frapeml500008.china.huawei.com (7.182.85.71) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250911_034628_238959_B44C5F3F X-CRM114-Status: GOOD ( 12.08 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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