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 34FF8C4167B for ; Fri, 9 Dec 2022 16:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: 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=hPDyspxu56D05pjwgpTFJImiJElLm5wkVLVShEA0Wek=; b=Eoi2iC1HZay4nl I87ZJ7Wk/2ED6za+3uh9R7PqvBaL0Y/TfxnV9ZolxYuY8gJNHhlnDIESkLXXQJovLzSaUrAfPsg7o YzPAYBjgy37R1ibzLADSf3SZL2Sb/hC34nhaOSb2UmarnmyPycMRZNQltPGHlQ8cuhfVEezUWNj3Y I4fhYXRsZPyeJ/S3UwyZ6Dc8Zpst4FTmzFh081Pahd9XNXLlFE0ubBQzNP9AF3tAXzO6qIc6xlQqz HiD461QTXoL/PuVHidnS+FihPn8lOqlFJGYgZN2lSfdy9i6EtfRi3HPSiR9JzDa3bWdwzopaI/uFb QPa++oPAGIl5IHR1uIFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fr0-009Fxi-4C; Fri, 09 Dec 2022 16:04:02 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fqw-009Fwt-F8 for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 16:04:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 06339D6E; Fri, 9 Dec 2022 08:04:01 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.41.99]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 20DD63F73D; Fri, 9 Dec 2022 08:03:53 -0800 (PST) Date: Fri, 9 Dec 2022 16:03:46 +0000 From: Mark Rutland To: Mark Brown Cc: Catalin Marinas , Will Deacon , Suzuki K Poulose , James Morse , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 4/6] arm64/sysreg: Annotate signed enumerations Message-ID: References: <20221207-arm64-sysreg-helpers-v1-0-149fa1308a23@kernel.org> <20221207-arm64-sysreg-helpers-v1-4-149fa1308a23@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_080358_571128_730E1B51 X-CRM114-Status: GOOD ( 26.35 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 09, 2022 at 01:33:49PM +0000, Mark Brown wrote: > On Fri, Dec 09, 2022 at 12:42:10PM +0000, Mark Rutland wrote: > > On Thu, Dec 08, 2022 at 04:03:25PM +0000, Mark Brown wrote: > > > > ID_AA64PFR0_EL1.FP and ID_AA64PFR0_EL1.AdvSIMD are both signed enumerations, > > > specify them as such in sysreg. There are other signed enumerations in the > > > registers but these are the only ones for which we currently use FTR_SIGNED, > > > others can be fixed up incrementally. > > > Can we please do that in one go (either in one patch or a set of patches in > > this series)? > > > I appreciate that's more work up-front, but doing that will mean that all the > > definitions are in a consistent state, which'll be far less error prone going > > forwards -- people will *definitely* forget to change the other existing > > definitions to be SIGNED if all that is hidden at the point-of-use. > > I am not sure I will get round to doing all that at once in a reasonable > timeframe on what is basically a low priority background task. I'd much > rather just leave the use of FTR_SIGNED/UNSIGNED in the C code, I only > did this because I initially did that conversion and the repetitiveness > was jumping out as obvious. > > > If we do that, we may as well explicitly annotate the UNSIGNED enums (and those > > which are purely enums without a sign) at the same time. That'll indicate that > > we've reviewed each entry, and it'll make it far more obvious one must do so > > when adding new entries in future. > > We could also just leave Enum as unspecified, do all the UnsignedEnums, > and leave enum as unspecified and not generating a sign constant, that > any users that care about the sign of an enum won't get an incorrect > default. Sure, that works for me! Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel