public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory
@ 2011-10-25  9:39 Marek Vasut
  2011-10-25  9:39 ` [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c Marek Vasut
                   ` (17 more replies)
  0 siblings, 18 replies; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

This series fixes the warnings generated by new debug() macro implementation,
which will be merged after this series. This series fixes the problems before
the macro is reworked to avoid smooth transition. Most of the problems fixed by
this series are printf() formating related problems.

Marek Vasut (18):
  GCC4.6: Squash warning in cfb_console.c
  GCC4.6: Squash warning in cfi_flash.c
  GCC4.6: Squash warning in jedec_flash.c
  GCC4.6: Squash warnings in 4xx_enet.c
  GCC4.6: Squash warnings in ahci.c
  GCC4.6: Squash warnings in fsl_espi.c
  GCC4.6: Squash warnings in fsl_pci_init.c
  GCC4.6: Squash warnings in sata_sil3114.c
  GCC4.6: Squash warnings in tqm8xx_pcmcia.c
  GCC4.6: Squash error in pcmcia/i82365.c
  GCC4.6: Fix warnings in pxa_mmc.c
  GCC4.6: Squash warnings in smsc95xx.c
  GCC4.6: Squash warnings in kirkwood_spi.c
  GCC4.6: Squash warnings in lattice.c
  GCC4.6: Squash warnings in ks8695eth.c
  GCC4.6: Squash warning in bus_vcxk.c
  GCC4.6: Squash warnings in fec_mxc.c
  GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c

 drivers/block/ahci.c            |    2 +-
 drivers/block/sata_sil3114.c    |    2 +-
 drivers/fpga/lattice.c          |    2 +-
 drivers/mmc/pxa_mmc.c           |   32 ++++++++++++++++----------------
 drivers/mtd/cfi_flash.c         |    2 +-
 drivers/mtd/jedec_flash.c       |    5 +++--
 drivers/mtd/nand/s3c2410_nand.c |   12 ++++++------
 drivers/net/4xx_enet.c          |    6 +++---
 drivers/net/fec_mxc.c           |    4 ++--
 drivers/net/ks8695eth.c         |    2 +-
 drivers/pci/fsl_pci_init.c      |    8 ++++----
 drivers/pcmcia/i82365.c         |    6 +-----
 drivers/pcmcia/tqm8xx_pcmcia.c  |   15 ++++++++++++---
 drivers/spi/fsl_espi.c          |    6 +++---
 drivers/spi/kirkwood_spi.c      |    4 ++--
 drivers/usb/eth/smsc95xx.c      |    2 +-
 drivers/video/bus_vcxk.c        |    2 +-
 drivers/video/cfb_console.c     |    2 +-
 18 files changed, 60 insertions(+), 54 deletions(-)

Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>

