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 X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4A5EC433DB for ; Tue, 30 Mar 2021 00:11:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 67C016192F for ; Tue, 30 Mar 2021 00:11:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 67C016192F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=cWr0QigrpadObsFqPDkSqDjhN7jBz9GqGpI3eSifLF4=; b=qA3S5A3gqWm82PfAnLrT6H/Mq C74NS5c4LK7/5ObtRV3qxqKpdfTTQnIIxaCLwKENzsOG55SV4Igz8lNIoAcQUJpIHHjcChkO0lWvL 6CcaM35bUBv3ZKJrLEybtIXc3wRB7H+vXemP+5cwObXrVsLf/TTRSPBuxMOF4Uy54qFqCsQuNNQ8t z12y9Cg0qRxbNR6J/U1RH8r03/rHPb/TpEIZMJu23ExkeY5KMGzNcf4IShlaEO4YXecnMptqkrDPu P+BCkJV4kZBW3mjtkEkHKmrxDgZw0MRE2lQCrAerCWr7qeSZnCFwCKsS4nZGPeGAp2pdmLZuFzpml 8FcZzaZIw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lR1x9-0027hl-GA; Tue, 30 Mar 2021 00:09:51 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lQx2x-001912-BB for linux-arm-kernel@lists.infradead.org; Mon, 29 Mar 2021 18:56:25 +0000 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lQx2p-00Drfi-AO; Mon, 29 Mar 2021 20:55:23 +0200 Date: Mon, 29 Mar 2021 20:55:23 +0200 From: Andrew Lunn To: Steen Hegelund Cc: Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, Alexandre Belloni , Microchip UNG Driver List , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH linux-next 1/1] phy: Sparx5 Eth SerDes: Use direct register operations Message-ID: References: <20210329081438.558885-1-steen.hegelund@microchip.com> <20210329081438.558885-2-steen.hegelund@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210329081438.558885-2-steen.hegelund@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210329_195623_300516_A305E44D X-CRM114-Status: GOOD ( 16.05 ) 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 Mon, Mar 29, 2021 at 10:14:38AM +0200, Steen Hegelund wrote: > Use direct register operations instead of a table of register > information to lower the stack usage. > > Signed-off-by: Steen Hegelund > Reported-by: kernel test robot > --- > drivers/phy/microchip/sparx5_serdes.c | 1869 +++++++++++++------------ > 1 file changed, 951 insertions(+), 918 deletions(-) > > diff --git a/drivers/phy/microchip/sparx5_serdes.c b/drivers/phy/microchip/sparx5_serdes.c > index 06bcf0c166cf..43de68a62c2f 100644 > --- a/drivers/phy/microchip/sparx5_serdes.c > +++ b/drivers/phy/microchip/sparx5_serdes.c > @@ -343,12 +343,6 @@ struct sparx5_sd10g28_params { > u8 fx_100; > }; > > -struct sparx5_serdes_regval { > - u32 value; > - u32 mask; > - void __iomem *addr; > -}; > - > static struct sparx5_sd25g28_media_preset media_presets_25g[] = { > { /* ETH_MEDIA_DEFAULT */ > .cfg_en_adv = 0, > @@ -945,431 +939,411 @@ static void sparx5_sd25g28_reset(void __iomem *regs[], > } > } > > -static int sparx5_sd25g28_apply_params(struct device *dev, > - void __iomem *regs[], > - struct sparx5_sd25g28_params *params, > - u32 sd_index) > +static int sparx5_sd25g28_apply_params(struct sparx5_serdes_macro *macro, > + struct sparx5_sd25g28_params *params) > { > - struct sparx5_serdes_regval item[] = { Could you just add const here, and then it is no longer on the stack? Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel