]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
Fix 64-bit compile errors
authorKeith Busch <keith.busch@intel.com>
Mon, 11 Jul 2016 23:47:33 +0000 (17:47 -0600)
committerKeith Busch <keith.busch@intel.com>
Mon, 11 Jul 2016 23:47:33 +0000 (17:47 -0600)
Cast to type appropriate for the print size.

Signed-off-by: Keith Busch <keith.busch@intel.com>
fabrics.c
intel-nvme.c

index ec3179f112e6f637e8590bbdfa040d4e8ba04eff..3666a01a8796d7544dc88dab1545e0dda16b5f89 100644 (file)
--- a/fabrics.c
+++ b/fabrics.c
@@ -269,7 +269,7 @@ static void print_discovery_log(struct nvmf_disc_rsp_page_hdr *log, int numrec)
        int i;
 
        printf("Discovery Log Number of Records %d, Generation counter %"PRIu64"\n",
-               numrec, __le64_to_cpu(log->genctr));
+               numrec, (uint64_t)__le64_to_cpu(log->genctr));
 
        for (i = 0; i < numrec; i++) {
                struct nvmf_disc_rsp_page_entry *e = &log->entries[i];
index 6b9c6231762bcfa25e9ad9c3c238d5d521598795..34de0f00fb8fa91be95dd7793032bd34efb9ecba 100644 (file)
@@ -129,14 +129,14 @@ static void show_temp_stats(struct intel_temp_stats *stats)
 {
        printf("  Intel Temperature Statistics\n");
        printf("--------------------------------\n");
-       printf("Current temperature         : %"PRIu64"\n", __le64_to_cpu(stats->curr));
-       printf("Last critical overtemp flag : %"PRIu64"\n", __le64_to_cpu(stats->last_overtemp));
-       printf("Life critical overtemp flag : %"PRIu64"\n", __le64_to_cpu(stats->life_overtemp));
-       printf("Highest temperature         : %"PRIu64"\n", __le64_to_cpu(stats->highest_temp));
-       printf("Lowest temperature          : %"PRIu64"\n", __le64_to_cpu(stats->lowest_temp));
-       printf("Max operating temperature   : %"PRIu64"\n", __le64_to_cpu(stats->max_operating_temp));
-       printf("Min operating temperature   : %"PRIu64"\n", __le64_to_cpu(stats->min_operating_temp));
-       printf("Estimated offset            : %"PRIu64"\n", __le64_to_cpu(stats->est_offset));
+       printf("Current temperature         : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->curr));
+       printf("Last critical overtemp flag : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->last_overtemp));
+       printf("Life critical overtemp flag : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->life_overtemp));
+       printf("Highest temperature         : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->highest_temp));
+       printf("Lowest temperature          : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->lowest_temp));
+       printf("Max operating temperature   : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->max_operating_temp));
+       printf("Min operating temperature   : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->min_operating_temp));
+       printf("Estimated offset            : %"PRIu64"\n", (uint64_t)__le64_to_cpu(stats->est_offset));
 }
 
 static int get_temp_stats_log(int argc, char **argv, struct command *cmd, struct plugin *plugin)