From: Andrew Lunn <andrew@lunn.ch>
To: Steen Hegelund <steen.hegelund@microchip.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
Vinod Koul <vkoul@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Microchip UNG Driver List <UNGLinuxDriver@microchip.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH linux-next 1/1] phy: Sparx5 Eth SerDes: Use direct register operations
Date: Mon, 29 Mar 2021 20:55:23 +0200 [thread overview]
Message-ID: <YGIimz9UnVYWfcXH@lunn.ch> (raw)
In-Reply-To: <20210329081438.558885-2-steen.hegelund@microchip.com>
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 <steen.hegelund@microchip.com>
> Reported-by: kernel test robot <lkp@intel.com>
> ---
> 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
next prev parent reply other threads:[~2021-03-29 18:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 8:14 [PATCH linux-next 0/1] Sparx5 SerDes: Fixed stack frame size warning Steen Hegelund
2021-03-29 8:14 ` [PATCH linux-next 1/1] phy: Sparx5 Eth SerDes: Use direct register operations Steen Hegelund
2021-03-29 18:55 ` Andrew Lunn [this message]
2021-03-30 8:18 ` Steen Hegelund
2021-03-30 13:34 ` Andrew Lunn
2021-03-30 13:59 ` Steen Hegelund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YGIimz9UnVYWfcXH@lunn.ch \
--to=andrew@lunn.ch \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=kishon@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=steen.hegelund@microchip.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).