diff options
author | Wolfgang Denk <wd@denx.de> | 2011-11-23 21:23:45 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-11-23 21:23:45 +0100 |
commit | fdbe8b9a2d1858ba35dd6214315563ad44d4a0e3 (patch) | |
tree | 98c39a0594ef02e08d5842cfff1f1d6bcc5a8eda /drivers | |
parent | bd0f5ca806c73f9e1ef4a2a0416233ab7e257df9 (diff) | |
parent | d780e74fc3abe6a8b9a01357720c15d974d83dae (diff) |
Merge branch 'hs@denx.de' of git://git.denx.de/u-boot-staging
* 'hs@denx.de' of git://git.denx.de/u-boot-staging:
drivers/net/dnet.c: Fix GCC 4.6 warnings
board/xaeniax/flash.c: Fix GCC 4.6 warnings
net/bootp.c: Fix GCC 4.6 warning
common/cmd_bootm.c: Fix GCC 4.6 warnings
board/mx1ads/mx1ads.c: Fix GCC 4.6 warning
board/mx1ads/syncflash.c: Fix GCC 4.6 warnings
board/lubbock/flash.c: Fix GCC 4.6 warnings
drivers/net/cs8900.c: Fix GCC 4.6 warning
arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings
drivers/net/lan91c96.c: Fix GCC 4.6 warning
board/ronetix/pm9263/pm9263.c: Fix GCC 4.6 warning
drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning
drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/onenand/samsung.c | 3 | ||||
-rw-r--r-- | drivers/net/cs8900.c | 11 | ||||
-rw-r--r-- | drivers/net/dnet.c | 12 | ||||
-rw-r--r-- | drivers/net/lan91c96.c | 7 | ||||
-rw-r--r-- | drivers/usb/musb/musb_hcd.c | 3 |
5 files changed, 14 insertions, 22 deletions
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c index 20b49124d5a..ff590645999 100644 --- a/drivers/mtd/onenand/samsung.c +++ b/drivers/mtd/onenand/samsung.c @@ -483,12 +483,11 @@ static void s3c_onenand_check_lock_status(struct mtd_info *mtd) { struct onenand_chip *this = mtd->priv; unsigned int block, end; - int tmp; end = this->chipsize >> this->erase_shift; for (block = 0; block < end; block++) { - tmp = s3c_read_cmd(CMD_MAP_01(onenand->mem_addr(block, 0, 0))); + s3c_read_cmd(CMD_MAP_01(onenand->mem_addr(block, 0, 0))); if (readl(&onenand->reg->int_err_stat) & LOCKED_BLK) { printf("block %d is write-protected!\n", block); diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c index 9424fb2bb69..e04a784a4bb 100644 --- a/drivers/net/cs8900.c +++ b/drivers/net/cs8900.c @@ -66,15 +66,14 @@ static u16 get_reg_init_bus(struct eth_device *dev, int regno) { /* force 16 bit busmode */ - volatile u8 c; struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv); uint8_t volatile * const iob = (uint8_t volatile * const)dev->iobase; - c = readb(iob); - c = readb(iob + 1); - c = readb(iob); - c = readb(iob + 1); - c = readb(iob); + readb(iob); + readb(iob + 1); + readb(iob); + readb(iob + 1); + readb(iob); REG_WRITE(regno, &priv->regs->pptr); return REG_READ(&priv->regs->pdata); diff --git a/drivers/net/dnet.c b/drivers/net/dnet.c index bfe87faa2f9..15d0a6e7410 100644 --- a/drivers/net/dnet.c +++ b/drivers/net/dnet.c @@ -20,6 +20,7 @@ #include <miiphy.h> #include <asm/io.h> +#include <asm/unaligned.h> #include "dnet.h" @@ -133,15 +134,12 @@ static int dnet_send(struct eth_device *netdev, volatile void *packet, int length) { struct dnet_device *dnet = to_dnet(netdev); - int i, len, wrsz; + int i, wrsz; unsigned int *bufp; unsigned int tx_cmd; debug(DRIVERNAME "[%s] Sending %u bytes\n", __func__, length); - /* frame size (words) */ - len = (length + 3) >> 2; - bufp = (unsigned int *) (((u32)packet) & 0xFFFFFFFC); wrsz = (u32)length + 3; wrsz += ((u32)packet) & 0x3; @@ -206,11 +204,11 @@ static void dnet_set_hwaddr(struct eth_device *netdev) struct dnet_device *dnet = to_dnet(netdev); u16 tmp; - tmp = cpu_to_be16(*((u16 *)netdev->enetaddr)); + tmp = get_unaligned_be16(netdev->enetaddr); dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_0_REG, tmp); - tmp = cpu_to_be16(*((u16 *)(netdev->enetaddr + 2))); + tmp = get_unaligned_be16(&netdev->enetaddr[2]); dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_1_REG, tmp); - tmp = cpu_to_be16(*((u16 *)(netdev->enetaddr + 4))); + tmp = get_unaligned_be16(&netdev->enetaddr[4]); dnet_writew_mac(dnet, DNET_INTERNAL_MAC_ADDR_2_REG, tmp); } diff --git a/drivers/net/lan91c96.c b/drivers/net/lan91c96.c index 883f3a7c5d0..24b28da249b 100644 --- a/drivers/net/lan91c96.c +++ b/drivers/net/lan91c96.c @@ -63,6 +63,7 @@ #include <malloc.h> #include "lan91c96.h" #include <net.h> +#include <linux/compiler.h> /*------------------------------------------------------------------------ * @@ -154,7 +155,7 @@ static void smc_set_mac_addr(const unsigned char *addr) ***********************************************/ void dump_memory_info(struct eth_device *dev) { - word mem_info; + __maybe_unused word mem_info; word old_bank; old_bank = SMC_inw(dev, LAN91C96_BANK_SELECT) & 0xF; @@ -317,7 +318,6 @@ static int smc_send_packet(struct eth_device *dev, volatile void *packet, int packet_length) { byte packet_no; - unsigned long ioaddr; byte *buf; int length; int numPages; @@ -381,9 +381,6 @@ static int smc_send_packet(struct eth_device *dev, volatile void *packet, dev->name, try); /* I can send the packet now.. */ - - ioaddr = dev->iobase; - buf = (byte *) packet; /* If I get here, I _know_ there is a packet slot waiting for me */ diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c index 974bb311cca..325edb9677d 100644 --- a/drivers/usb/musb/musb_hcd.c +++ b/drivers/usb/musb/musb_hcd.c @@ -848,7 +848,6 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, int len, struct devrequest *setup) { int devnum = usb_pipedevice(pipe); - u16 csr; u8 devspeed; #ifdef MUSB_NO_MULTIPOINT @@ -862,7 +861,7 @@ int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer, /* select control endpoint */ writeb(MUSB_CONTROL_EP, &musbr->index); - csr = readw(&musbr->txcsr); + readw(&musbr->txcsr); #ifndef MUSB_NO_MULTIPOINT /* target addr and (for multipoint) hub addr/port */ |