diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-03-11 12:27:56 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-12 11:12:38 -0400 |
commit | bdf08fc5412045f7648a49791d98cd04f72c1c1f (patch) | |
tree | 946d2a45ea30415db3b511d75ea1463837377f70 /net | |
parent | bbfa047a25c379e467536c5ed2ba00c0cb602ca1 (diff) |
rds: remove redundant variable 'sg_off'
Variable sg_off is assigned a value but it is never read, hence it is
redundant and can be removed.
Cleans up clang warning:
net/rds/message.c:373:2: warning: Value stored to 'sg_off' is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/rds/message.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/rds/message.c b/net/rds/message.c index 4462e4c9bd7d..a35f76971984 100644 --- a/net/rds/message.c +++ b/net/rds/message.c | |||
@@ -357,7 +357,6 @@ struct rds_message *rds_message_map_pages(unsigned long *page_addrs, unsigned in | |||
357 | 357 | ||
358 | static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *from) | 358 | static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *from) |
359 | { | 359 | { |
360 | unsigned long sg_off; | ||
361 | struct scatterlist *sg; | 360 | struct scatterlist *sg; |
362 | int ret = 0; | 361 | int ret = 0; |
363 | int length = iov_iter_count(from); | 362 | int length = iov_iter_count(from); |
@@ -370,7 +369,6 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter * | |||
370 | * now allocate and copy in the data payload. | 369 | * now allocate and copy in the data payload. |
371 | */ | 370 | */ |
372 | sg = rm->data.op_sg; | 371 | sg = rm->data.op_sg; |
373 | sg_off = 0; /* Dear gcc, sg->page will be null from kzalloc. */ | ||
374 | 372 | ||
375 | info = kzalloc(sizeof(*info), GFP_KERNEL); | 373 | info = kzalloc(sizeof(*info), GFP_KERNEL); |
376 | if (!info) | 374 | if (!info) |