diff options
author | Ursula Braun <ubraun@linux.ibm.com> | 2020-09-26 12:44:21 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-28 15:19:02 -0700 |
commit | 7affc809822a4e14b068a7bc6462c5b035e0043d (patch) | |
tree | dfd3a777e17dd239dabcfec9fa73b91b4f2f8433 /net/smc/smc_clc.c | |
parent | f1eb02f952448405e360d94649846668c32364e1 (diff) |
net/smc: separate find device functions
This patch provides better separation of device determinations
in function smc_listen_work(). No functional change.
Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_clc.c')
-rw-r--r-- | net/smc/smc_clc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/smc/smc_clc.c b/net/smc/smc_clc.c index 524d2b225640..85b41c125368 100644 --- a/net/smc/smc_clc.c +++ b/net/smc/smc_clc.c @@ -450,7 +450,7 @@ int smc_clc_send_proposal(struct smc_sock *smc, int smc_type, pclc_base->hdr.type = SMC_CLC_PROPOSAL; pclc_base->hdr.version = SMC_V1; /* SMC version */ pclc_base->hdr.typev1 = smc_type; - if (smc_type == SMC_TYPE_R || smc_type == SMC_TYPE_B) { + if (smcr_indicated(smc_type)) { /* add SMC-R specifics */ memcpy(pclc_base->lcl.id_for_peer, local_systemid, sizeof(local_systemid)); @@ -459,7 +459,7 @@ int smc_clc_send_proposal(struct smc_sock *smc, int smc_type, ETH_ALEN); pclc_base->iparea_offset = htons(0); } - if (smc_type == SMC_TYPE_D || smc_type == SMC_TYPE_B) { + if (smcd_indicated(smc_type)) { /* add SMC-D specifics */ plen += sizeof(*pclc_smcd); pclc_base->iparea_offset = htons(sizeof(*pclc_smcd)); @@ -472,7 +472,7 @@ int smc_clc_send_proposal(struct smc_sock *smc, int smc_type, i = 0; vec[i].iov_base = pclc_base; vec[i++].iov_len = sizeof(*pclc_base); - if (smc_type == SMC_TYPE_D || smc_type == SMC_TYPE_B) { + if (smcd_indicated(smc_type)) { vec[i].iov_base = pclc_smcd; vec[i++].iov_len = sizeof(*pclc_smcd); } |