Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rds: remove redundant variable total_payload_len

Variable total_payload_len is being used to accumulate payload lengths
however it is never read or used afterwards. It is redundant and can
be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Colin Ian King and committed by
David S. Miller
d28c0e73 b3809277

+1 -2
+1 -2
net/rds/send.c
··· 1114 1114 struct rds_conn_path *cpath; 1115 1115 struct in6_addr daddr; 1116 1116 __u32 scope_id = 0; 1117 - size_t total_payload_len = payload_len, rdma_payload_len = 0; 1117 + size_t rdma_payload_len = 0; 1118 1118 bool zcopy = ((msg->msg_flags & MSG_ZEROCOPY) && 1119 1119 sock_flag(rds_rs_to_sk(rs), SOCK_ZEROCOPY)); 1120 1120 int num_sgs = DIV_ROUND_UP(payload_len, PAGE_SIZE); ··· 1243 1243 if (ret) 1244 1244 goto out; 1245 1245 1246 - total_payload_len += rdma_payload_len; 1247 1246 if (max_t(size_t, payload_len, rdma_payload_len) > RDS_MAX_MSG_SIZE) { 1248 1247 ret = -EMSGSIZE; 1249 1248 goto out;