-- 
1.7.6.3

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 02/18] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
                   ` (16 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

cfb_console.c: In function 'video_display_bitmap':
cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 2 has
type 'long unsigned int'
cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 3 has
type 'long unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/video/cfb_console.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 4e653b8..1863563 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1152,7 +1152,7 @@ int video_display_bitmap(ulong bmp_image, int x, int y)
 	colors = le32_to_cpu(bmp->header.colors_used);
 	compression = le32_to_cpu(bmp->header.compression);
 
-	debug("Display-bmp: %d x %d  with %d colors\n",
+	debug("Display-bmp: %ld x %ld  with %d colors\n",
 	      width, height, colors);
 
 	if (compression != BMP_BI_RGB
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 02/18] GCC4.6: Squash warning in cfi_flash.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
  2011-10-25  9:39 ` [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 03/18] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
                   ` (15 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

cfi_flash.c: In function 'flash_protect_default':
cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'ulong'
cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'long unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott Wood <scottwood@freescale.com>
---
 drivers/mtd/cfi_flash.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index ac91dfd..5494bcf 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -2149,7 +2149,7 @@ void flash_protect_default(void)
 
 #if defined(CONFIG_SYS_FLASH_AUTOPROTECT_LIST)
 	for (i = 0; i < (sizeof(apl) / sizeof(struct apl_s)); i++) {
-		debug("autoprotecting from %08x to %08x\n",
+		debug("autoprotecting from %08lx to %08lx\n",
 		      apl[i].start, apl[i].start + apl[i].size - 1);
 		flash_protect(FLAG_PROTECT_SET,
 			       apl[i].start,
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 03/18] GCC4.6: Squash warning in jedec_flash.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
  2011-10-25  9:39 ` [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c Marek Vasut
  2011-10-25  9:39 ` [U-Boot] [PATCH 02/18] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 04/18] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
                   ` (14 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

jedec_flash.c: In function 'fill_info':
jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'ulong'
jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
argument 3 has type 'ulong'
jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 2 has
type 'ulong'
jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 3 has
type 'ulong'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Scott Wood <scottwood@freescale.com>
---
 drivers/mtd/jedec_flash.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c
index da8c9b1..36d30c3 100644
--- a/drivers/mtd/jedec_flash.c
+++ b/drivers/mtd/jedec_flash.c
@@ -390,7 +390,8 @@ static inline void fill_info(flash_info_t *info, const struct amd_flash_info *je
 	debug("unlock address index %d\n", uaddr_idx);
 	info->addr_unlock1 = unlock_addrs[uaddr_idx].addr1;
 	info->addr_unlock2 = unlock_addrs[uaddr_idx].addr2;
-	debug("unlock addresses are 0x%x/0x%x\n", info->addr_unlock1, info->addr_unlock2);
+	debug("unlock addresses are 0x%lx/0x%lx\n",
+		info->addr_unlock1, info->addr_unlock2);
 
 	sect_cnt = 0;
 	total_size = 0;
@@ -399,7 +400,7 @@ static inline void fill_info(flash_info_t *info, const struct amd_flash_info *je
 		ulong erase_region_count = (jedec_entry->regions[i] & 0xff) + 1;
 
 		total_size += erase_region_size * erase_region_count;
-		debug ("erase_region_count = %d erase_region_size = %d\n",
+		debug("erase_region_count = %ld erase_region_size = %ld\n",
 		       erase_region_count, erase_region_size);
 		for (j = 0; j < erase_region_count; j++) {
 			if (sect_cnt >= CONFIG_SYS_MAX_FLASH_SECT) {
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 04/18] GCC4.6: Squash warnings in 4xx_enet.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (2 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 03/18] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 05/18] GCC4.6: Squash warnings in ahci.c Marek Vasut
                   ` (13 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

4xx_enet.c: In function 'ppc_4xx_eth_init':
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
argument 3 has type 'volatile struct mal_desc_t *'
4xx_enet.c:1365: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'
4xx_enet.c:1376: warning: format '%08lx' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/net/4xx_enet.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/4xx_enet.c b/drivers/net/4xx_enet.c
index 9ab5c80..8013ad9 100644
--- a/drivers/net/4xx_enet.c
+++ b/drivers/net/4xx_enet.c
@@ -1349,7 +1349,7 @@ get_speed:
 		hw_p->rx_phys = bd_cached + MAL_TX_DESC_SIZE;
 		hw_p->tx = (mal_desc_t *)(bd_uncached);
 		hw_p->rx = (mal_desc_t *)(bd_uncached + MAL_TX_DESC_SIZE);
-		debug("hw_p->tx=%08x, hw_p->rx=%08x\n", hw_p->tx, hw_p->rx);
+		debug("hw_p->tx=%p, hw_p->rx=%p\n", hw_p->tx, hw_p->rx);
 	}
 
 	for (i = 0; i < NUM_TX_BUFF; i++) {
@@ -1362,7 +1362,7 @@ get_speed:
 		if ((NUM_TX_BUFF - 1) == i)
 			hw_p->tx[i].ctrl |= MAL_TX_CTRL_WRAP;
 		hw_p->tx_run[i] = -1;
-		debug("TX_BUFF %d @ 0x%08lx\n", i, (u32)hw_p->tx[i].data_ptr);
+		debug("TX_BUFF %d @ 0x%08x\n", i, (u32)hw_p->tx[i].data_ptr);
 	}
 
 	for (i = 0; i < NUM_RX_BUFF; i++) {
@@ -1373,7 +1373,7 @@ get_speed:
 			hw_p->rx[i].ctrl |= MAL_RX_CTRL_WRAP;
 		hw_p->rx[i].ctrl |= MAL_RX_CTRL_EMPTY | MAL_RX_CTRL_INTR;
 		hw_p->rx_ready[i] = -1;
-		debug("RX_BUFF %d @ 0x%08lx\n", i, (u32)hw_p->rx[i].data_ptr);
+		debug("RX_BUFF %d @ 0x%08x\n", i, (u32)hw_p->rx[i].data_ptr);
 	}
 
 	reg = 0x00000000;
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 05/18] GCC4.6: Squash warnings in ahci.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (3 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 04/18] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 06/18] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
                   ` (12 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

ahci.c: In function 'ahci_port_start':
ahci.c:401: warning: format '%x' expects type 'unsigned int', but argument 2 has
type 'struct ahci_cmd_hdr *'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/block/ahci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/ahci.c b/drivers/block/ahci.c
index 64f52bb..015b341 100644
--- a/drivers/block/ahci.c
+++ b/drivers/block/ahci.c
@@ -398,7 +398,7 @@ static int ahci_port_start(u8 port)
 	 * 32 bytes each in size
 	 */
 	pp->cmd_slot = (struct ahci_cmd_hdr *)mem;
-	debug("cmd_slot = 0x%x\n", pp->cmd_slot);
+	debug("cmd_slot = %p\n", pp->cmd_slot);
 	mem += (AHCI_CMD_SLOT_SZ + 224);
 
 	/*
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 06/18] GCC4.6: Squash warnings in fsl_espi.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (4 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 05/18] GCC4.6: Squash warnings in ahci.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 07/18] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
                   ` (11 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

fsl_espi.c: In function 'spi_setup_slave':
fsl_espi.c:100: warning: format '%d' expects type 'int', but argument 3 has type
'long unsigned int'
fsl_espi.c: In function 'spi_xfer':
fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument
5 has type 'const void *'
fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument
7 has type 'void *'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/spi/fsl_espi.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index f872cd8..a1ebd33 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -97,8 +97,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 		pm = spibrg / (max_hz * 16 * 2);
 		if (pm > 16) {
 			pm = 16;
-			debug("Requested speed is too low: %d Hz, "
-				"%d Hz is used.\n", max_hz, spibrg / (32 * 16));
+			debug("Requested speed is too low: %d Hz, %ld Hz "
+				"is used.\n", max_hz, spibrg / (32 * 16));
 		}
 	} else
 		pm = spibrg / (max_hz * 2);
@@ -234,7 +234,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *data_out,
 		break;
 	}
 
-	debug("spi_xfer: slave %u:%u dout %08X(%08x) din %08X(%08x) len %u\n",
+	debug("spi_xfer: slave %u:%u dout %08X(%p) din %08X(%p) len %u\n",
 	      slave->bus, slave->cs, *(uint *) dout,
 	      dout, *(uint *) din, din, len);
 
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 07/18] GCC4.6: Squash warnings in fsl_pci_init.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (5 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 06/18] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 21:59   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 08/18] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
                   ` (10 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

fsl_pci_init.c: In function 'fsl_pci_init':
fsl_pci_init.c:308: warning: format '%08x' expects type 'unsigned int', but
argument 6 has type 'long unsigned int'
fsl_pci_init.c:347: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'volatile u32 *'

fsl_pci_init.c: In function 'fsl_pci_init':
fsl_pci_init.c:308: warning: format '%016llx' expects type 'long long unsigned
int', but argument 4 has type 'pci_addr_t'
fsl_pci_init.c:308: warning: format '%016llx' expects type 'long long unsigned
int', but argument 5 has type 'pci_size_t'
fsl_pci_init.c:308: warning: format '%08x' expects type 'unsigned int', but
argument 6 has type 'long unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/pci/fsl_pci_init.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/fsl_pci_init.c b/drivers/pci/fsl_pci_init.c
index 7f601d4..bff1314 100644
--- a/drivers/pci/fsl_pci_init.c
+++ b/drivers/pci/fsl_pci_init.c
@@ -305,10 +305,10 @@ void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
 	inbound = fsl_pci_setup_inbound_windows(hose, out_lo, pcie_cap, pi);
 
 	for (r = 0; r < hose->region_count; r++)
-		debug("PCI reg:%d %016llx:%016llx %016llx %08x\n", r,
+		debug("PCI reg:%d %016llx:%016llx %016llx %08lx\n", r,
 			(u64)hose->regions[r].phys_start,
-			hose->regions[r].bus_start,
-			hose->regions[r].size,
+			(u64)hose->regions[r].bus_start,
+			(u64)hose->regions[r].size,
 			hose->regions[r].flags);
 
 	pci_register_hose(hose);
@@ -344,7 +344,7 @@ void fsl_pci_init(struct pci_controller *hose, struct fsl_pci_info *pci_info)
 			setbits_be32(&pci->pdb_stat, 0x08000000);
 			(void) in_be32(&pci->pdb_stat);
 			udelay(100);
-			debug("  Asserting PCIe reset @%x = %x\n",
+			debug("  Asserting PCIe reset @%p = %x\n",
 			      &pci->pdb_stat, in_be32(&pci->pdb_stat));
 			/* clear PCIe reset */
 			clrbits_be32(&pci->pdb_stat, 0x08000000);
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 08/18] GCC4.6: Squash warnings in sata_sil3114.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (6 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 07/18] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 09/18] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
                   ` (9 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

sata_sil3114.c: In function 'sata_identify':
sata_sil3114.c:174: warning: format '%x' expects type 'unsigned int', but
argument 2 has type 'lbaint_t'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/block/sata_sil3114.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/sata_sil3114.c b/drivers/block/sata_sil3114.c
index d43064e..1e60636 100644
--- a/drivers/block/sata_sil3114.c
+++ b/drivers/block/sata_sil3114.c
@@ -171,7 +171,7 @@ static void sata_identify (int num, int dev)
 	sata_dev_desc[devno].removable = 0;
 
 	sata_dev_desc[devno].lba = (u32) n_sectors;
-	debug ("lba=0x%x\n", sata_dev_desc[devno].lba);
+	debug("lba=0x%lx\n", sata_dev_desc[devno].lba);
 
 #ifdef CONFIG_LBA48
 	if (iobuf[83] & (1 << 10)) {
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 09/18] GCC4.6: Squash warnings in tqm8xx_pcmcia.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (7 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 08/18] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 10/18] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
                   ` (8 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

tqm8xx_pcmcia.c: In function 'power_off':
tqm8xx_pcmcia.c:46: warning: passing argument 1 of 'out_be32' makes pointer from
integer without a cast
tqm8xx_pcmcia.c: In function 'power_on_5_0':
tqm8xx_pcmcia.c:52: warning: passing argument 1 of 'out_be32' makes pointer from
integer without a cast
tqm8xx_pcmcia.c: In function 'power_on_3_3':
tqm8xx_pcmcia.c:58: warning: passing argument 1 of 'out_be32' makes pointer from
integer without a cast

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/pcmcia/tqm8xx_pcmcia.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/pcmcia/tqm8xx_pcmcia.c b/drivers/pcmcia/tqm8xx_pcmcia.c
index 859cbe0..dda7d37 100644
--- a/drivers/pcmcia/tqm8xx_pcmcia.c
+++ b/drivers/pcmcia/tqm8xx_pcmcia.c
@@ -43,19 +43,28 @@ static inline void power_config(int slot) {}
 
 static inline void power_off(int slot)
 {
-	out_be32(PCMCIA_CTRL, 0);
+	volatile unsigned __iomem *addr;
+	addr = (volatile unsigned __iomem *)PCMCIA_CTRL;
+
+	out_be32(addr, 0);
 }
 
 static inline void power_on_5_0(int slot)
 {
+	volatile unsigned __iomem *addr;
+	addr = (volatile unsigned __iomem *)PCMCIA_CTRL;
+
 	/* Enable 5V Vccout */
-	out_be32(PCMCIA_CTRL, 2);
+	out_be32(addr, 2);
 }
 
 static inline void power_on_3_3(int slot)
 {
+	volatile unsigned __iomem *addr;
+	addr = (volatile unsigned __iomem *)PCMCIA_CTRL;
+
 	/* Enable 3.3V Vccout */
-	out_be32(PCMCIA_CTRL, 1);
+	out_be32(addr, 1);
 }
 
 #else
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 10/18] GCC4.6: Squash error in pcmcia/i82365.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (8 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 09/18] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c Marek Vasut
                   ` (7 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

i82365.c: In function 'cirrus_set_opts':
i82365.c:329: error: 'buf' undeclared (first use in this function)
i82365.c:329: error: (Each undeclared identifier is reported only once
i82365.c:329: error: for each function it appears in.)

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/pcmcia/i82365.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 1bcb3a5..1cde83a 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -272,11 +272,7 @@ static u_int cirrus_set_opts (socket_info_t * s)
 {
 	cirrus_state_t *p = &s->c_state;
 	u_int mask = 0xffff;
-#if DEBUG
-	char buf[200];
-
-	memset (buf, 0, 200);
-#endif
+	char buf[200] = {0};
 
 	if (has_ring == -1)
 		has_ring = 1;
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (9 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 10/18] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:39 ` [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c Marek Vasut
                   ` (6 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

pxa_mmc.c: In function 'mmc_cmd':
pxa_mmc.c:77:2: warning: format '%08x' expects type 'unsigned int', but argument
2 has type 'ulong'
pxa_mmc.c: In function 'mmc_block_read':
pxa_mmc.c:110:2: warning: format '%d' expects type 'int', but argument 4 has
type 'ulong'
pxa_mmc.c: In function 'pxa_mmc_write':
pxa_mmc.c:327:2: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:349:2: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:354:3: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:362:2: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'
pxa_mmc.c:367:3: warning: format '%lx' expects type 'long unsigned int', but
argument 2 has type 'uchar *'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mmc/pxa_mmc.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/mmc/pxa_mmc.c b/drivers/mmc/pxa_mmc.c
index 48e21ef..3c2905c 100644
--- a/drivers/mmc/pxa_mmc.c
+++ b/drivers/mmc/pxa_mmc.c
@@ -55,7 +55,7 @@ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
 /****************************************************/
 {
 	static uint32_t resp[4], a, b, c;
-	ulong status;
+	uint32_t status;
 	int i;
 
 	debug("mmc_cmd %u 0x%04x 0x%04x 0x%04x\n", cmd, argh, argl,
@@ -97,7 +97,7 @@ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
 
 int
 /****************************************************/
-mmc_block_read(uchar * dst, ulong src, ulong len)
+mmc_block_read(uchar * dst, uint32_t src, int len)
 /****************************************************/
 {
 	ushort argh, argl;
@@ -107,7 +107,7 @@ mmc_block_read(uchar * dst, ulong src, ulong len)
 		return 0;
 	}
 
-	debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong) dst, src, len);
+	debug("mmc_block_rd dst %p src %08x len %d\n", dst, src, len);
 
 	argh = len >> 16;
 	argl = len & 0xffff;
@@ -298,7 +298,7 @@ pxa_mmc_read(long src, uchar * dst, int size)
 
 int
 /****************************************************/
-pxa_mmc_write(uchar * src, ulong dst, int size)
+pxa_mmc_write(uchar * src, uint32_t dst, int size)
 /****************************************************/
 {
 	ulong end, part_start, part_end, part_len, aligned_start, aligned_end;
@@ -325,14 +325,14 @@ pxa_mmc_write(uchar * src, ulong dst, int size)
 
 	/* all block aligned accesses */
 	debug
-	    ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-	     src, (ulong) dst, end, part_start, part_end, aligned_start,
+	    ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+	     src, dst, end, part_start, part_end, aligned_start,
 	     aligned_end);
 	if (part_start) {
 		part_len = mmc_block_size - part_start;
 		debug
-		    ("ps src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-		     (ulong) src, dst, end, part_start, part_end, aligned_start,
+		    ("ps src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+		     src, dst, end, part_start, part_end, aligned_start,
 		     aligned_end);
 		if ((mmc_block_read(mmc_buf, aligned_start, mmc_block_size)) <
 		    0) {
@@ -347,26 +347,26 @@ pxa_mmc_write(uchar * src, ulong dst, int size)
 		src += part_len;
 	}
 	debug
-	    ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-	     src, (ulong) dst, end, part_start, part_end, aligned_start,
+	    ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+	     src, dst, end, part_start, part_end, aligned_start,
 	     aligned_end);
 	for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size) {
 		debug
-		    ("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-		     src, (ulong) dst, end, part_start, part_end, aligned_start,
+		    ("al src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+		     src, dst, end, part_start, part_end, aligned_start,
 		     aligned_end);
 		if ((mmc_block_write(dst, (uchar *) src, mmc_block_size)) < 0) {
 			return -1;
 		}
 	}
 	debug
-	    ("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-	     src, (ulong) dst, end, part_start, part_end, aligned_start,
+	    ("src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+	     src, dst, end, part_start, part_end, aligned_start,
 	     aligned_end);
 	if (part_end && dst < end) {
 		debug
-		    ("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
-		     src, (ulong) dst, end, part_start, part_end, aligned_start,
+		    ("pe src %p dst %08x end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+		     src, dst, end, part_start, part_end, aligned_start,
 		     aligned_end);
 		if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0) {
 			return -1;
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (10 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-30 20:37   ` Mike Frysinger
  2011-10-25  9:39 ` [U-Boot] [PATCH 13/18] GCC4.6: Squash warnings in kirkwood_spi.c Marek Vasut
                   ` (5 subsequent siblings)
  17 siblings, 2 replies; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

smsc95xx.c: In function 'smsc95xx_write_hwaddr':
smsc95xx.c:380:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/usb/eth/smsc95xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index 97f2729..7ee4f87 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -377,7 +377,7 @@ static int smsc95xx_write_hwaddr(struct eth_device *eth)
 
 	/* set hardware address */
 	debug("** %s()\n", __func__);
-	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
+	addr_lo = cpu_to_le32(*eth->enetaddr);
 	addr_hi = cpu_to_le16(*((u16 *)(eth->enetaddr + 4)));
 	ret = smsc95xx_write_reg(dev, ADDRL, addr_lo);
 	if (ret < 0) {
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 13/18] GCC4.6: Squash warnings in kirkwood_spi.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (11 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c Marek Vasut
@ 2011-10-25  9:39 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:40 ` [U-Boot] [PATCH 14/18] GCC4.6: Squash warnings in lattice.c Marek Vasut
                   ` (4 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:39 UTC (permalink / raw)
  To: u-boot

kirkwood_spi.c:125:2: warning: format '%08X' expects type 'unsigned int', but
argument 4 has type 'const void *'
kirkwood_spi.c:125:2: warning: format '%08X' expects type 'unsigned int', but
argument 5 has type 'void *'
kirkwood_spi.c:160:5: warning: format '%08x' expects type 'unsigned int', but
argument 2 has type 'void *'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/spi/kirkwood_spi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/kirkwood_spi.c b/drivers/spi/kirkwood_spi.c
index a1c3070..135895f 100644
--- a/drivers/spi/kirkwood_spi.c
+++ b/drivers/spi/kirkwood_spi.c
@@ -122,7 +122,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
 	unsigned int tmpdout, tmpdin;
 	int tm, isread = 0;
 
-	debug("spi_xfer: slave %u:%u dout %08X din %08X bitlen %u\n",
+	debug("spi_xfer: slave %u:%u dout %p din %p bitlen %u\n",
 	      slave->bus, slave->cs, dout, din, bitlen);
 
 	if (flags & SPI_XFER_BEGIN)
@@ -158,7 +158,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen, const void *dout,
 				isread = 1;
 				tmpdin = readl(&spireg->din);
 				debug
-					("spi_xfer: din %08x..%08x read\n",
+					("spi_xfer: din %p..%08x read\n",
 					din, tmpdin);
 
 				if (din) {
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 14/18] GCC4.6: Squash warnings in lattice.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (12 preceding siblings ...)
  2011-10-25  9:39 ` [U-Boot] [PATCH 13/18] GCC4.6: Squash warnings in kirkwood_spi.c Marek Vasut
@ 2011-10-25  9:40 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:40 ` [U-Boot] [PATCH 15/18] GCC4.6: Squash warnings in ks8695eth.c Marek Vasut
                   ` (3 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:40 UTC (permalink / raw)
  To: u-boot

lattice.c:319:4: warning: format '%x' expects type 'unsigned int', but argument
3 has type 'const char *'
lattice.c:319:4: warning: format '%x' expects type 'unsigned int', but argument
4 has type 'long unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/fpga/lattice.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/fpga/lattice.c b/drivers/fpga/lattice.c
index 50d9e54..d8b642a 100644
--- a/drivers/fpga/lattice.c
+++ b/drivers/fpga/lattice.c
@@ -317,7 +317,7 @@ int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize)
 			read_bytes = 0;
 			bufsize = bsize;
 			debug("%s: Launching the Lattice ISPVME Loader:"
-				" addr 0x%x size 0x%x...\n",
+				" addr %p size 0x%lx...\n",
 				__func__, fpga_image, bufsize);
 			ret_val = ispVM();
 			if (ret_val)
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 15/18] GCC4.6: Squash warnings in ks8695eth.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (13 preceding siblings ...)
  2011-10-25  9:40 ` [U-Boot] [PATCH 14/18] GCC4.6: Squash warnings in lattice.c Marek Vasut
@ 2011-10-25  9:40 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:40 ` [U-Boot] [PATCH 16/18] GCC4.6: Squash warning in bus_vcxk.c Marek Vasut
                   ` (2 subsequent siblings)
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:40 UTC (permalink / raw)
  To: u-boot

ks8695eth.c:199:2: warning: format '%x' expects type 'unsigned int', but
argument 4 has type 'volatile void *'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/net/ks8695eth.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/ks8695eth.c b/drivers/net/ks8695eth.c
index cd36880..8e988d1 100644
--- a/drivers/net/ks8695eth.c
+++ b/drivers/net/ks8695eth.c
@@ -196,7 +196,7 @@ static int ks8695_eth_send(struct eth_device *dev, volatile void *packet,
 	volatile struct ks8695_txdesc *dp;
 	static int next = 0;
 
-	debug ("%s(%d): eth_send(packet=%x,len=%d)\n", __FILE__, __LINE__,
+	debug ("%s(%d): eth_send(packet=%p,len=%d)\n", __FILE__, __LINE__,
 		packet, len);
 
 	dp = &ks8695_tx[next];
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 16/18] GCC4.6: Squash warning in bus_vcxk.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (14 preceding siblings ...)
  2011-10-25  9:40 ` [U-Boot] [PATCH 15/18] GCC4.6: Squash warnings in ks8695eth.c Marek Vasut
@ 2011-10-25  9:40 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:40 ` [U-Boot] [PATCH 17/18] GCC4.6: Squash warnings in fec_mxc.c Marek Vasut
  2011-10-25  9:40 ` [U-Boot] [PATCH 18/18] GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c Marek Vasut
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:40 UTC (permalink / raw)
  To: u-boot

bus_vcxk.c:167:2: warning: format '%d' expects type 'int', but argument 2 has
type 'u_long'
bus_vcxk.c:167:2: warning: format '%d' expects type 'int', but argument 3 has
type 'u_long'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/video/bus_vcxk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/bus_vcxk.c b/drivers/video/bus_vcxk.c
index 67a59a7..7aecb92 100644
--- a/drivers/video/bus_vcxk.c
+++ b/drivers/video/bus_vcxk.c
@@ -164,7 +164,7 @@ int vcxk_init(unsigned long width, unsigned long height)
 #else
 	#error CONFIG_SYS_VCXK_DEFAULT_LINEALIGN is invalid
 #endif
-	debug("linesize ((%d + 15) / 8 & ~0x1) = %d\n",
+	debug("linesize ((%ld + 15) / 8 & ~0x1) = %ld\n",
 		display_width, display_bwidth);
 
 #ifdef CONFIG_SYS_VCXK_AUTODETECT
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 17/18] GCC4.6: Squash warnings in fec_mxc.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (15 preceding siblings ...)
  2011-10-25  9:40 ` [U-Boot] [PATCH 16/18] GCC4.6: Squash warning in bus_vcxk.c Marek Vasut
@ 2011-10-25  9:40 ` Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
  2011-10-25  9:40 ` [U-Boot] [PATCH 18/18] GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c Marek Vasut
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:40 UTC (permalink / raw)
  To: u-boot

fec_mxc.c: In function 'fec_mii_setspeed':
fec_mxc.c:112:2: warning: format '%#lx' expects type 'long unsigned int', but
argument 2 has type 'u32'
fec_mxc.c: In function 'fec_recv':
fec_mxc.c:632:2: warning: format '%x' expects type 'unsigned int', but argument
2 has type 'long unsigned int'

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/net/fec_mxc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index cfe2176..0c0c7cd 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -109,7 +109,7 @@ static void fec_mii_setspeed(struct fec_priv *fec)
 	 */
 	writel((((imx_get_fecclk() / 1000000) + 2) / 5) << 1,
 			&fec->eth->mii_speed);
-	debug("fec_init: mii_speed %#lx\n",
+	debug("fec_init: mii_speed %08x\n",
 			readl(&fec->eth->mii_speed));
 }
 static int fec_miiphy_write(const char *dev, uint8_t phyAddr, uint8_t regAddr,
@@ -629,7 +629,7 @@ static int fec_recv(struct eth_device *dev)
 	 */
 	ievent = readl(&fec->eth->ievent);
 	writel(ievent, &fec->eth->ievent);
-	debug("fec_recv: ievent 0x%x\n", ievent);
+	debug("fec_recv: ievent 0x%lx\n", ievent);
 	if (ievent & FEC_IEVENT_BABR) {
 		fec_halt(dev);
 		fec_init(dev, fec->bd);
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 18/18] GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c
  2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
                   ` (16 preceding siblings ...)
  2011-10-25  9:40 ` [U-Boot] [PATCH 17/18] GCC4.6: Squash warnings in fec_mxc.c Marek Vasut
@ 2011-10-25  9:40 ` Marek Vasut
  2011-10-27 22:01   ` Wolfgang Denk
  17 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-25  9:40 UTC (permalink / raw)
  To: u-boot

The debugX() macro was always used with debug level 1. There is no point to use
it here instead of debug().

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/nand/s3c2410_nand.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index 27351fb..e1a459b 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -56,7 +56,7 @@ static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 	struct nand_chip *chip = mtd->priv;
 	struct s3c2410_nand *nand = s3c2410_get_base_nand();
 
-	debugX(1, "hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
+	debug("hwcontrol(): 0x%02x 0x%02x\n", cmd, ctrl);
 
 	if (ctrl & NAND_CTRL_CHANGE) {
 		ulong IO_ADDR_W = (ulong)nand;
@@ -83,7 +83,7 @@ static void s3c2410_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 static int s3c2410_dev_ready(struct mtd_info *mtd)
 {
 	struct s3c2410_nand *nand = s3c2410_get_base_nand();
-	debugX(1, "dev_ready\n");
+	debug("dev_ready\n");
 	return readl(&nand->nfstat) & 0x01;
 }
 
@@ -91,7 +91,7 @@ static int s3c2410_dev_ready(struct mtd_info *mtd)
 void s3c2410_nand_enable_hwecc(struct mtd_info *mtd, int mode)
 {
 	struct s3c2410_nand *nand = s3c2410_get_base_nand();
-	debugX(1, "s3c2410_nand_enable_hwecc(%p, %d)\n", mtd, mode);
+	debug("s3c2410_nand_enable_hwecc(%p, %d)\n", mtd, mode);
 	writel(readl(&nand->nfconf) | S3C2410_NFCONF_INITECC, &nand->nfconf);
 }
 
@@ -102,7 +102,7 @@ static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
 	ecc_code[0] = readb(&nand->nfecc);
 	ecc_code[1] = readb(&nand->nfecc + 1);
 	ecc_code[2] = readb(&nand->nfecc + 2);
-	debugX(1, "s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
+	debug("s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
 	       mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
 
 	return 0;
@@ -128,7 +128,7 @@ int board_nand_init(struct nand_chip *nand)
 	struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power();
 	struct s3c2410_nand *nand_reg = s3c2410_get_base_nand();
 
-	debugX(1, "board_nand_init()\n");
+	debug("board_nand_init()\n");
 
 	writel(readl(&clk_power->clkcon) | (1 << 4), &clk_power->clkcon);
 
@@ -183,7 +183,7 @@ int board_nand_init(struct nand_chip *nand)
 	nand->options = 0;
 #endif
 
-	debugX(1, "end of nand_init\n");
+	debug("end of nand_init\n");
 
 	return 0;
 }
-- 
1.7.6.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-2-git-send-email-marek.vasut@gmail.com> you wrote:
> cfb_console.c: In function 'video_display_bitmap':
> cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 2 has
> type 'long unsigned int'
> cfb_console.c:1148: warning: format '%d' expects type 'int', but argument 3 has
> type 'long unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/video/cfb_console.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
It would be illogical to kill without reason
	-- Spock, "Journey to Babel", stardate 3842.4

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 02/18] GCC4.6: Squash warning in cfi_flash.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 02/18] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-3-git-send-email-marek.vasut@gmail.com> you wrote:
> cfi_flash.c: In function 'flash_protect_default':
> cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
> argument 2 has type 'ulong'
> cfi_flash.c:2152: warning: format '%08x' expects type 'unsigned int', but
> argument 3 has type 'long unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
>  drivers/mtd/cfi_flash.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The algorithm to do that is extremely nasty. You might want  to  mug
someone with it."                   - M. Devine, Computer Science 340

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 03/18] GCC4.6: Squash warning in jedec_flash.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 03/18] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-4-git-send-email-marek.vasut@gmail.com> you wrote:
> jedec_flash.c: In function 'fill_info':
> jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
> argument 2 has type 'ulong'
> jedec_flash.c:393: warning: format '%x' expects type 'unsigned int', but
> argument 3 has type 'ulong'
> jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 2 has
> type 'ulong'
> jedec_flash.c:402: warning: format '%d' expects type 'int', but argument 3 has
> type 'ulong'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> Cc: Scott Wood <scottwood@freescale.com>
> ---
>  drivers/mtd/jedec_flash.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
8) Use common sense in routing  cable.  Avoid  wrapping  coax  around
   sources  of  strong  electric  or magnetic fields. Do not wrap the
   cable  around  flourescent  light  ballasts  or  cyclotrons,   for
   example.
- Ethernet Headstart Product, Information and Installation Guide,
   Bell Technologies, pg. 11

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 04/18] GCC4.6: Squash warnings in 4xx_enet.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 04/18] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-5-git-send-email-marek.vasut@gmail.com> you wrote:
> 4xx_enet.c: In function 'ppc_4xx_eth_init':
> 4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
> argument 2 has type 'volatile struct mal_desc_t *'
> 4xx_enet.c:1352: warning: format '%08x' expects type 'unsigned int', but
> argument 3 has type 'volatile struct mal_desc_t *'
> 4xx_enet.c:1365: warning: format '%08lx' expects type 'long unsigned int', but
> argument 3 has type 'unsigned int'
> 4xx_enet.c:1376: warning: format '%08lx' expects type 'long unsigned int', but
> argument 3 has type 'unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/net/4xx_enet.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
One essential to success is that you desire be an all-obsessing  one,
your thoughts and aims be co-ordinated, and your energy be concentra-
ted and applied without letup.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 05/18] GCC4.6: Squash warnings in ahci.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 05/18] GCC4.6: Squash warnings in ahci.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-6-git-send-email-marek.vasut@gmail.com> you wrote:
> ahci.c: In function 'ahci_port_start':
> ahci.c:401: warning: format '%x' expects type 'unsigned int', but argument 2 has
> type 'struct ahci_cmd_hdr *'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/block/ahci.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"I'm not a god, I was misquoted."                 - Lister, Red Dwarf

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 06/18] GCC4.6: Squash warnings in fsl_espi.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 06/18] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-7-git-send-email-marek.vasut@gmail.com> you wrote:
> fsl_espi.c: In function 'spi_setup_slave':
> fsl_espi.c:100: warning: format '%d' expects type 'int', but argument 3 has type
> 'long unsigned int'
> fsl_espi.c: In function 'spi_xfer':
> fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument
> 5 has type 'const void *'
> fsl_espi.c:237: warning: format '%08x' expects type 'unsigned int', but argument
> 7 has type 'void *'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/spi/fsl_espi.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you think the problem is bad now, just wait until we've solved it.
                                                        Epstein's Law

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 07/18] GCC4.6: Squash warnings in fsl_pci_init.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 07/18] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
@ 2011-10-27 21:59   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 21:59 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-8-git-send-email-marek.vasut@gmail.com> you wrote:
> fsl_pci_init.c: In function 'fsl_pci_init':
> fsl_pci_init.c:308: warning: format '%08x' expects type 'unsigned int', but
> argument 6 has type 'long unsigned int'
> fsl_pci_init.c:347: warning: format '%x' expects type 'unsigned int', but
> argument 2 has type 'volatile u32 *'
> 
> fsl_pci_init.c: In function 'fsl_pci_init':
> fsl_pci_init.c:308: warning: format '%016llx' expects type 'long long unsigned
> int', but argument 4 has type 'pci_addr_t'
> fsl_pci_init.c:308: warning: format '%016llx' expects type 'long long unsigned
> int', but argument 5 has type 'pci_size_t'
> fsl_pci_init.c:308: warning: format '%08x' expects type 'unsigned int', but
> argument 6 has type 'long unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/pci/fsl_pci_init.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
... The prejudices people feel about each other disappear  when  then
get to know each other.
	-- Kirk, "Elaan of Troyius", stardate 4372.5

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 08/18] GCC4.6: Squash warnings in sata_sil3114.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 08/18] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-9-git-send-email-marek.vasut@gmail.com> you wrote:
> sata_sil3114.c: In function 'sata_identify':
> sata_sil3114.c:174: warning: format '%x' expects type 'unsigned int', but
> argument 2 has type 'lbaint_t'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/block/sata_sil3114.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The trouble with doing something right the first time is that nobody
appreciates how difficult it was."                        - Walt West

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 09/18] GCC4.6: Squash warnings in tqm8xx_pcmcia.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 09/18] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-10-git-send-email-marek.vasut@gmail.com> you wrote:
> tqm8xx_pcmcia.c: In function 'power_off':
> tqm8xx_pcmcia.c:46: warning: passing argument 1 of 'out_be32' makes pointer from
> integer without a cast
> tqm8xx_pcmcia.c: In function 'power_on_5_0':
> tqm8xx_pcmcia.c:52: warning: passing argument 1 of 'out_be32' makes pointer from
> integer without a cast
> tqm8xx_pcmcia.c: In function 'power_on_3_3':
> tqm8xx_pcmcia.c:58: warning: passing argument 1 of 'out_be32' makes pointer from
> integer without a cast
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/pcmcia/tqm8xx_pcmcia.c |   15 ++++++++++++---
>  1 files changed, 12 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Maintain an awareness for contribution --  to  your  schedule,  your
project, our company."                         - A Group of Employees

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 10/18] GCC4.6: Squash error in pcmcia/i82365.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 10/18] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-11-git-send-email-marek.vasut@gmail.com> you wrote:
> i82365.c: In function 'cirrus_set_opts':
> i82365.c:329: error: 'buf' undeclared (first use in this function)
> i82365.c:329: error: (Each undeclared identifier is reported only once
> i82365.c:329: error: for each function it appears in.)
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/pcmcia/i82365.c |    6 +-----
>  1 files changed, 1 insertions(+), 5 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Spock, did you see the looks on their faces?"
"Yes, Captain, a sort of vacant contentment."

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-12-git-send-email-marek.vasut@gmail.com> you wrote:
> pxa_mmc.c: In function 'mmc_cmd':
> pxa_mmc.c:77:2: warning: format '%08x' expects type 'unsigned int', but argument
> 2 has type 'ulong'
> pxa_mmc.c: In function 'mmc_block_read':
> pxa_mmc.c:110:2: warning: format '%d' expects type 'int', but argument 4 has
> type 'ulong'
> pxa_mmc.c: In function 'pxa_mmc_write':
> pxa_mmc.c:327:2: warning: format '%lx' expects type 'long unsigned int', but
> argument 2 has type 'uchar *'
> pxa_mmc.c:349:2: warning: format '%lx' expects type 'long unsigned int', but
> argument 2 has type 'uchar *'
> pxa_mmc.c:354:3: warning: format '%lx' expects type 'long unsigned int', but
> argument 2 has type 'uchar *'
> pxa_mmc.c:362:2: warning: format '%lx' expects type 'long unsigned int', but
> argument 2 has type 'uchar *'
> pxa_mmc.c:367:3: warning: format '%lx' expects type 'long unsigned int', but
> argument 2 has type 'uchar *'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/mmc/pxa_mmc.c |   32 ++++++++++++++++----------------
>  1 files changed, 16 insertions(+), 16 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The best things in life are for a fee.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  2011-10-30 20:37   ` Mike Frysinger
  1 sibling, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-13-git-send-email-marek.vasut@gmail.com> you wrote:
> smsc95xx.c: In function 'smsc95xx_write_hwaddr':
> smsc95xx.c:380:2: warning: dereferencing type-punned pointer will break
> strict-aliasing rules
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/usb/eth/smsc95xx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
grep me no patterns and I'll tell you no lines.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 13/18] GCC4.6: Squash warnings in kirkwood_spi.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 13/18] GCC4.6: Squash warnings in kirkwood_spi.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-14-git-send-email-marek.vasut@gmail.com> you wrote:
> kirkwood_spi.c:125:2: warning: format '%08X' expects type 'unsigned int', but
> argument 4 has type 'const void *'
> kirkwood_spi.c:125:2: warning: format '%08X' expects type 'unsigned int', but
> argument 5 has type 'void *'
> kirkwood_spi.c:160:5: warning: format '%08x' expects type 'unsigned int', but
> argument 2 has type 'void *'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/spi/kirkwood_spi.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Program maintenance is an entropy-increasing process,  and  even  its
most skilfull execution only delays the subsidence of the system into
unfixable obsolescence.       - Fred Brooks, "The Mythical Man Month"

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 14/18] GCC4.6: Squash warnings in lattice.c
  2011-10-25  9:40 ` [U-Boot] [PATCH 14/18] GCC4.6: Squash warnings in lattice.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-15-git-send-email-marek.vasut@gmail.com> you wrote:
