All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lifshits, Vitaly" <vitaly.lifshits@intel.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>,
	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: Thu, 19 Jun 2025 16:01:21 +0300	[thread overview]
Message-ID: <53614312-ef1e-48cc-a6de-e194981feec1@intel.com> (raw)
In-Reply-To: <eaed1854-ec73-43e1-b5c9-5a2be8268ffc@intel.com>



On 6/18/2025 7:29 PM, Alexander Lobakin wrote:
> 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>
Reviewed-by: Vitaly Lifshits <vitaly.lifshits@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


  reply	other threads:[~2025-06-19 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-18 13:54 [Intel-wired-lan] [PATCH] igc: Make the const read-only array supported_sizes static Colin Ian King
2025-06-18 13:54 ` Colin Ian King
2025-06-18 16:29 ` [Intel-wired-lan] " Alexander Lobakin
2025-06-19 13:01   ` Lifshits, Vitaly [this message]
2025-06-19 22:50 ` patchwork-bot+netdevbpf
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=53614312-ef1e-48cc-a6de-e194981feec1@intel.com \
    --to=vitaly.lifshits@intel.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.