From owner-svn-src-head@freebsd.org Tue Dec 1 08:52:14 2020 Return-Path: Delivered-To: svn-src-head@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 3257F4A2A57; Tue, 1 Dec 2020 08:52:14 +0000 (UTC) (envelope-from mmel@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ClbSt0tGkz3DPP; Tue, 1 Dec 2020 08:52:14 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1163613190; Tue, 1 Dec 2020 08:52:14 +0000 (UTC) (envelope-from mmel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0B18qDUr096065; Tue, 1 Dec 2020 08:52:13 GMT (envelope-from mmel@FreeBSD.org) Received: (from mmel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0B18qDHN096064; Tue, 1 Dec 2020 08:52:13 GMT (envelope-from mmel@FreeBSD.org) Message-Id: <202012010852.0B18qDHN096064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmel set sender to mmel@FreeBSD.org using -f From: Michal Meloun Date: Tue, 1 Dec 2020 08:52:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368203 - head/sys/dev/nvme X-SVN-Group: head X-SVN-Commit-Author: mmel X-SVN-Commit-Paths: head/sys/dev/nvme X-SVN-Commit-Revision: 368203 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2020 08:52:14 -0000 Author: mmel Date: Tue Dec 1 08:52:13 2020 New Revision: 368203 URL: https://svnweb.freebsd.org/changeset/base/368203 Log: Always use the __unused attribute even for potentially unused parameters. Requested by: ian, imp MFC with: r368167 Modified: head/sys/dev/nvme/nvme.h Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Tue Dec 1 03:07:26 2020 (r368202) +++ head/sys/dev/nvme/nvme.h Tue Dec 1 08:52:13 2020 (r368203) @@ -1728,15 +1728,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 @@ -1750,7 +1744,7 @@ void nvme_completion_swapbytes(struct nvme_completion } 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 @@ -1763,7 +1757,7 @@ void nvme_power_state_swapbytes(struct nvme_power_stat } 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; @@ -1815,7 +1809,7 @@ void nvme_controller_data_swapbytes(struct nvme_contro } 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; @@ -1845,7 +1839,7 @@ void nvme_namespace_data_swapbytes(struct nvme_namespa 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 @@ -1862,7 +1856,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 */ @@ -1879,7 +1873,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; @@ -1907,7 +1901,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; @@ -1918,7 +1912,7 @@ void nvme_firmware_page_swapbytes(struct nvme_firmware } 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; @@ -1930,7 +1924,7 @@ void nvme_ns_list_swapbytes(struct nvme_ns_list *s MOD 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; @@ -1944,7 +1938,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); @@ -1954,7 +1948,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); @@ -1970,7 +1964,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 @@ -1987,8 +1981,8 @@ void intel_log_temp_stats_swapbytes(struct intel_log_t } 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; @@ -2005,8 +1999,8 @@ void nvme_resv_status_swapbytes(struct nvme_resv_statu } 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; @@ -2021,6 +2015,5 @@ void nvme_resv_status_ext_swapbytes(struct nvme_resv_s } #endif } -#undef MODIF #endif /* __NVME_H__ */