igc: Make the const read-only array supported_sizes static
Subsystems (4)
PATCH 1/1 igc: Make the const read-only array supported_sizes static
Don't populate the const read-only array supported_sizes on the stack at run time, instead make it static.
--- drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/igc/igc_tsn.c +1 -1
@@ -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++) {
Signature · 1 line
2.49.0
From: Colin Ian King <[email protected]>
Date: Wed, 18 Jun 2025 14:54:08 +0100
Quoted 4 lines
Don't populate the const read-only array
supported_sizeson the stack at run time, instead make it static.Signed-off-by Colin Ian King <[email protected]>
Quoted 9 lines
--- drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igc/igc_tsn.c +0
-0
drivers/net/ethernet/intel/igc/igc_tsn.c static u8 igc_fpe_get_frag_size_mult(const struct igc_fpe_t *fpe) · line 437
Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_tsn.c +1
-1@@ -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
Lifshits, Vitaly
Reviewed-byQuoted 9 lines · Alexander Lobakin
From: Colin Ian King <[email protected]>
Date: Wed, 18 Jun 2025 14:54:08 +0100Quoted 4 lines
Don't populate the const read-only array
supported_sizeson the stack at run time, instead make it static.Signed-off-by Colin Ian King <[email protected]>Reviewed-by Alexander Lobakin <[email protected]>
Quoted 20 lines
Quoted 9 lines
--- drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/igc/igc_tsn.c +0
-0drivers/net/ethernet/intel/igc/igc_tsn.c static u8 igc_fpe_get_frag_size_mult(const struct igc_fpe_t *fpe) · line 437
Quoted 8 lines
drivers/net/ethernet/intel/igc/igc_tsn.c +1
-1@@ -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
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Wed, 18 Jun 2025 14:54:08 +0100 you wrote:
Don't populate the const read-only array
supported_sizeson the stack at run time, instead make it static.Signed-off-by Colin Ian King <[email protected]>--- drivers/net/ethernet/intel/igc/igc_tsn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- igc: Make the const read-only array supported_sizes static
https://git.kernel.org/netdev/net-next/c/deb21a6e5b4a
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html