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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0AF18C25B4E for ; Tue, 24 Jan 2023 13:31:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234201AbjAXNbl (ORCPT ); Tue, 24 Jan 2023 08:31:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232855AbjAXNbj (ORCPT ); Tue, 24 Jan 2023 08:31:39 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A94891420D for ; Tue, 24 Jan 2023 05:31:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1674567097; x=1706103097; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=K2lHqDxHA1j9+i0Zq00dJ1rYZq4W/0cdhAmEOjB/Gzk=; b=R92zLriidgUsNwd0jw3Bgb35F1VDwOXYqnIeDO6ioDsXHj4Y0lNQDfOM C888QuM0Bqmxe0B3ouXs+OJLGmq6uqh/RyAEEv4pjhXblICSas4pdouug nBOBsTm6f7Xw0M4DmghbpS+842ovPjc6Jm3jncTqUgge2FriefUc6UQe/ ZpBzsMorXgXR23QMegAwsG/WSSRlguAQx9THZLQzGjnrQe9LZkhWZ+65U l1Icyd24qmQQVEMTINAIBa+i+OY280l2FsT201Zet4y52ocIVfNr5y1J7 zTOjfFt1G0zeyCaX6BTLdwgOLwZB/3CnOKJxULlppqNQwpRMfru8x65jb A==; X-IronPort-AV: E=Sophos;i="5.97,242,1669100400"; d="asc'?scan'208";a="193624415" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Jan 2023 06:31:36 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Tue, 24 Jan 2023 06:31:31 -0700 Received: from wendy (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Tue, 24 Jan 2023 06:31:29 -0700 Date: Tue, 24 Jan 2023 13:31:06 +0000 From: Conor Dooley To: Pierre Gondois CC: , Dan Carpenter , kernel test robot , Catalin Marinas , Will Deacon , Greg Kroah-Hartman , "Rafael J. Wysocki" , Sudeep Holla , Palmer Dabbelt , Gavin Shan , Subject: Re: [PATCH -next] cacheinfo: Correctly handle new acpi_get_cache_info() prototype Message-ID: References: <20230124123450.321852-1-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nk57ke8/f2usmaAy" Content-Disposition: inline In-Reply-To: <20230124123450.321852-1-pierre.gondois@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nk57ke8/f2usmaAy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey! On Tue, Jan 24, 2023 at 01:34:46PM +0100, Pierre Gondois wrote: > commit bd500361a937 ("ACPI: PPTT: Update acpi_find_last_cache_level() > to acpi_get_cache_info()") > updates the function acpi_get_cache_info(). >=20 > If CONFIG_ACPI_PPTT is not defined, acpi_get_cache_info() doesn't > update its *levels and *split_levels parameters and returns 0. > This can lead to a faulty behaviour. >=20 > Make acpi_get_cache_info() return an error code if CONFIG_ACPI_PPTT > is not defined. Initialize levels and split_levels before passing > their address to acpi_get_cache_info(). >=20 > Also, in init_cache_level(): Hmm... > - commit e75d18cecbb3 ("arm64: cacheinfo: Fix incorrect > assignment of signed error value to unsigned fw_level") > checks the fw_level value in init_cache_level() in case > the value is negative. Remove this check as the error code > is not returned through fw_level anymore. > - if no PPTT is present or CONFIG_ACPI_PPTT is not defined, > it is still possible to use the cache information from clidr_el1. > Instead of aborting if acpi_get_cache_info() returns an error > code, just continue. To be honest, these feel like entirely separate things that should be in different patches. You've got: - Dan's smatch fixes - a redundant check being removed - a behaviour change for if acpi_get_cache_info() returns an error > Reported-by: Dan Carpenter > Reported-by: kernel test robot How about Link: to the LKP/Dan's report? Link: https://lore.kernel.org/all/Y86iruJPuwNN7rZw@kili/ I did a quick check but didn't don't see the LKP report... Also a Fixes: tag too, no? Thanks, Conor. --nk57ke8/f2usmaAy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCY8/djQAKCRB4tDGHoIJi 0ullAQCykmFyIh/vjpHYTKvq97fTTrk+p6uQxzD/5NrxVPUh6gEAvlyvCAfISQHE QRsAEdOLOyv31XHz9mXhbr+UM7vmcgo= =fhiN -----END PGP SIGNATURE----- --nk57ke8/f2usmaAy--