git: 67e1423099ab - stable/14 - smartpqi: Fix build issues highlighted by gcc12
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 17 Sep 2023 14:42:22 UTC
The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=67e1423099ab55de9d3b18a4ad54b1c623383d42 commit 67e1423099ab55de9d3b18a4ad54b1c623383d42 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-08-25 15:45:28 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-09-17 14:34:40 +0000 smartpqi: Fix build issues highlighted by gcc12 Make inline functions defined in a header file as static inline. Mark inline functions used only in the compilation unit they are defined in as merely static (the compiler can figure out it these days). Sponsored by: Netflix (cherry picked from commit 2f06449d64298fe508e3c585b45effd69a72d696) Approved by: re (cperciva@) --- sys/dev/smartpqi/smartpqi_helper.c | 12 ------------ sys/dev/smartpqi/smartpqi_helper.h | 8 ++++---- sys/dev/smartpqi/smartpqi_prototypes.h | 4 ---- sys/dev/smartpqi/smartpqi_request.c | 6 +++--- 4 files changed, 7 insertions(+), 23 deletions(-) diff --git a/sys/dev/smartpqi/smartpqi_helper.c b/sys/dev/smartpqi/smartpqi_helper.c index 68f105001fa0..741ac0a05a06 100644 --- a/sys/dev/smartpqi/smartpqi_helper.c +++ b/sys/dev/smartpqi/smartpqi_helper.c @@ -416,18 +416,6 @@ check_device_pending_commands_to_complete(pqisrc_softstate_t *softs, pqi_scsi_de } #endif -extern inline uint64_t -pqisrc_increment_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - -extern inline uint64_t -pqisrc_decrement_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - -extern inline void -pqisrc_init_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - -extern inline uint64_t -pqisrc_read_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device); - void pqisrc_wait_for_device_commands_to_complete(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { diff --git a/sys/dev/smartpqi/smartpqi_helper.h b/sys/dev/smartpqi/smartpqi_helper.h index cc7030de74ad..507caeb9b0b6 100644 --- a/sys/dev/smartpqi/smartpqi_helper.h +++ b/sys/dev/smartpqi/smartpqi_helper.h @@ -28,7 +28,7 @@ #define _PQI_HELPER_H -inline uint64_t +static inline uint64_t pqisrc_increment_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER @@ -37,7 +37,7 @@ pqisrc_increment_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *dev #endif } -inline uint64_t +static inline uint64_t pqisrc_decrement_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER @@ -46,7 +46,7 @@ pqisrc_decrement_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *de #endif } -inline void +static inline void pqisrc_init_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER @@ -55,7 +55,7 @@ pqisrc_init_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) #endif } -inline uint64_t +static inline uint64_t pqisrc_read_device_active_io(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { #if PQISRC_DEVICE_IO_COUNTER diff --git a/sys/dev/smartpqi/smartpqi_prototypes.h b/sys/dev/smartpqi/smartpqi_prototypes.h index 8eabe5c47cf4..a10e5031d85e 100644 --- a/sys/dev/smartpqi/smartpqi_prototypes.h +++ b/sys/dev/smartpqi/smartpqi_prototypes.h @@ -167,10 +167,6 @@ int pqisrc_send_tmf(pqisrc_softstate_t *, pqi_scsi_dev_t *, rcb_t *, rcb_t *, int); int pqisrc_write_current_time_to_host_wellness(pqisrc_softstate_t *softs); int pqisrc_write_driver_version_to_host_wellness(pqisrc_softstate_t *softs); -extern inline void pqisrc_aio_build_cdb(aio_req_locator_t *, uint32_t, - rcb_t *, uint8_t *); -extern inline boolean_t pqisrc_aio_req_too_big(pqisrc_softstate_t *, pqi_scsi_dev_t *, - rcb_t *, aio_req_locator_t *, uint32_t); void pqisrc_build_aio_common(pqisrc_softstate_t *, pqi_aio_req_t *, rcb_t *, uint32_t); void pqisrc_build_aio_R1_write(pqisrc_softstate_t *, diff --git a/sys/dev/smartpqi/smartpqi_request.c b/sys/dev/smartpqi/smartpqi_request.c index 246ab891126d..1c0bbc2a1db5 100644 --- a/sys/dev/smartpqi/smartpqi_request.c +++ b/sys/dev/smartpqi/smartpqi_request.c @@ -1180,7 +1180,7 @@ fill_lba_for_scsi_rw(pqisrc_softstate_t *softs, uint8_t *cdb, aio_req_locator_t /* determine whether writes to certain types of RAID are supported. */ -inline boolean_t +static boolean_t pqisrc_is_supported_write(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device) { @@ -1492,7 +1492,7 @@ pqisrc_handle_blk_size_diffs(aio_req_locator_t *l) * handle based on dev type, Raid level, and encryption status. * TODO: make limits dynamic when this becomes possible. */ -inline boolean_t +static boolean_t pqisrc_aio_req_too_big(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device, rcb_t *rcb, aio_req_locator_t *l, uint32_t disk_blk_cnt) @@ -1636,7 +1636,7 @@ pqisrc_aio_show_locator_info(pqisrc_softstate_t *softs, } /* build the aio cdb */ -inline void +static void pqisrc_aio_build_cdb(aio_req_locator_t *l, uint32_t disk_blk_cnt, rcb_t *rcb, uint8_t *cdb) {