diff options
author | Frank Haverkamp <haver@linux.vnet.ibm.com> | 2014-01-07 09:41:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-08 18:22:15 -0500 |
commit | 3c1547e774b7d8485b7a1b15bb5e558d595ffc03 (patch) | |
tree | 9c8b7658c53f02410fca70639f73175678a737fd /drivers/misc | |
parent | 90b4e97e69ff3d6cca3e227145c7de8305bd84cf (diff) |
GenWQE: Fix warnings for sparc
dma_addr_t was not used, where it should have been used.
Some format strings were not optimal.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/genwqe/card_dev.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index 9c1157e6ec0d..91a1c151afba 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c | |||
@@ -214,9 +214,9 @@ static void genwqe_remove_mappings(struct genwqe_file *cfile) | |||
214 | */ | 214 | */ |
215 | dev_err(&pci_dev->dev, | 215 | dev_err(&pci_dev->dev, |
216 | "[%s] %d. cleanup mapping: u_vaddr=%p " | 216 | "[%s] %d. cleanup mapping: u_vaddr=%p " |
217 | "u_kaddr=%016lx dma_addr=%llx\n", __func__, i++, | 217 | "u_kaddr=%016lx dma_addr=%lx\n", __func__, i++, |
218 | dma_map->u_vaddr, (unsigned long)dma_map->k_vaddr, | 218 | dma_map->u_vaddr, (unsigned long)dma_map->k_vaddr, |
219 | dma_map->dma_addr); | 219 | (unsigned long)dma_map->dma_addr); |
220 | 220 | ||
221 | if (dma_map->type == GENWQE_MAPPING_RAW) { | 221 | if (dma_map->type == GENWQE_MAPPING_RAW) { |
222 | /* we allocated this dynamically */ | 222 | /* we allocated this dynamically */ |
@@ -507,7 +507,8 @@ static int do_flash_update(struct genwqe_file *cfile, | |||
507 | { | 507 | { |
508 | int rc = 0; | 508 | int rc = 0; |
509 | int blocks_to_flash; | 509 | int blocks_to_flash; |
510 | u64 dma_addr, flash = 0; | 510 | dma_addr_t dma_addr; |
511 | u64 flash = 0; | ||
511 | size_t tocopy = 0; | 512 | size_t tocopy = 0; |
512 | u8 __user *buf; | 513 | u8 __user *buf; |
513 | u8 *xbuf; | 514 | u8 *xbuf; |
@@ -558,8 +559,9 @@ static int do_flash_update(struct genwqe_file *cfile, | |||
558 | crc = genwqe_crc32(xbuf, tocopy, 0xffffffff); | 559 | crc = genwqe_crc32(xbuf, tocopy, 0xffffffff); |
559 | 560 | ||
560 | dev_dbg(&pci_dev->dev, | 561 | dev_dbg(&pci_dev->dev, |
561 | "[%s] DMA: 0x%llx CRC: %08x SZ: %ld %d\n", | 562 | "[%s] DMA: %lx CRC: %08x SZ: %ld %d\n", |
562 | __func__, dma_addr, crc, tocopy, blocks_to_flash); | 563 | __func__, (unsigned long)dma_addr, crc, tocopy, |
564 | blocks_to_flash); | ||
563 | 565 | ||
564 | /* prepare DDCB for SLU process */ | 566 | /* prepare DDCB for SLU process */ |
565 | req = ddcb_requ_alloc(); | 567 | req = ddcb_requ_alloc(); |
@@ -638,7 +640,8 @@ static int do_flash_read(struct genwqe_file *cfile, | |||
638 | struct genwqe_bitstream *load) | 640 | struct genwqe_bitstream *load) |
639 | { | 641 | { |
640 | int rc, blocks_to_flash; | 642 | int rc, blocks_to_flash; |
641 | u64 dma_addr, flash = 0; | 643 | dma_addr_t dma_addr; |
644 | u64 flash = 0; | ||
642 | size_t tocopy = 0; | 645 | size_t tocopy = 0; |
643 | u8 __user *buf; | 646 | u8 __user *buf; |
644 | u8 *xbuf; | 647 | u8 *xbuf; |
@@ -680,8 +683,9 @@ static int do_flash_read(struct genwqe_file *cfile, | |||
680 | tocopy = min_t(size_t, load->size, FLASH_BLOCK); | 683 | tocopy = min_t(size_t, load->size, FLASH_BLOCK); |
681 | 684 | ||
682 | dev_dbg(&pci_dev->dev, | 685 | dev_dbg(&pci_dev->dev, |
683 | "[%s] DMA: 0x%llx SZ: %ld %d\n", | 686 | "[%s] DMA: %lx SZ: %ld %d\n", |
684 | __func__, dma_addr, tocopy, blocks_to_flash); | 687 | __func__, (unsigned long)dma_addr, tocopy, |
688 | blocks_to_flash); | ||
685 | 689 | ||
686 | /* prepare DDCB for SLU process */ | 690 | /* prepare DDCB for SLU process */ |
687 | cmd = ddcb_requ_alloc(); | 691 | cmd = ddcb_requ_alloc(); |
@@ -864,7 +868,8 @@ static int ddcb_cmd_fixups(struct genwqe_file *cfile, struct ddcb_requ *req) | |||
864 | for (i = 0, asiv_offs = 0x00; asiv_offs <= 0x58; | 868 | for (i = 0, asiv_offs = 0x00; asiv_offs <= 0x58; |
865 | i++, asiv_offs += 0x08) { | 869 | i++, asiv_offs += 0x08) { |
866 | 870 | ||
867 | u64 u_addr, d_addr; | 871 | u64 u_addr; |
872 | dma_addr_t d_addr; | ||
868 | u32 u_size = 0; | 873 | u32 u_size = 0; |
869 | u64 ats_flags; | 874 | u64 ats_flags; |
870 | 875 | ||