Commit 29115cef authored by Ursula Braun's avatar Ursula Braun Committed by Jakub Kicinski

net/smc: shorten lgr_cnt initialization

Save a line of code by making use of ATOMIC_INIT() for lgr_cnt.
Suggested-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent f5058a27
...@@ -41,7 +41,7 @@ static struct smc_lgr_list smc_lgr_list = { /* established link groups */ ...@@ -41,7 +41,7 @@ static struct smc_lgr_list smc_lgr_list = { /* established link groups */
.num = 0, .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 DECLARE_WAIT_QUEUE_HEAD(lgrs_deleted);
static void smc_buf_free(struct smc_link_group *lgr, bool is_rmb, static void smc_buf_free(struct smc_link_group *lgr, bool is_rmb,
...@@ -1297,7 +1297,6 @@ static struct notifier_block smc_reboot_notifier = { ...@@ -1297,7 +1297,6 @@ static struct notifier_block smc_reboot_notifier = {
int __init smc_core_init(void) int __init smc_core_init(void)
{ {
atomic_set(&lgr_cnt, 0);
return register_reboot_notifier(&smc_reboot_notifier); return register_reboot_notifier(&smc_reboot_notifier);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment