Date: Sat, 31 Jul 2021 00:21:26 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: f12339d9c14e - stable/12 - Always use the __unused attribute even for potentially unused parameters. Message-ID: <202107310021.16V0LQZd051988@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f12339d9c14ecfd0f1d02ee8692df94a89181311 commit f12339d9c14ecfd0f1d02ee8692df94a89181311 Author: Michal Meloun <mmel@FreeBSD.org> AuthorDate: 2020-12-01 08:52:13 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2021-07-31 00:02:52 +0000 Always use the __unused attribute even for potentially unused parameters. Requested by: ian, imp MFC with: r368167 (cherry picked from commit cf7c06293236710cc33de029fccd1185cb38c5fb) --- sys/dev/nvme/nvme.h | 41 +++++++++++++++++------------------------ 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 4ca4ea3373f6..982c994d6433 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1738,15 +1738,9 @@ extern int nvme_use_nvd; #endif /* _KERNEL */ -#if _BYTE_ORDER != _LITTLE_ENDIAN -#define MODIF -#else -#define MODIF __unused -#endif - /* Endianess conversion functions for NVMe structs */ static inline -void nvme_completion_swapbytes(struct nvme_completion *s MODIF) +void nvme_completion_swapbytes(struct nvme_completion *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1760,7 +1754,7 @@ void nvme_completion_swapbytes(struct nvme_completion *s MODIF) } static inline -void nvme_power_state_swapbytes(struct nvme_power_state *s MODIF) +void nvme_power_state_swapbytes(struct nvme_power_state *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1773,7 +1767,7 @@ void nvme_power_state_swapbytes(struct nvme_power_state *s MODIF) } static inline -void nvme_controller_data_swapbytes(struct nvme_controller_data *s MODIF) +void nvme_controller_data_swapbytes(struct nvme_controller_data *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1825,7 +1819,7 @@ void nvme_controller_data_swapbytes(struct nvme_controller_data *s MODIF) } static inline -void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s MODIF) +void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1855,7 +1849,7 @@ void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s MODIF) static inline void nvme_error_information_entry_swapbytes( - struct nvme_error_information_entry *s MODIF) + struct nvme_error_information_entry *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1872,7 +1866,7 @@ void nvme_error_information_entry_swapbytes( } static inline -void nvme_le128toh(void *p MODIF) +void nvme_le128toh(void *p __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN /* Swap 16 bytes in place */ @@ -1889,7 +1883,7 @@ void nvme_le128toh(void *p MODIF) static inline void nvme_health_information_page_swapbytes( - struct nvme_health_information_page *s MODIF) + struct nvme_health_information_page *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1918,7 +1912,7 @@ void nvme_health_information_page_swapbytes( static inline -void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s MODIF) +void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1929,7 +1923,7 @@ void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s MODIF) } static inline -void nvme_ns_list_swapbytes(struct nvme_ns_list *s MODIF) +void nvme_ns_list_swapbytes(struct nvme_ns_list *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1941,7 +1935,7 @@ void nvme_ns_list_swapbytes(struct nvme_ns_list *s MODIF) static inline void nvme_command_effects_page_swapbytes( - struct nvme_command_effects_page *s MODIF) + struct nvme_command_effects_page *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1955,7 +1949,7 @@ void nvme_command_effects_page_swapbytes( static inline void nvme_res_notification_page_swapbytes( - struct nvme_res_notification_page *s MODIF) + struct nvme_res_notification_page *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN s->log_page_count = le64toh(s->log_page_count); @@ -1965,7 +1959,7 @@ void nvme_res_notification_page_swapbytes( static inline void nvme_sanitize_status_page_swapbytes( - struct nvme_sanitize_status_page *s MODIF) + struct nvme_sanitize_status_page *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN s->sprog = le16toh(s->sprog); @@ -1981,7 +1975,7 @@ void nvme_sanitize_status_page_swapbytes( } static inline -void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s MODIF) +void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1998,8 +1992,8 @@ void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s MODIF) } static inline -void nvme_resv_status_swapbytes(struct nvme_resv_status *s MODIF, - size_t size MODIF) +void nvme_resv_status_swapbytes(struct nvme_resv_status *s __unused, + size_t size __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN u_int i, n; @@ -2016,8 +2010,8 @@ void nvme_resv_status_swapbytes(struct nvme_resv_status *s MODIF, } static inline -void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s MODIF, - size_t size MODIF) +void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s __unused, + size_t size __unused) { #if _BYTE_ORDER != _LITTLE_ENDIAN u_int i, n; @@ -2032,6 +2026,5 @@ void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s MODIF, } #endif } -#undef MODIF #endif /* __NVME_H__ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107310021.16V0LQZd051988>