mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steen Hegelund <steen.hegelund@microchip.com>
To: Andrew Lunn <andrew@lunn.ch>
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: Tue, 30 Mar 2021 15:59:55 +0200	[thread overview]
Message-ID: <807aa02ed3d54c2f9b31343e19df91526cc3c14e.camel@microchip.com> (raw)
In-Reply-To: <YGMo4K4b9GIUIGu8@lunn.ch>

Hi Andrew,

On Tue, 2021-03-30 at 15:34 +0200, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> > > > +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
> > 
> > No it still counts against the stack even as a const structure.
> 
> I'm surprised. Maybe it needs static as well?
> 
> I'm just thinking you can get a much smaller patch if you don't need
> to modify the table, just add additional qualifiers.
> 
>    Andrew


I get your point, but the problem is that the initialization depends on the input parameters: serdes
index, port index, media type, speed etc, so it cannot be made static, and making it const still
uses the stack.

BR
Steen




      reply	other threads:[~2021-03-30 14:00 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
2021-03-30  8:18     ` Steen Hegelund
2021-03-30 13:34       ` Andrew Lunn
2021-03-30 13:59         ` Steen Hegelund [this message]

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=807aa02ed3d54c2f9b31343e19df91526cc3c14e.camel@microchip.com \
    --to=steen.hegelund@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrew@lunn.ch \
    --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=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

all inboxes | Powered by JetHome®