summaryrefslogtreecommitdiff
path: root/net/smc/smc_ib.c
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.ibm.com>2018-07-23 13:53:10 +0200
committerDavid S. Miller <davem@davemloft.net>2018-07-23 10:57:14 -0700
commit00e5fb263f9f5f2af60754b79b7dcec0d5e88154 (patch)
treebc20d7d57cf070dfe0736eb8fad4ed855304210e /net/smc/smc_ib.c
parentbac6de7b637018f4caacfdf2b4ad8c8749de7420 (diff)
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_ib.c')
-rw-r--r--net/smc/smc_ib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/smc/smc_ib.c b/net/smc/smc_ib.c
index 36de2fd76170..4706ab7092a9 100644
--- a/net/smc/smc_ib.c
+++ b/net/smc/smc_ib.c
@@ -112,8 +112,7 @@ int smc_ib_modify_qp_reset(struct smc_link *lnk)
int smc_ib_ready_link(struct smc_link *lnk)
{
- struct smc_link_group *lgr =
- container_of(lnk, struct smc_link_group, lnk[0]);
+ struct smc_link_group *lgr = smc_get_lgr(lnk);
int rc = 0;
rc = smc_ib_modify_qp_init(lnk);