diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2019-12-12 22:35:41 +0100 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-12-15 11:07:49 -0800 |
commit | 29115cef85781057e78f0c967979edd40b16c209 (patch) | |
tree | 776386e7c5967c5937a98a61e15d172638003e93 | |
parent | f5058a27dac700952d5551bd7c5546f52b0468e4 (diff) |
net/smc: shorten lgr_cnt initialization
Save a line of code by making use of ATOMIC_INIT() for lgr_cnt.
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
-rw-r--r-- | net/smc/smc_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index bb92c7c6214c..c16b8d3e200b 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -41,7 +41,7 @@ static struct smc_lgr_list smc_lgr_list = { /* established link groups */ .num = 0, }; -static atomic_t lgr_cnt; /* number of existing link groups */ +static atomic_t lgr_cnt = ATOMIC_INIT(0); /* number of existing link groups */ static DECLARE_WAIT_QUEUE_HEAD(lgrs_deleted); static void smc_buf_free(struct smc_link_group *lgr, bool is_rmb, @@ -1297,7 +1297,6 @@ static struct notifier_block smc_reboot_notifier = { int __init smc_core_init(void) { - atomic_set(&lgr_cnt, 0); return register_reboot_notifier(&smc_reboot_notifier); } |