Skip to contentSkip to conversation

net: prestera: acl: make read-only array client_map static const

PATCH Applied Colin Ian King 2 participants 2 messages Mar 7, 2022 – Mar 9, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: prestera: acl: make read-only array client_map static const

Don't populate the read-only array client_map on the stack but instead make it static const. Also makes the object code a little smaller.

---
 drivers/net/ethernet/marvell/prestera/prestera_acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/marvell/prestera/prestera_acl.c +1 -1
index e4af8a503277..47c899c08951 100644
@@ -91,7 +91,7 @@ static const struct rhashtable_params __prestera_acl_rule_entry_ht_params = {
 
 int prestera_acl_chain_to_client(u32 chain_index, u32 *client)
 {
-	u32 client_map[] = {
+	static const u32 client_map[] = {
 		PRESTERA_HW_COUNTER_CLIENT_LOOKUP_0,
 		PRESTERA_HW_COUNTER_CLIENT_LOOKUP_1,
 		PRESTERA_HW_COUNTER_CLIENT_LOOKUP_2
Signature · 1 line
2.35.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Mon, 7 Mar 2022 22:13:49 +0000 you wrote:

Don't populate the read-only array client_map on the stack but instead make it static const. Also makes the object code a little smaller.

---
 drivers/net/ethernet/marvell/prestera/prestera_acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- [next] net: prestera: acl: make read-only array client_map static const

    https://git.kernel.org/netdev/net-next/c/d82a6c5ef9dc

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html