From ed860297aaed8c0bc13a1e12b83ead254b0e5a98 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sat, 8 May 2021 02:02:43 +0900 Subject: [PATCH] nvme-print: MAINT: Fix wctemp and cctemp 16 bits width print --- nvme-print.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvme-print.c b/nvme-print.c index 0b2b3845..5dee0f2f 100644 --- a/nvme-print.c +++ b/nvme-print.c @@ -2853,14 +2853,14 @@ static void nvme_show_id_ctrl_apsta(__u8 apsta) static void nvme_show_id_ctrl_wctemp(__le16 wctemp) { - printf(" [16:0] : %ld C (%u Kelvin)\tWarning temperature (WCTEMP)\n", + printf(" [15:0] : %ld C (%u Kelvin)\tWarning temperature (WCTEMP)\n", kelvin_to_celsius(le16_to_cpu(wctemp)), le16_to_cpu(wctemp)); printf("\n"); } static void nvme_show_id_ctrl_cctemp(__le16 cctemp) { - printf(" [16:0] : %ld C (%u Kelvin)\tCritical temperature (CCTEMP)\n", + printf(" [15:0] : %ld C (%u Kelvin)\tCritical temperature (CCTEMP)\n", kelvin_to_celsius(le16_to_cpu(cctemp)), le16_to_cpu(cctemp)); printf("\n"); } -- 2.50.1