Skip to content

Commit

Permalink
net/rds: remove variable total_copied
Browse files Browse the repository at this point in the history
Variable total_copied is just being incremented and it's never used
anywhere else. The variable and the increment are redundant so
remove it.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20221024135046.2159523-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Colin Ian King authored and Jakub Kicinski committed Oct 27, 2022
1 parent e0b3ef1 commit b65ef50
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/rds/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,6 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *
struct scatterlist *sg;
int ret = 0;
int length = iov_iter_count(from);
int total_copied = 0;
struct rds_msg_zcopy_info *info;

rm->m_inc.i_hdr.h_len = cpu_to_be32(iov_iter_count(from));
Expand Down Expand Up @@ -404,7 +403,6 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *
ret = -EFAULT;
goto err;
}
total_copied += copied;
length -= copied;
sg_set_page(sg, pages, copied, start);
rm->data.op_nents++;
Expand Down

0 comments on commit b65ef50

Please sign in to comment.