Commit 26b7625c46d5d72570252d30fec6814682476684
Committed by
Jeff Garzik
1 parent
f15943f500
Exists in
master
and in
7 other branches
[PATCH] git-netdev-all: s2io warning fix
drivers/net/s2io.c: In function `s2io_txdl_getskb': drivers/net/s2io.c:2023: warning: cast from pointer to integer of different size drivers/net/s2io.c: In function `s2io_open': drivers/net/s2io.c:3325: warning: long long unsigned int format, u64 arg (arg 3) drivers/net/s2io.c:3333: warning: long long unsigned int format, u64 arg (arg 3) drivers/net/s2io.c: In function `s2io_eeprom_test': drivers/net/s2io.c:4749: warning: long long unsigned int format, long unsigned int arg (arg 3) drivers/net/s2io.c:4749: warning: long long unsigned int format, u64 arg (arg 4) drivers/net/s2io.c:4768: warning: long long unsigned int format, long unsigned int arg (arg 3) drivers/net/s2io.c:4768: warning: long long unsigned int format, u64 arg (arg 4) I had to update this patch because more warnings have just appeared. You cannot print a u64 with %l or %ll. You do not know what type the architecture is using. It must be cast to a type which matches the printf control string - unsigned long long. The patch also fixes some overly-long strings. Please try to keep the code looking neat in an 80-col window. Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Ananda Raju <Ananda.Raju@neterion.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Showing 1 changed file with 11 additions and 5 deletions Side-by-side Diff
drivers/net/s2io.c
... | ... | @@ -2020,7 +2020,7 @@ |
2020 | 2020 | u16 j, frg_cnt; |
2021 | 2021 | |
2022 | 2022 | txds = txdlp; |
2023 | - if (txds->Host_Control == (u64) nic->ufo_in_band_v) { | |
2023 | + if (txds->Host_Control == (u64)(long)nic->ufo_in_band_v) { | |
2024 | 2024 | pci_unmap_single(nic->pdev, (dma_addr_t) |
2025 | 2025 | txds->Buffer_Pointer, sizeof(u64), |
2026 | 2026 | PCI_DMA_TODEVICE); |
... | ... | @@ -3323,7 +3323,7 @@ |
3323 | 3323 | s2io_msix_fifo_handle, 0, sp->desc1, |
3324 | 3324 | sp->s2io_entries[i].arg); |
3325 | 3325 | DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc1, |
3326 | - sp->msix_info[i].addr); | |
3326 | + (unsigned long long)sp->msix_info[i].addr); | |
3327 | 3327 | } else { |
3328 | 3328 | sprintf(sp->desc2, "%s:MSI-X-%d-RX", |
3329 | 3329 | dev->name, i); |
... | ... | @@ -3331,7 +3331,7 @@ |
3331 | 3331 | s2io_msix_ring_handle, 0, sp->desc2, |
3332 | 3332 | sp->s2io_entries[i].arg); |
3333 | 3333 | DBG_PRINT(ERR_DBG, "%s @ 0x%llx\n", sp->desc2, |
3334 | - sp->msix_info[i].addr); | |
3334 | + (unsigned long long)sp->msix_info[i].addr); | |
3335 | 3335 | } |
3336 | 3336 | if (err) { |
3337 | 3337 | DBG_PRINT(ERR_DBG, "%s: MSI-X-%d registration \ |
... | ... | @@ -4746,7 +4746,10 @@ |
4746 | 4746 | fail = 1; |
4747 | 4747 | |
4748 | 4748 | if (ret_data != 0x012345) { |
4749 | - DBG_PRINT(ERR_DBG, "%s: eeprom test error at offset 0x4F0. Data written %llx Data read %llx\n", dev->name, (u64)0x12345, ret_data); | |
4749 | + DBG_PRINT(ERR_DBG, "%s: eeprom test error at offset 0x4F0. " | |
4750 | + "Data written %llx Data read %llx\n", | |
4751 | + dev->name, (unsigned long long)0x12345, | |
4752 | + (unsigned long long)ret_data); | |
4750 | 4753 | fail = 1; |
4751 | 4754 | } |
4752 | 4755 | |
... | ... | @@ -4765,7 +4768,10 @@ |
4765 | 4768 | fail = 1; |
4766 | 4769 | |
4767 | 4770 | if (ret_data != 0x012345) { |
4768 | - DBG_PRINT(ERR_DBG, "%s: eeprom test error at offset 0x7F0. Data written %llx Data read %llx\n", dev->name, (u64)0x12345, ret_data); | |
4771 | + DBG_PRINT(ERR_DBG, "%s: eeprom test error at offset 0x7F0. " | |
4772 | + "Data written %llx Data read %llx\n", | |
4773 | + dev->name, (unsigned long long)0x12345, | |
4774 | + (unsigned long long)ret_data); | |
4769 | 4775 | fail = 1; |
4770 | 4776 | } |
4771 | 4777 |