diff options
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 20b4912..ff59064 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 9424fb2..e04a784 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 bfe87fa..15d0a6e 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 883f3a7..24b28da 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 974bb31..325edb9 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 */ |