git: a2056e854957 - main - cam/mmc: Use xpt_path_inq instead of hand-rollded equivalent

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 07 Jul 2025 23:18:20 UTC
The branch main has been updated by imp:

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

commit a2056e854957dce7f8a4c1feb7d0220be9697385
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-07-07 20:04:51 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-07-07 23:17:00 +0000

    cam/mmc: Use xpt_path_inq instead of hand-rollded equivalent
    
    There's no reason to inline xpt_path_inq here. While there was a
    mismatch between this use (CAM_PRIORITY_NONE) and the old xpt_path_inq
    code (which used CAM_PRIORITY_NORMAL), xpt_path_inq has been corrected
    to use _NONE since this is a non-queued command.
    
    Sponsored by:           Netflix
    Reviewed by:            jhb
    Differential Revision:  https://reviews.freebsd.org/D51168
---
 sys/cam/mmc/mmc_da.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index 9246f95a080e..3815561898bd 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -1523,10 +1523,7 @@ sdda_add_part(struct cam_periph *periph, u_int type, const char *name,
 
 	bioq_init(&part->bio_queue);
 
-	bzero(&cpi, sizeof(cpi));
-	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NONE);
-	cpi.ccb_h.func_code = XPT_PATH_INQ;
-	xpt_action((union ccb *)&cpi);
+	xpt_path_inq(&cpi, periph->path);
 
 	/*
 	 * Register this media as a disk