diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cfb_console.c | 17 | ||||
-rw-r--r-- | drivers/dc2114x.c | 4 | ||||
-rw-r--r-- | drivers/e1000.c | 2 | ||||
-rw-r--r-- | drivers/natsemi.c | 3 | ||||
-rw-r--r-- | drivers/ns8382x.c | 2 | ||||
-rw-r--r-- | drivers/pcnet.c | 2 | ||||
-rw-r--r-- | drivers/smiLynxEM.c | 3 | ||||
-rw-r--r-- | drivers/tsec.c | 4 |
8 files changed, 23 insertions, 14 deletions
diff --git a/drivers/cfb_console.c b/drivers/cfb_console.c index aba4a03..9727aeb 100644 --- a/drivers/cfb_console.c +++ b/drivers/cfb_console.c @@ -501,7 +501,7 @@ static void video_drawchars (int xx, int yy, unsigned char *s, int count) static inline void video_drawstring (int xx, int yy, unsigned char *s) { - video_drawchars (xx, yy, s, strlen (s)); + video_drawchars (xx, yy, s, strlen ((char *)s)); } /*****************************************************************************/ @@ -548,12 +548,12 @@ void console_cursor (int state) sprintf (info, " %02d:%02d:%02d ", tm.tm_hour, tm.tm_min, tm.tm_sec); video_drawstring (VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH, - VIDEO_INFO_Y, info); + VIDEO_INFO_Y, (uchar *)info); sprintf (info, "%02d.%02d.%04d", tm.tm_mday, tm.tm_mon, tm.tm_year); video_drawstring (VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH, - VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT, info); + VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT, (uchar *)info); } #endif @@ -779,11 +779,18 @@ int video_display_bitmap (ulong bmp_image, int x, int y) */ len = CFG_VIDEO_LOGO_MAX_SIZE; dst = malloc(CFG_VIDEO_LOGO_MAX_SIZE); + if (dst == NULL) { + printf("Error: malloc in gunzip failed!\n"); + return(1); + } if (gunzip(dst, CFG_VIDEO_LOGO_MAX_SIZE, (uchar *)bmp_image, &len) != 0) { printf ("Error: no valid bmp or bmp.gz image at %lx\n", bmp_image); free(dst); return 1; } + if (len == CFG_VIDEO_LOGO_MAX_SIZE) { + printf("Image could be truncated (increase CFG_VIDEO_LOGO_MAX_SIZE)!\n"); + } /* * Set addr to decompressed image @@ -1112,7 +1119,7 @@ static void *video_logo (void) logo_plot (video_fb_address, VIDEO_COLS, 0, 0); sprintf (info, " %s", &version_string); - video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, info); + video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *)info); #ifdef CONFIG_CONSOLE_EXTRA_INFO { @@ -1123,7 +1130,7 @@ static void *video_logo (void) if (*info) video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + i * VIDEO_FONT_HEIGHT, - info); + (uchar *)info); } } #endif diff --git a/drivers/dc2114x.c b/drivers/dc2114x.c index 5386d92..c43cd5e 100644 --- a/drivers/dc2114x.c +++ b/drivers/dc2114x.c @@ -214,7 +214,7 @@ int dc21x4x_initialize(bd_t *bis) { int idx=0; int card_number = 0; - int cfrv; + unsigned int cfrv; unsigned char timer; pci_dev_t devbusfn; unsigned int iobase; @@ -708,7 +708,7 @@ static int write_srom(struct eth_device *dev, u_long ioaddr, int index, int new_ #ifndef CONFIG_TULIP_FIX_DAVICOM static void read_hw_addr(struct eth_device *dev, bd_t *bis) { - u_short tmp, *p = (short *)(&dev->enetaddr[0]); + u_short tmp, *p = (u_short *)(&dev->enetaddr[0]); int i, j = 0; for (i = 0; i < (ETH_ALEN >> 1); i++) { diff --git a/drivers/e1000.c b/drivers/e1000.c index 787134a..927acbb 100644 --- a/drivers/e1000.c +++ b/drivers/e1000.c @@ -2822,7 +2822,7 @@ e1000_poll(struct eth_device *nic) if (!(le32_to_cpu(rd->status)) & E1000_RXD_STAT_DD) return 0; /*DEBUGOUT("recv: packet len=%d \n", rd->length); */ - NetReceive(packet, le32_to_cpu(rd->length)); + NetReceive((uchar *)packet, le32_to_cpu(rd->length)); fill_rx(hw); return 1; } diff --git a/drivers/natsemi.c b/drivers/natsemi.c index 1c1b9a0..b009db6 100644 --- a/drivers/natsemi.c +++ b/drivers/natsemi.c @@ -756,6 +756,7 @@ natsemi_send(struct eth_device *dev, volatile void *packet, int length) { u32 i, status = 0; u32 tx_status = 0; + vu_long *res = (vu_long *)&tx_status; /* Stop the transmitter */ OUTL(dev, TxOff, ChipCmd); @@ -781,7 +782,7 @@ natsemi_send(struct eth_device *dev, volatile void *packet, int length) OUTL(dev, TxOn, ChipCmd); for (i = 0; - ((vu_long)tx_status = le32_to_cpu(txd.cmdsts)) & DescOwn; + (*res = le32_to_cpu(txd.cmdsts)) & DescOwn; i++) { if (i >= TOUT_LOOP) { printf diff --git a/drivers/ns8382x.c b/drivers/ns8382x.c index be99c3b..976f86a 100644 --- a/drivers/ns8382x.c +++ b/drivers/ns8382x.c @@ -363,7 +363,7 @@ ns8382x_initialize(bd_t * bis) /* get MAC address */ for (i = 0; i < 3; i++) { u32 data; - char *mac = &dev->enetaddr[i * 2]; + char *mac = (char *)&dev->enetaddr[i * 2]; OUTL(dev, i * 2, RxFilterAddr); data = INL(dev, RxFilterData); diff --git a/drivers/pcnet.c b/drivers/pcnet.c index 17e8044..da9ac7f 100644 --- a/drivers/pcnet.c +++ b/drivers/pcnet.c @@ -195,7 +195,7 @@ int pcnet_initialize(bd_t *bis) /* * Setup the PCI device. */ - pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &dev->iobase); + pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, (unsigned int *)&dev->iobase); dev->iobase &= ~0xf; PCNET_DEBUG1("%s: devbusfn=0x%x iobase=0x%x: ", diff --git a/drivers/smiLynxEM.c b/drivers/smiLynxEM.c index a87aaf3..20f9beb 100644 --- a/drivers/smiLynxEM.c +++ b/drivers/smiLynxEM.c @@ -525,7 +525,8 @@ static unsigned int FindPQ (unsigned int freq, unsigned int *pp, unsigned int *p /*****************************************************************************/ static void smiLoadCcr (struct ctfb_res_modes *var, unsigned short device_id) { - unsigned int p, q; + unsigned int p = 0; + unsigned int q = 0; long long freq; register GraphicDevice *pGD = (GraphicDevice *)&smi; diff --git a/drivers/tsec.c b/drivers/tsec.c index ddca901..069a42f 100644 --- a/drivers/tsec.c +++ b/drivers/tsec.c @@ -200,11 +200,11 @@ int tsec_init(struct eth_device* dev, bd_t * bd) for(i=0;i<MAC_ADDR_LEN;i++) { tmpbuf[MAC_ADDR_LEN - 1 - i] = dev->enetaddr[i]; } - (uint)(regs->macstnaddr1) = *((uint *)(tmpbuf)); + regs->macstnaddr1 = *((uint *)(tmpbuf)); tempval = *((uint *)(tmpbuf +4)); - (uint)(regs->macstnaddr2) = tempval; + regs->macstnaddr2 = tempval; /* reset the indices to zero */ rxIdx = 0; |