mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
mptcp: remove unnecessary else statements
The 'else' statements are not needed here, because their previous 'if' block ends with a 'return'. This fixes CheckPatch warnings: WARNING: else is not generally useful after a break or return Reviewed-by: Geliang Tang <geliang@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Signed-off-by: Mat Martineau <martineau@kernel.org> Link: https://lore.kernel.org/r/20240514011335.176158-7-martineau@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
5eae7a8202
commit
00797af95f
@ -1119,6 +1119,8 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
|
||||
}
|
||||
|
||||
if (mpext->data_fin == 1) {
|
||||
u64 data_fin_seq;
|
||||
|
||||
if (data_len == 1) {
|
||||
bool updated = mptcp_update_rcv_data_fin(msk, mpext->data_seq,
|
||||
mpext->dsn64);
|
||||
@ -1131,17 +1133,18 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
|
||||
*/
|
||||
skb_ext_del(skb, SKB_EXT_MPTCP);
|
||||
return MAPPING_OK;
|
||||
} else {
|
||||
}
|
||||
|
||||
if (updated)
|
||||
mptcp_schedule_work((struct sock *)msk);
|
||||
|
||||
return MAPPING_DATA_FIN;
|
||||
}
|
||||
} else {
|
||||
u64 data_fin_seq = mpext->data_seq + data_len - 1;
|
||||
|
||||
/* If mpext->data_seq is a 32-bit value, data_fin_seq
|
||||
* must also be limited to 32 bits.
|
||||
data_fin_seq = mpext->data_seq + data_len - 1;
|
||||
|
||||
/* If mpext->data_seq is a 32-bit value, data_fin_seq must also
|
||||
* be limited to 32 bits.
|
||||
*/
|
||||
if (!mpext->dsn64)
|
||||
data_fin_seq &= GENMASK_ULL(31, 0);
|
||||
@ -1149,7 +1152,6 @@ static enum mapping_status get_mapping_status(struct sock *ssk,
|
||||
mptcp_update_rcv_data_fin(msk, data_fin_seq, mpext->dsn64);
|
||||
pr_debug("DATA_FIN with mapping seq=%llu dsn64=%d",
|
||||
data_fin_seq, mpext->dsn64);
|
||||
}
|
||||
|
||||
/* Adjust for DATA_FIN using 1 byte of sequence space */
|
||||
data_len--;
|
||||
|
Loading…
Reference in New Issue
Block a user