> lattice.c:319:4: warning: format '%x' expects type 'unsigned int', but argument
> 3 has type 'const char *'
> lattice.c:319:4: warning: format '%x' expects type 'unsigned int', but argument
> 4 has type 'long unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/fpga/lattice.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
8 Catfish                                               = 1 Octo-puss

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 15/18] GCC4.6: Squash warnings in ks8695eth.c
  2011-10-25  9:40 ` [U-Boot] [PATCH 15/18] GCC4.6: Squash warnings in ks8695eth.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-16-git-send-email-marek.vasut@gmail.com> you wrote:
> ks8695eth.c:199:2: warning: format '%x' expects type 'unsigned int', but
> argument 4 has type 'volatile void *'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/net/ks8695eth.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Fantasy is like alcohol - too much is bad for you, a little bit makes
the world a better place. Like  an  exercise  bicycle  it  takes  you
nowhere, but it just might tone up the muscles that will. Daydreaming
got  us  where we are today; early in our evolution we learned to let
our minds wander so well that they started coming  back  with  souve-
nirs.   - Terry Pratchett & Stephen Briggs, _The Discworld Companion_

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 16/18] GCC4.6: Squash warning in bus_vcxk.c
  2011-10-25  9:40 ` [U-Boot] [PATCH 16/18] GCC4.6: Squash warning in bus_vcxk.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-17-git-send-email-marek.vasut@gmail.com> you wrote:
