Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] dpaa2-eth: make the array faf_bits static const, makes object smaller
@ 2021-08-01 15:22 Colin King
2021-08-02 22:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-01 15:22 UTC (permalink / raw)
To: Ioana Ciornei, David S . Miller, Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the array faf_bits on the stack but instead it
static const. Makes the object code smaller by 175 bytes.
Before:
text data bss dec hex filename
9645 4552 0 14197 3775 ../freescale/dpaa2/dpaa2-eth-devlink.o
After:
text data bss dec hex filename
9406 4616 0 14022 36c6 ../freescale/dpaa2/dpaa2-eth-devlink.o
(gcc version 10.2.0)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
index 833696245565..8e09f65ea295 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-devlink.c
@@ -68,7 +68,7 @@ dpaa2_eth_dl_trap_item_lookup(struct dpaa2_eth_priv *priv, u16 trap_id)
struct dpaa2_eth_trap_item *dpaa2_eth_dl_get_trap(struct dpaa2_eth_priv *priv,
struct dpaa2_fapr *fapr)
{
- struct dpaa2_faf_error_bit {
+ static const struct dpaa2_faf_error_bit {
int position;
enum devlink_trap_generic_id trap_id;
} faf_bits[] = {
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dpaa2-eth: make the array faf_bits static const, makes object smaller
2021-08-01 15:22 [PATCH] dpaa2-eth: make the array faf_bits static const, makes object smaller Colin King
@ 2021-08-02 22:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-02 22:10 UTC (permalink / raw)
To: Colin King
Cc: ioana.ciornei, davem, kuba, netdev, kernel-janitors, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Sun, 1 Aug 2021 16:22:09 +0100 you wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the array faf_bits on the stack but instead it
> static const. Makes the object code smaller by 175 bytes.
>
> Before:
> text data bss dec hex filename
> 9645 4552 0 14197 3775 ../freescale/dpaa2/dpaa2-eth-devlink.o
>
> [...]
Here is the summary with links:
- dpaa2-eth: make the array faf_bits static const, makes object smaller
https://git.kernel.org/netdev/net-next/c/d5731f891a0c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-02 22:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 15:22 [PATCH] dpaa2-eth: make the array faf_bits static const, makes object smaller Colin King
2021-08-02 22:10 ` patchwork-bot+netdevbpf
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).