[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <34cd22d6cec046e3adf402accb1453cc255b9042.1610207523.git.asml.silence@gmail.com>
Date: Sat, 9 Jan 2021 15:53:27 +0000
From: Pavel Begunkov <asml.silence@...il.com>
To: "Martin K . Petersen" <martin.petersen@...cle.com>
Cc: linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] target/file: don't zero iter before iov_iter_bvec
iov_iter_bvec() initialises iterators well, no need to pre-zero it
beforehand as done in fd_execute_rw_aio(). Compilers can't optimise it
out and generate extra code for that (confirmed with assembly).
Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
---
drivers/target/target_core_file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index cce455929778..5a66854def95 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -267,7 +267,7 @@ fd_execute_rw_aio(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents,
struct fd_dev *fd_dev = FD_DEV(dev);
struct file *file = fd_dev->fd_file;
struct target_core_file_cmd *aio_cmd;
- struct iov_iter iter = {};
+ struct iov_iter iter;
struct scatterlist *sg;
ssize_t len = 0;
int ret = 0, i;
--
2.24.0
Powered by blists - more mailing lists