git: 70efe1a2fe13 - main - ccr,ccp: Fix argument order to sglist_append_vmpages.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 06 Feb 2023 21:52:21 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=70efe1a2fe13642732e56c7f040fe63f62bc6a6b

commit 70efe1a2fe13642732e56c7f040fe63f62bc6a6b
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2023-02-06 21:51:57 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2023-02-06 21:51:57 +0000

    ccr,ccp: Fix argument order to sglist_append_vmpages.
    
    The offset comes before the byte count.
    
    Reported by:    br
    Reviewed by:    asomers, markj
    MFC after:      1 week
    Sponsored by:   DARPA
    Differential Revision:  https://reviews.freebsd.org/D38375
---
 sys/crypto/ccp/ccp.c             | 2 +-
 sys/dev/cxgbe/crypto/t4_crypto.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/crypto/ccp/ccp.c b/sys/crypto/ccp/ccp.c
index 3f2b89545e8f..543ac3c2a913 100644
--- a/sys/crypto/ccp/ccp.c
+++ b/sys/crypto/ccp/ccp.c
@@ -112,7 +112,7 @@ ccp_populate_sglist(struct sglist *sg, struct crypto_buffer *cb)
 		break;
 	case CRYPTO_BUF_VMPAGE:
 		error = sglist_append_vmpages(sg, cb->cb_vm_page,
-		    cb->cb_vm_page_len, cb->cb_vm_page_offset);
+		    cb->cb_vm_page_offset, cb->cb_vm_page_len);
 		break;
 	default:
 		error = EINVAL;
diff --git a/sys/dev/cxgbe/crypto/t4_crypto.c b/sys/dev/cxgbe/crypto/t4_crypto.c
index c4d0bbf868a9..a60540c7fb40 100644
--- a/sys/dev/cxgbe/crypto/t4_crypto.c
+++ b/sys/dev/cxgbe/crypto/t4_crypto.c
@@ -296,7 +296,7 @@ ccr_populate_sglist(struct sglist *sg, struct crypto_buffer *cb)
 		break;
 	case CRYPTO_BUF_VMPAGE:
 		error = sglist_append_vmpages(sg, cb->cb_vm_page,
-		    cb->cb_vm_page_len, cb->cb_vm_page_offset);
+		    cb->cb_vm_page_offset, cb->cb_vm_page_len);
 		break;
 	default:
 		error = EINVAL;