Message ID | 20210801152650.146572-1-colin.king@canonical.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 771edeabcb9530e9e8020fb5f38111ba5dc1ad9c |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: 3c509: make the array if_names static const, makes object smaller | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 5 maintainers not CCed: hverkuil-cisco@xs4all.nl gustavoars@kernel.org tiwai@suse.de uwe@kleine-koenig.org wsa@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 6 this patch: 6 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 10 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 6 this patch: 6 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Sun, 1 Aug 2021 16:26:50 +0100 you wrote: > From: Colin Ian King <colin.king@canonical.com> > > Don't populate the array if_names on the stack but instead it > static const. Makes the object code smaller by 99 bytes. > > Before: > text data bss dec hex filename > 27886 10752 672 39310 998e ./drivers/net/ethernet/3com/3c509.o > > [...] Here is the summary with links: - net: 3c509: make the array if_names static const, makes object smaller https://git.kernel.org/netdev/net-next/c/771edeabcb95 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c index 96cc5fc36eb5..00c4b038be49 100644 --- a/drivers/net/ethernet/3com/3c509.c +++ b/drivers/net/ethernet/3com/3c509.c @@ -514,7 +514,9 @@ static int el3_common_init(struct net_device *dev) { struct el3_private *lp = netdev_priv(dev); int err; - const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"}; + static const char * const if_names[] = { + "10baseT", "AUI", "undefined", "BNC" + }; spin_lock_init(&lp->lock);