From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: isubramanian@apm.com, kchudgar@apm.com, kdinh@apm.com,
qnguyen@apm.com, tinamdar@apm.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] net: xgene: move xgene_cle_ptree_ewdn data off stack
Date: Thu, 08 Dec 2016 21:31:10 -0500 (EST) [thread overview]
Message-ID: <20161208.213110.1398471429588400159.davem@davemloft.net> (raw)
In-Reply-To: <20161208215727.44841-2-arnd@arndb.de>
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 8 Dec 2016 22:57:04 +0100
> The array for initializing the cle is set up on the stack with
> almost entirely constant data and then passed to a function that
> converts it into HW specific bit patterns. With the latest
> addition, the size of this array has grown to the point that
> we get a warning about potential stack overflow in allmodconfig
> builds:
>
> xgene_enet_cle.c: In function ‘xgene_enet_cle_init’:
> xgene_enet_cle.c:836:1: error: the frame size of 1032 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
>
> Looking a bit deeper at the usage, I noticed that the only modification
> of the data is in dead code, as we don't even use the cle module
> for phy_mode other than PHY_INTERFACE_MODE_XGMII. This means we
> can simply mark the structure constant and access it directly rather
> than passing the pointer down through another structure, making
> the code more efficient at the same time as avoiding the
> warning.
>
> Fixes: a809701fed15 ("drivers: net: xgene: fix: RSS for non-TCP/UDP")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Applied.
next prev parent reply other threads:[~2016-12-09 2:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 21:57 [PATCH net-next 1/3] net/mlx5e: use %pad format string for dma_addr_t Arnd Bergmann
2016-12-08 21:57 ` [PATCH net-next 2/3] net: xgene: move xgene_cle_ptree_ewdn data off stack Arnd Bergmann
2016-12-09 2:31 ` David Miller [this message]
2016-12-08 21:57 ` [PATCH net-next 3/3] net: xgene: avoid bogus maybe-uninitialized warning Arnd Bergmann
2016-12-09 2:31 ` David Miller
2016-12-08 23:16 ` [PATCH net-next 1/3] net/mlx5e: use %pad format string for dma_addr_t Saeed Mahameed
2016-12-09 2:31 ` David Miller
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=20161208.213110.1398471429588400159.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=arnd@arndb.de \
--cc=isubramanian@apm.com \
--cc=kchudgar@apm.com \
--cc=kdinh@apm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=qnguyen@apm.com \
--cc=tinamdar@apm.com \
/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).