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 2DFCFCF6D28 for ; Wed, 2 Oct 2024 14:36:36 +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=GubT/vSvZZ5wkH8VjL4hDOVJcI9+d924qkMjQgPJYCE=; b=KTDKfDXjuGfq4a/ZJpJ4QQGTmG wWhAFKYXtXkU63KwTs9y1nZRjnhTidjXsSAkzmAVpBT+co87rSaL0TrGiEeKs2Pcwi/UhWVyHxCye JvAOs2DJUtSPfP4CNAapyAWtR7QDPfTTzyud/PLgX2gOGkMATe2PgG6S6+EUDXpyy8Et+kz205RgU VPqxHEJloiaYqwTU6E6p8X1eIvWJY76T4PNd7kueq31gId36zRpUNrObPiiy2XBT46Ypp9+2o9TCu N76QuQ6NaGkdYCCr3CHL81+r1IqO3pDSTd/DMXxfkNdcsOeY7GejaZMoVuNSMeZ8SyuMNKvlcFrUr hzBDVqAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1sw0Sl-00000006Q3F-3Ibg; Wed, 02 Oct 2024 14:36:23 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1sw0QM-00000006PQi-1a0c for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2024 14:33:55 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 985CA5C0FE9; Wed, 2 Oct 2024 14:33:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6774C4CEC2; Wed, 2 Oct 2024 14:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727879633; bh=gTTUrv/1+CDfpcfWdsIaelYffKdrd3vQbsy+GV/kQvY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QbVvmbmZIW4zwtud7YnH4h1pse5FJsH45evwIqlXK5WJBI7J+p/2h9iS66uJzos0N bvTE4uW1a2WSDxVO4Jpgd2ZInMD0lOJ3PmjAfUu/A2fJm6lYUbRXtThLbHDMPiU2qk SyTS6ixX+TZO6oQAOWRTIyPIVd9K1KisKBbBQA+m5qjisJrMGpq97e2jwZ6KqrruXx 0p0pvJ1udJDivsR96pTQh3lsKAXWZHw/RxyblThoJT5ik5RYLm1V6eoYVGMQRt8Zdf Vdfdrc32Bdu/bt/2t6Zyr+nwSVI6V7oncOGXxbev7aWBlO+zYCFjHl/pJqKPSpGKnN i9gHITCFpHW8g== Date: Wed, 2 Oct 2024 07:33:52 -0700 From: Jakub Kicinski To: Daniel Machon Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Lars Povlsen , Steen Hegelund , , , , Richard Cochran , , , , , , , , Subject: Re: [PATCH net-next 06/15] net: sparx5: add constants to match data Message-ID: <20241002073352.43a3afb5@kernel.org> In-Reply-To: <20241002133132.srux64dniwk4iusz@DEN-DL-M70577> References: <20241001-b4-sparx5-lan969x-switch-driver-v1-0-8c6896fdce66@microchip.com> <20241001-b4-sparx5-lan969x-switch-driver-v1-6-8c6896fdce66@microchip.com> <20241002054750.043ac565@kernel.org> <20241002133132.srux64dniwk4iusz@DEN-DL-M70577> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241002_073354_497637_8150610E X-CRM114-Status: GOOD ( 11.31 ) 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, 2 Oct 2024 13:31:32 +0000 Daniel Machon wrote: > By "type the code out" - are you saying that we should not be using a macro > for accessing the const at all? and rather just: > > struct sparx5_consts *consts = sparx5->data->consts; > consts->some_var This. > or pass in the sparx5 pointer to the macro too, which was the concert that > Jacob raised. The implicit arguments are part of the ugliness, and should also go away. But in this case the entire macro should go.