* [PATCH] aha1542: use memcpy_{from,to}_bvec
@ 2021-10-18 6:08 Christoph Hellwig
2021-10-19 3:09 ` Martin K. Petersen
2021-10-21 3:42 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2021-10-18 6:08 UTC (permalink / raw)
To: martin.petersen; +Cc: linux-scsi
Use the memcpy_{from,to}_bvec helpers instead of open coding them.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/scsi/aha1542.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 584a59522038b..07efdad1ae378 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -268,8 +268,7 @@ static void aha1542_free_cmd(struct scsi_cmnd *cmd)
struct bio_vec bv;
rq_for_each_segment(bv, rq, iter) {
- memcpy_to_page(bv.bv_page, bv.bv_offset, buf,
- bv.bv_len);
+ memcpy_to_bvec(&bv, buf);
buf += bv.bv_len;
}
}
@@ -454,8 +453,7 @@ static int aha1542_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *cmd)
struct bio_vec bv;
rq_for_each_segment(bv, rq, iter) {
- memcpy_from_page(buf, bv.bv_page, bv.bv_offset,
- bv.bv_len);
+ memcpy_from_bvec(buf, &bv);
buf += bv.bv_len;
}
}
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] aha1542: use memcpy_{from,to}_bvec
2021-10-18 6:08 [PATCH] aha1542: use memcpy_{from,to}_bvec Christoph Hellwig
@ 2021-10-19 3:09 ` Martin K. Petersen
2021-10-21 3:42 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-10-19 3:09 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: martin.petersen, linux-scsi
Christoph,
> Use the memcpy_{from,to}_bvec helpers instead of open coding them.
Applied to 5.16/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] aha1542: use memcpy_{from,to}_bvec
2021-10-18 6:08 [PATCH] aha1542: use memcpy_{from,to}_bvec Christoph Hellwig
2021-10-19 3:09 ` Martin K. Petersen
@ 2021-10-21 3:42 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2021-10-21 3:42 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Martin K . Petersen, linux-scsi
On Mon, 18 Oct 2021 08:08:02 +0200, Christoph Hellwig wrote:
> Use the memcpy_{from,to}_bvec helpers instead of open coding them.
>
>
Applied to 5.16/scsi-queue, thanks!
[1/1] aha1542: use memcpy_{from,to}_bvec
https://git.kernel.org/mkp/scsi/c/e6ab6113526a
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-21 3:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18 6:08 [PATCH] aha1542: use memcpy_{from,to}_bvec Christoph Hellwig
2021-10-19 3:09 ` Martin K. Petersen
2021-10-21 3:42 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).