Skip to content

Commit d37307e

Browse files
zhengchaoshaodavem330
authored andcommitted
net/smc: remove redundant code in smc_connect_check_aclc
When the SMC client perform CLC handshake, it will check whether the clc header type is correct in receiving SMC_CLC_ACCEPT packet. The specific invoking path is as follows: __smc_connect smc_connect_clc smc_clc_wait_msg smc_clc_msg_hdr_valid smc_clc_msg_acc_conf_valid Therefore, the smc_connect_check_aclc interface invoked by __smc_connect does not need to check type again. Signed-off-by: Zhengchao Shao <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5a79575 commit d37307e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

net/smc/af_smc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,10 +1466,6 @@ static int smc_connect_ism(struct smc_sock *smc,
14661466
static int smc_connect_check_aclc(struct smc_init_info *ini,
14671467
struct smc_clc_msg_accept_confirm *aclc)
14681468
{
1469-
if (aclc->hdr.typev1 != SMC_TYPE_R &&
1470-
aclc->hdr.typev1 != SMC_TYPE_D)
1471-
return SMC_CLC_DECL_MODEUNSUPP;
1472-
14731469
if (aclc->hdr.version >= SMC_V2) {
14741470
if ((aclc->hdr.typev1 == SMC_TYPE_R &&
14751471
!smcr_indicated(ini->smc_type_v2)) ||

0 commit comments

Comments
 (0)