diff options
author | Stefan Raspl <raspl@linux.ibm.com> | 2018-07-23 13:53:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-23 10:57:14 -0700 |
commit | 00e5fb263f9f5f2af60754b79b7dcec0d5e88154 (patch) | |
tree | bc20d7d57cf070dfe0736eb8fad4ed855304210e /net/smc/smc_core.h | |
parent | bac6de7b637018f4caacfdf2b4ad8c8749de7420 (diff) | |
download | linux-00e5fb263f9f5f2af60754b79b7dcec0d5e88154.tar.bz2 |
net/smc: add function to get link group from link
Replace a frequently used construct with a more readable variant,
reducing the code. Also might come handy when we start to support
more than a single per link group.
Signed-off-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r-- | net/smc/smc_core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h index 8b47e0168fc3..8807865483bb 100644 --- a/net/smc/smc_core.h +++ b/net/smc/smc_core.h @@ -266,4 +266,9 @@ int smc_conn_create(struct smc_sock *smc, bool is_smcd, int srv_first_contact, u64 peer_gid); void smcd_conn_free(struct smc_connection *conn); void smc_core_exit(void); + +static inline struct smc_link_group *smc_get_lgr(struct smc_link *link) +{ + return container_of(link, struct smc_link_group, lnk[SMC_SINGLE_LINK]); +} #endif |