> bus_vcxk.c:167:2: warning: format '%d' expects type 'int', but argument 2 has
> type 'u_long'
> bus_vcxk.c:167:2: warning: format '%d' expects type 'int', but argument 3 has
> type 'u_long'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/video/bus_vcxk.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
core error - bus dumped

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 17/18] GCC4.6: Squash warnings in fec_mxc.c
  2011-10-25  9:40 ` [U-Boot] [PATCH 17/18] GCC4.6: Squash warnings in fec_mxc.c Marek Vasut
@ 2011-10-27 22:00   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:00 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-18-git-send-email-marek.vasut@gmail.com> you wrote:
> fec_mxc.c: In function 'fec_mii_setspeed':
> fec_mxc.c:112:2: warning: format '%#lx' expects type 'long unsigned int', but
> argument 2 has type 'u32'
> fec_mxc.c: In function 'fec_recv':
> fec_mxc.c:632:2: warning: format '%x' expects type 'unsigned int', but argument
> 2 has type 'long unsigned int'
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/net/fec_mxc.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Yes, it's a technical challenge, and  you  have  to  kind  of  admire
people  who go to the lengths of actually implementing it, but at the
same time you wonder about their IQ...
         --  Linus Torvalds in <5phda5$ml6$1@palladium.transmeta.com>

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 18/18] GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c
  2011-10-25  9:40 ` [U-Boot] [PATCH 18/18] GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c Marek Vasut
