]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
fixes for 32-bits
authorKeith Busch <kbusch@kernel.org>
Thu, 21 May 2020 15:18:36 +0000 (08:18 -0700)
committerKeith Busch <kbusch@kernel.org>
Thu, 21 May 2020 15:18:36 +0000 (08:18 -0700)
Signed-off-by: Keith Busch <kbusch@kernel.org>
plugins/transcend/transcend-nvme.c
plugins/wdc/wdc-nvme.c

index 550eb31c9f99c4f58780b4669914abee44577f6f..dbb56be3ba349083907d40def8db79d78dcabe91 100644 (file)
@@ -80,7 +80,7 @@ static int getBadblock(int argc, char **argv, struct command *cmd, struct plugin
        nvmecmd.opcode=OP_BAD_BLOCK;
        nvmecmd.cdw10=DW10_BAD_BLOCK;
        nvmecmd.cdw12=DW12_BAD_BLOCK;
-       nvmecmd.addr =(__u64) data;
+       nvmecmd.addr = (__u64)(uintptr_t)data;
        nvmecmd.data_len = 0x1;
        result = nvme_submit_admin_passthru(fd,&nvmecmd);
        if(!result) {
index a7329a680100e34bb9b9420bea4748cf94c44f00..e6abb7236596df60254d971c43801d9e40adcd50 100644 (file)
@@ -1670,8 +1670,8 @@ static int wdc_do_cap_dui(int fd, char *file, __u32 xfer_size, int data_area, in
                        total_size = log_size;
 
                        if (offset >= total_size) {
-                               fprintf(stderr, "%s: INFO : WDC : Offset 0x%llx exceeds total size 0x%llx, no data retrieved\n",
-                                       __func__, offset, total_size);
+                               fprintf(stderr, "%s: INFO : WDC : Offset 0x%"PRIx64" exceeds total size 0x%"PRIx64", no data retrieved\n",
+                                       __func__, (uint64_t)offset, (uint64_t)total_size);
                                goto out;
                        }
 
@@ -1702,8 +1702,8 @@ static int wdc_do_cap_dui(int fd, char *file, __u32 xfer_size, int data_area, in
                                        log_size = min(total_size, file_size);
 
                                if (verbose)
-                                       fprintf(stderr, "%s: INFO : WDC : Offset 0x%llx, file size 0x%llx, total size 0x%llx, log size 0x%llx\n",
-                                               __func__, offset, file_size, total_size, log_size);
+                                       fprintf(stderr, "%s: INFO : WDC : Offset 0x%"PRIx64", file size 0x%"PRIx64", total size 0x%"PRIx64", log size 0x%"PRIx64"\n",
+                                               __func__, (uint64_t)offset, (uint64_t)file_size, (uint64_t)total_size, (uint64_t)log_size);
 
                                curr_data_offset = offset;