From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Colin Ian King <colin.i.king@gmail.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH] igc: Make the const read-only array supported_sizes static
Date: Wed, 18 Jun 2025 18:29:36 +0200 [thread overview]
Message-ID: <eaed1854-ec73-43e1-b5c9-5a2be8268ffc@intel.com> (raw)
In-Reply-To: <20250618135408.1784120-1-colin.i.king@gmail.com>
From: Colin Ian King <colin.i.king@gmail.com>
Date: Wed, 18 Jun 2025 14:54:08 +0100
> Don't populate the const read-only array supported_sizes on the
> stack at run time, instead make it static.
>
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> ---
> drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/igc/igc_tsn.c b/drivers/net/ethernet/intel/igc/igc_tsn.c
> index b23b9ca451a7..8a110145bfee 100644
> --- a/drivers/net/ethernet/intel/igc/igc_tsn.c
> +++ b/drivers/net/ethernet/intel/igc/igc_tsn.c
> @@ -431,7 +431,7 @@ static u8 igc_fpe_get_frag_size_mult(const struct igc_fpe_t *fpe)
>
> u32 igc_fpe_get_supported_frag_size(u32 frag_size)
> {
> - const u32 supported_sizes[] = {64, 128, 192, 256};
> + static const u32 supported_sizes[] = { 64, 128, 192, 256 };
>
> /* Find the smallest supported size that is >= frag_size */
> for (int i = 0; i < ARRAY_SIZE(supported_sizes); i++) {
Thanks,
Olek
next prev parent reply other threads:[~2025-06-18 16:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-18 13:54 Colin Ian King
2025-06-18 16:29 ` Alexander Lobakin [this message]
2025-06-19 13:01 ` [Intel-wired-lan] " Lifshits, Vitaly
2025-06-19 22:50 ` patchwork-bot+netdevbpf
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=eaed1854-ec73-43e1-b5c9-5a2be8268ffc@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=colin.i.king@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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
all inboxes | Powered by JetHome®