@ 2011-10-27 22:01   ` Wolfgang Denk
  0 siblings, 0 replies; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-27 22:01 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <1319535604-20831-19-git-send-email-marek.vasut@gmail.com> you wrote:
> The debugX() macro was always used with debug level 1. There is no point to use
> it here instead of debug().
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> Cc: Wolfgang Denk <wd@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  drivers/mtd/nand/s3c2410_nand.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Just think, with VLSI we can have 100 ENIACS on a chip!"
- Alan Perlis

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-25  9:39 ` [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c Marek Vasut
  2011-10-27 22:00   ` Wolfgang Denk
@ 2011-10-30 20:37   ` Mike Frysinger
  2011-10-30 20:48     ` Marek Vasut
  1 sibling, 1 reply; 44+ messages in thread
From: Mike Frysinger @ 2011-10-30 20:37 UTC (permalink / raw)
  To: u-boot

On Tuesday 25 October 2011 05:39:58 Marek Vasut wrote:
> --- a/drivers/usb/eth/smsc95xx.c
> +++ b/drivers/usb/eth/smsc95xx.c
> 
> -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> +	addr_lo = cpu_to_le32(*eth->enetaddr);

pretty sure this is wrong.  enetaddr is a uchar[], so your code now reads only 
1 byte instead of 4.

that said, this code also seems to not be endian safe ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/e9c7082c/attachment.pgp 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-30 20:37   ` Mike Frysinger
@ 2011-10-30 20:48     ` Marek Vasut
  2011-10-30 22:03       ` Wolfgang Denk
  2011-10-30 22:59       ` Mike Frysinger
  0 siblings, 2 replies; 44+ messages in thread
From: Marek Vasut @ 2011-10-30 20:48 UTC (permalink / raw)
  To: u-boot

> On Tuesday 25 October 2011 05:39:58 Marek Vasut wrote:
> > --- a/drivers/usb/eth/smsc95xx.c
> > +++ b/drivers/usb/eth/smsc95xx.c
> > 
> > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> 
> pretty sure this is wrong.  enetaddr is a uchar[], so your code now reads
> only 1 byte instead of 4.
> 
> that said, this code also seems to not be endian safe ...
> -mike

It's good anyone actually cares to properly review. Anyway, why does noone 
actually care to fix all the damn warnings in their drivers before submitting 
them in the first place ?!

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-30 20:48     ` Marek Vasut
@ 2011-10-30 22:03       ` Wolfgang Denk
  2011-10-30 22:19         ` Marek Vasut
  2011-10-30 22:59       ` Mike Frysinger
  1 sibling, 1 reply; 44+ messages in thread
From: Wolfgang Denk @ 2011-10-30 22:03 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

In message <201110302148.50367.marek.vasut@gmail.com> you wrote:
>
> > > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> > 
> > pretty sure this is wrong.  enetaddr is a uchar[], so your code now reads
> > only 1 byte instead of 4.
> > 
> > that said, this code also seems to not be endian safe ...
> > -mike
> 
> It's good anyone actually cares to properly review. Anyway, why does noone 
> actually care to fix all the damn warnings in their drivers before submitting 
> them in the first place ?!

GCC 4.6 has not been around that long.  Many people use less
bleading-edge tool chains - for a good reason.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Whenever people agree with me, I always think I must be wrong.
- Oscar Wilde

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-30 22:03       ` Wolfgang Denk
@ 2011-10-30 22:19         ` Marek Vasut
  0 siblings, 0 replies; 44+ messages in thread
From: Marek Vasut @ 2011-10-30 22:19 UTC (permalink / raw)
  To: u-boot

> Dear Marek Vasut,
> 
> In message <201110302148.50367.marek.vasut@gmail.com> you wrote:
> > > > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > > > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> > > 
> > > pretty sure this is wrong.  enetaddr is a uchar[], so your code now
> > > reads only 1 byte instead of 4.
> > > 
> > > that said, this code also seems to not be endian safe ...
> > > -mike
> > 
> > It's good anyone actually cares to properly review. Anyway, why does
> > noone actually care to fix all the damn warnings in their drivers before
> > submitting them in the first place ?!
> 
> GCC 4.6 has not been around that long.  Many people use less
> bleading-edge tool chains - for a good reason.

The problem is I saw this warning with gcc 4.2 too :-(

Cheers

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-30 20:48     ` Marek Vasut
  2011-10-30 22:03       ` Wolfgang Denk
@ 2011-10-30 22:59       ` Mike Frysinger
  2011-10-30 23:45         ` Marek Vasut
  1 sibling, 1 reply; 44+ messages in thread
From: Mike Frysinger @ 2011-10-30 22:59 UTC (permalink / raw)
  To: u-boot

On Sunday 30 October 2011 16:48:50 Marek Vasut wrote:
> > On Tuesday 25 October 2011 05:39:58 Marek Vasut wrote:
> > > --- a/drivers/usb/eth/smsc95xx.c
> > > +++ b/drivers/usb/eth/smsc95xx.c
> > > 
> > > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> > 
> > pretty sure this is wrong.  enetaddr is a uchar[], so your code now reads
> > only 1 byte instead of 4.
> > 
> > that said, this code also seems to not be endian safe ...
> 
> It's good anyone actually cares to properly review. Anyway, why does noone
> actually care to fix all the damn warnings in their drivers before
> submitting them in the first place ?!

the strict alias warnings you are hitting show up only in newer compilers.  so 
i'm sure at the time of their development/submission, they didn't exist.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/c4ccfb1b/attachment.pgp 

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-30 22:59       ` Mike Frysinger
@ 2011-10-30 23:45         ` Marek Vasut
  2011-10-31  0:19           ` Mike Frysinger
  0 siblings, 1 reply; 44+ messages in thread
From: Marek Vasut @ 2011-10-30 23:45 UTC (permalink / raw)
  To: u-boot

> On Sunday 30 October 2011 16:48:50 Marek Vasut wrote:
> > > On Tuesday 25 October 2011 05:39:58 Marek Vasut wrote:
> > > > --- a/drivers/usb/eth/smsc95xx.c
> > > > +++ b/drivers/usb/eth/smsc95xx.c
> > > > 
> > > > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > > > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> > > 
> > > pretty sure this is wrong.  enetaddr is a uchar[], so your code now
> > > reads only 1 byte instead of 4.
> > > 
> > > that said, this code also seems to not be endian safe ...
> > 
> > It's good anyone actually cares to properly review. Anyway, why does
> > noone actually care to fix all the damn warnings in their drivers before
> > submitting them in the first place ?!
> 
> the strict alias warnings you are hitting show up only in newer compilers. 
> so i'm sure at the time of their development/submission, they didn't
> exist. -mike

This is a different driver than that armada100_fec.c.

^ permalink raw reply	[flat|nested] 44+ messages in thread

* [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c
  2011-10-30 23:45         ` Marek Vasut
@ 2011-10-31  0:19           ` Mike Frysinger
  0 siblings, 0 replies; 44+ messages in thread
From: Mike Frysinger @ 2011-10-31  0:19 UTC (permalink / raw)
  To: u-boot

On Sunday 30 October 2011 19:45:43 Marek Vasut wrote:
> > On Sunday 30 October 2011 16:48:50 Marek Vasut wrote:
> > > > On Tuesday 25 October 2011 05:39:58 Marek Vasut wrote:
> > > > > --- a/drivers/usb/eth/smsc95xx.c
> > > > > +++ b/drivers/usb/eth/smsc95xx.c
> > > > > 
> > > > > -	addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr));
> > > > > +	addr_lo = cpu_to_le32(*eth->enetaddr);
> > > > 
> > > > pretty sure this is wrong.  enetaddr is a uchar[], so your code now
> > > > reads only 1 byte instead of 4.
> > > > 
> > > > that said, this code also seems to not be endian safe ...
> > > 
> > > It's good anyone actually cares to properly review. Anyway, why does
> > > noone actually care to fix all the damn warnings in their drivers
> > > before submitting them in the first place ?!
> > 
> > the strict alias warnings you are hitting show up only in newer
> > compilers. so i'm sure at the time of their development/submission, they
> > didn't exist.
> 
> This is a different driver than that armada100_fec.c.

