From owner-dev-commits-src-all@freebsd.org Sat Jul 31 00:21:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F41D665106B; Sat, 31 Jul 2021 00:21:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Gc4gn6HpSz4Vl3; Sat, 31 Jul 2021 00:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9A9D26A5A; Sat, 31 Jul 2021 00:21:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16V0LPMY051963; Sat, 31 Jul 2021 00:21:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16V0LPji051962; Sat, 31 Jul 2021 00:21:25 GMT (envelope-from git) Date: Sat, 31 Jul 2021 00:21:25 GMT Message-Id: <202107310021.16V0LPji051962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 2c54d6d4df6d - stable/12 - Unbreak r368167 in userland. Decorate unused arguments. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 2c54d6d4df6de4bf3ae79c61cc61e9738ffdc171 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2021 00:21:27 -0000 The branch stable/12 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2c54d6d4df6de4bf3ae79c61cc61e9738ffdc171 commit 2c54d6d4df6de4bf3ae79c61cc61e9738ffdc171 Author: Michal Meloun AuthorDate: 2020-11-30 14:51:48 +0000 Commit: Warner Losh CommitDate: 2021-07-31 00:02:52 +0000 Unbreak r368167 in userland. Decorate unused arguments. Reported by: kp, tuexen, jenkins, and many others MFC with: r368167 (cherry picked from commit b2e9e573a392a973bea0ff180932913b7aa0eb66) --- sys/dev/nvme/nvme.h | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 982c994d6433..4ca4ea3373f6 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -1738,9 +1738,15 @@ 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 __unused) +void nvme_completion_swapbytes(struct nvme_completion *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1754,7 +1760,7 @@ void nvme_completion_swapbytes(struct nvme_completion *s __unused) } static inline -void nvme_power_state_swapbytes(struct nvme_power_state *s __unused) +void nvme_power_state_swapbytes(struct nvme_power_state *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1767,7 +1773,7 @@ void nvme_power_state_swapbytes(struct nvme_power_state *s __unused) } static inline -void nvme_controller_data_swapbytes(struct nvme_controller_data *s __unused) +void nvme_controller_data_swapbytes(struct nvme_controller_data *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1819,7 +1825,7 @@ void nvme_controller_data_swapbytes(struct nvme_controller_data *s __unused) } static inline -void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s __unused) +void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1849,7 +1855,7 @@ void nvme_namespace_data_swapbytes(struct nvme_namespace_data *s __unused) static inline void nvme_error_information_entry_swapbytes( - struct nvme_error_information_entry *s __unused) + struct nvme_error_information_entry *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1866,7 +1872,7 @@ void nvme_error_information_entry_swapbytes( } static inline -void nvme_le128toh(void *p __unused) +void nvme_le128toh(void *p MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN /* Swap 16 bytes in place */ @@ -1883,7 +1889,7 @@ void nvme_le128toh(void *p __unused) static inline void nvme_health_information_page_swapbytes( - struct nvme_health_information_page *s __unused) + struct nvme_health_information_page *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1912,7 +1918,7 @@ void nvme_health_information_page_swapbytes( static inline -void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s __unused) +void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1923,7 +1929,7 @@ void nvme_firmware_page_swapbytes(struct nvme_firmware_page *s __unused) } static inline -void nvme_ns_list_swapbytes(struct nvme_ns_list *s __unused) +void nvme_ns_list_swapbytes(struct nvme_ns_list *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1935,7 +1941,7 @@ void nvme_ns_list_swapbytes(struct nvme_ns_list *s __unused) static inline void nvme_command_effects_page_swapbytes( - struct nvme_command_effects_page *s __unused) + struct nvme_command_effects_page *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN int i; @@ -1949,7 +1955,7 @@ void nvme_command_effects_page_swapbytes( static inline void nvme_res_notification_page_swapbytes( - struct nvme_res_notification_page *s __unused) + struct nvme_res_notification_page *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN s->log_page_count = le64toh(s->log_page_count); @@ -1959,7 +1965,7 @@ void nvme_res_notification_page_swapbytes( static inline void nvme_sanitize_status_page_swapbytes( - struct nvme_sanitize_status_page *s __unused) + struct nvme_sanitize_status_page *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN s->sprog = le16toh(s->sprog); @@ -1975,7 +1981,7 @@ void nvme_sanitize_status_page_swapbytes( } static inline -void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s __unused) +void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN @@ -1992,8 +1998,8 @@ void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s __unused) } static inline -void nvme_resv_status_swapbytes(struct nvme_resv_status *s __unused, - size_t size __unused) +void nvme_resv_status_swapbytes(struct nvme_resv_status *s MODIF, + size_t size MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN u_int i, n; @@ -2010,8 +2016,8 @@ void nvme_resv_status_swapbytes(struct nvme_resv_status *s __unused, } static inline -void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s __unused, - size_t size __unused) +void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s MODIF, + size_t size MODIF) { #if _BYTE_ORDER != _LITTLE_ENDIAN u_int i, n; @@ -2026,5 +2032,6 @@ void nvme_resv_status_ext_swapbytes(struct nvme_resv_status_ext *s __unused, } #endif } +#undef MODIF #endif /* __NVME_H__ */