qed: populate supported link modes maps on module init
authorAlexander Lobakin <alobakin@marvell.com>
Mon, 20 Jul 2020 18:08:14 +0000 (21:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jul 2020 00:59:44 +0000 (17:59 -0700)
commit097818fcf81d672e32229fcc52a3370ccae8d3c5
tree9995cf8acf479a4f7afacef31021a0adb1348cbb
parent98e675ec5a92a15f6f8ade41eda883cd39df5712
qed: populate supported link modes maps on module init

Simplify and lighten qed_set_link() by declaring static link modes maps
and populating them on module init. This way we save plenty of text size
at the low expense of __ro_after_init and __initconst data (the latter
will be purged after module init is done).

Misc: sanitize exit callback.

Signed-off-by: Alexander Lobakin <alobakin@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_main.c