ok ?  the original 12/18 patch said:
smsc95xx.c: In function 'smsc95xx_write_hwaddr':
smsc95xx.c:380:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111030/1493da06/attachment.pgp 

^ permalink raw reply	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2011-10-31  0:19 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25  9:39 [U-Boot] [PATCH 00/18] CLEANUP: Cleanup of drivers/ directory Marek Vasut
2011-10-25  9:39 ` [U-Boot] [PATCH 01/18] GCC4.6: Squash warning in cfb_console.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 02/18] GCC4.6: Squash warning in cfi_flash.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 03/18] GCC4.6: Squash warning in jedec_flash.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 04/18] GCC4.6: Squash warnings in 4xx_enet.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 05/18] GCC4.6: Squash warnings in ahci.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 06/18] GCC4.6: Squash warnings in fsl_espi.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 07/18] GCC4.6: Squash warnings in fsl_pci_init.c Marek Vasut
2011-10-27 21:59   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 08/18] GCC4.6: Squash warnings in sata_sil3114.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 09/18] GCC4.6: Squash warnings in tqm8xx_pcmcia.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 10/18] GCC4.6: Squash error in pcmcia/i82365.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 11/18] GCC4.6: Fix warnings in pxa_mmc.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:39 ` [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-30 20:37   ` Mike Frysinger
2011-10-30 20:48     ` Marek Vasut
2011-10-30 22:03       ` Wolfgang Denk
2011-10-30 22:19         ` Marek Vasut
2011-10-30 22:59       ` Mike Frysinger
2011-10-30 23:45         ` Marek Vasut
2011-10-31  0:19           ` Mike Frysinger
2011-10-25  9:39 ` [U-Boot] [PATCH 13/18] GCC4.6: Squash warnings in kirkwood_spi.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:40 ` [U-Boot] [PATCH 14/18] GCC4.6: Squash warnings in lattice.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:40 ` [U-Boot] [PATCH 15/18] GCC4.6: Squash warnings in ks8695eth.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:40 ` [U-Boot] [PATCH 16/18] GCC4.6: Squash warning in bus_vcxk.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:40 ` [U-Boot] [PATCH 17/18] GCC4.6: Squash warnings in fec_mxc.c Marek Vasut
2011-10-27 22:00   ` Wolfgang Denk
2011-10-25  9:40 ` [U-Boot] [PATCH 18/18] GCC4.6: Use debug() instead of debugX() in s3c24xx_nand.c Marek Vasut
2011-10-27 22:01   ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox