git: 73551d4f6053 - main - cam/mmc: Migrate to modern uintXX_t from u_intXX_t
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Jul 2023 04:26:33 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=73551d4f6053992fdc73b5d6dd57f26043e9548b
commit 73551d4f6053992fdc73b5d6dd57f26043e9548b
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-07-25 03:17:41 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-07-25 03:32:57 +0000
cam/mmc: Migrate to modern uintXX_t from u_intXX_t
As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html
move to the modern uintXX_t.
MFC After: 3 days
Sponsored by: Netflix
---
sys/cam/mmc/mmc.h | 2 +-
sys/cam/mmc/mmc_da.c | 14 +++++++-------
sys/cam/mmc/mmc_xpt.c | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/sys/cam/mmc/mmc.h b/sys/cam/mmc/mmc.h
index 71738bdce116..15cbfe346199 100644
--- a/sys/cam/mmc/mmc.h
+++ b/sys/cam/mmc/mmc.h
@@ -64,7 +64,7 @@
* This structure describes an MMC/SD card
*/
struct mmc_params {
- u_int8_t model[40]; /* Card model */
+ uint8_t model[40]; /* Card model */
/* Card OCR */
uint32_t card_ocr;
diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c
index 4da343ca817c..45a0500025f1 100644
--- a/sys/cam/mmc/mmc_da.c
+++ b/sys/cam/mmc/mmc_da.c
@@ -166,7 +166,7 @@ static const char *mmc_errmsg[] =
static disk_strategy_t sddastrategy;
static dumper_t sddadump;
static periph_init_t sddainit;
-static void sddaasync(void *callback_arg, u_int32_t code,
+static void sddaasync(void *callback_arg, uint32_t code,
struct cam_path *path, void *arg);
static periph_ctor_t sddaregister;
static periph_dtor_t sddacleanup;
@@ -174,8 +174,8 @@ static periph_start_t sddastart;
static periph_oninv_t sddaoninvalidate;
static void sddadone(struct cam_periph *periph,
union ccb *done_ccb);
-static int sddaerror(union ccb *ccb, u_int32_t cam_flags,
- u_int32_t sense_flags);
+static int sddaerror(union ccb *ccb, uint32_t cam_flags,
+ uint32_t sense_flags);
static int mmc_handle_reply(union ccb *ccb);
static uint16_t get_rca(struct cam_periph *periph);
@@ -646,7 +646,7 @@ sddacleanup(struct cam_periph *periph)
}
static void
-sddaasync(void *callback_arg, u_int32_t code,
+sddaasync(void *callback_arg, uint32_t code,
struct cam_path *path, void *arg)
{
struct ccb_getdev cgd;
@@ -1285,12 +1285,12 @@ sdda_start_init(void *context, union ccb *start_ccb)
/* Update info for CAM */
device->serial_num_len = strlen(softc->card_sn_string);
- device->serial_num = (u_int8_t *)malloc((device->serial_num_len + 1),
+ device->serial_num = (uint8_t *)malloc((device->serial_num_len + 1),
M_CAMXPT, M_NOWAIT);
strlcpy(device->serial_num, softc->card_sn_string, device->serial_num_len + 1);
device->device_id_len = strlen(softc->card_id_string);
- device->device_id = (u_int8_t *)malloc((device->device_id_len + 1),
+ device->device_id = (uint8_t *)malloc((device->device_id_len + 1),
M_CAMXPT, M_NOWAIT);
strlcpy(device->device_id, softc->card_id_string, device->device_id_len + 1);
@@ -2000,7 +2000,7 @@ sddadone(struct cam_periph *periph, union ccb *done_ccb)
}
static int
-sddaerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags)
+sddaerror(union ccb *ccb, uint32_t cam_flags, uint32_t sense_flags)
{
return(cam_periph_error(ccb, cam_flags, sense_flags));
}
diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c
index 65099bcb1d57..30b1b7f867e7 100644
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -69,7 +69,7 @@ FEATURE(mmccam, "CAM-based MMC/SD/SDIO stack");
static struct cam_ed * mmc_alloc_device(struct cam_eb *bus,
struct cam_et *target, lun_id_t lun_id);
-static void mmc_dev_async(u_int32_t async_code, struct cam_eb *bus,
+static void mmc_dev_async(uint32_t async_code, struct cam_eb *bus,
struct cam_et *target, struct cam_ed *device, void *async_arg);
static void mmc_action(union ccb *start_ccb);
static void mmc_dev_advinfo(union ccb *start_ccb);
@@ -207,7 +207,7 @@ mmc_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id)
}
static void
-mmc_dev_async(u_int32_t async_code, struct cam_eb *bus, struct cam_et *target,
+mmc_dev_async(uint32_t async_code, struct cam_eb *bus, struct cam_et *target,
struct cam_ed *device, void *async_arg)
{
@@ -822,7 +822,7 @@ mmcprobe_done(struct cam_periph *periph, union ccb *done_ccb)
int err;
struct ccb_mmcio *mmcio;
- u_int32_t priority;
+ uint32_t priority;
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("mmcprobe_done\n"));
softc = (mmcprobe_softc *)periph->softc;