git: 97b77de2d951 - main - nvme: Eliminate intel_log_temp_stats_swapbytes
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Apr 2024 03:33:53 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=97b77de2d951b4946fb3219a99c98f2dd4c0120f commit 97b77de2d951b4946fb3219a99c98f2dd4c0120f Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-04-16 22:36:47 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-04-17 03:30:19 +0000 nvme: Eliminate intel_log_temp_stats_swapbytes We can't post a AER for this page, so there's no need to be able to swap it to host byte order. It's not one of the standard defined pages that can post via AER, and the vendor's public docs for this temperature page don't suggest it's possible to get over or under event changes. Since nvmecontrol no longer needsd the swap routine, remove it since it's now unused. Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44659 --- sys/dev/nvme/nvme.h | 17 ----------------- sys/dev/nvme/nvme_ctrlr.c | 4 ---- 2 files changed, 21 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index 706b77507b61..409d1f006cad 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -2241,23 +2241,6 @@ void nvme_sanitize_status_page_swapbytes( #endif } -static inline -void intel_log_temp_stats_swapbytes(struct intel_log_temp_stats *s __unused) -{ -#if _BYTE_ORDER != _LITTLE_ENDIAN - - s->current = le64toh(s->current); - s->overtemp_flag_last = le64toh(s->overtemp_flag_last); - s->overtemp_flag_life = le64toh(s->overtemp_flag_life); - s->max_temp = le64toh(s->max_temp); - s->min_temp = le64toh(s->min_temp); - /* omit _rsvd[] */ - s->max_oper_temp = le64toh(s->max_oper_temp); - s->min_oper_temp = le64toh(s->min_oper_temp); - s->est_offset = le64toh(s->est_offset); -#endif -} - static inline void nvme_resv_status_swapbytes(struct nvme_resv_status *s __unused, size_t size __unused) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index e41f32635346..b7b03082c54e 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -718,10 +718,6 @@ nvme_ctrlr_async_event_log_page_cb(void *arg, const struct nvme_completion *cpl) nvme_sanitize_status_page_swapbytes( (struct nvme_sanitize_status_page *)aer->log_page_buffer); break; - case INTEL_LOG_TEMP_STATS: - intel_log_temp_stats_swapbytes( - (struct intel_log_temp_stats *)aer->log_page_buffer); - break; default: break; }