diff mbox series

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

Message ID 20220307221349.164585-1-colin.i.king@gmail.com (mailing list archive)
State Accepted
Commit d82a6c5ef9dc0aab296936e1aa4ad28fd5162a55
Delegated to: Netdev Maintainers
Headers show
Series [next] net: prestera: acl: make read-only array client_map static const | expand

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 4 of 4 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Colin Ian King March 7, 2022, 10:13 p.m. UTC
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.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/net/ethernet/marvell/prestera/prestera_acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org March 9, 2022, 6:30 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

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.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  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!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/prestera/prestera_acl.c b/drivers/net/ethernet/marvell/prestera/prestera_acl.c
index e4af8a503277..47c899c08951 100644
--- a/drivers/net/ethernet/marvell/prestera/prestera_acl.c
+++ b/drivers/net/ethernet/marvell/prestera/prestera_acl.c
@@ -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