From 1af1668c95e43b55a23e06efe3720cd95ea02f33 Mon Sep 17 00:00:00 2001 From: Marty Connor Date: Wed, 4 Jul 2007 05:52:56 -0400 Subject: [PATCH] Warnings purge of drivers (continued) --- src/drivers/net/amd8111e.c | 6 +++--- src/drivers/net/bnx2.c | 12 +++++++----- src/drivers/net/bnx2.h | 2 +- src/drivers/net/depca.c | 5 ++++- src/drivers/net/dmfe.c | 2 +- src/drivers/net/eepro.c | 13 +++++++------ src/drivers/net/mtd80x.c | 6 +++--- src/drivers/net/natsemi.c | 13 +++++++------ src/drivers/net/ns83820.c | 5 +++-- src/drivers/net/ns8390.c | 17 +++++++++-------- src/drivers/net/pcnet32.c | 4 ++-- src/drivers/net/r8169.c | 12 +++++++++++- src/drivers/net/sis900.c | 16 ++++++++++------ src/drivers/net/sundance.c | 2 +- src/drivers/net/tlan.c | 12 ++++++------ src/drivers/net/tulip.c | 7 ++++--- src/drivers/net/via-rhine.c | 8 ++++---- src/drivers/net/w89c840.c | 5 +++-- 18 files changed, 86 insertions(+), 61 deletions(-) diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c index 4078ae11..196ee50e 100644 --- a/src/drivers/net/amd8111e.c +++ b/src/drivers/net/amd8111e.c @@ -135,7 +135,6 @@ static void amd8111e_restart(struct amd8111e_priv *lp); static void amd8111e_init_hw_default(struct amd8111e_priv *lp) { unsigned int reg_val; - unsigned int logic_filter[2] = {0,}; void *mmio = lp->mmio; /* stop the chip */ @@ -198,7 +197,8 @@ static void amd8111e_init_hw_default(struct amd8111e_priv *lp) writew(MIB_CLEAR, mmio + MIB_ADDR); /* Clear LARF */ - amd8111e_writeq(*(u64*)logic_filter, mmio + LADRF); + writel( 0, mmio + LADRF); + writel( 0, mmio + LADRF + 4); /* SRAM_SIZE register */ reg_val = readl(mmio + SRAM_SIZE); @@ -342,7 +342,7 @@ static void amd8111e_probe_ext_phy(struct amd8111e_priv *lp) if (lp->ext_phy_id) printf("Found MII PHY ID 0x%08x at address 0x%02x\n", - lp->ext_phy_id, lp->ext_phy_addr); + (unsigned int) lp->ext_phy_id, lp->ext_phy_addr); else printf("Couldn't detect MII PHY, assuming address 0x01\n"); } diff --git a/src/drivers/net/bnx2.c b/src/drivers/net/bnx2.c index 2bc0ea1a..8d4b0176 100644 --- a/src/drivers/net/bnx2.c +++ b/src/drivers/net/bnx2.c @@ -22,12 +22,14 @@ #include "bnx2.h" #include "bnx2_fw.h" +#if 0 /* Dummy defines for error handling */ #define EBUSY 1 #define ENODEV 2 #define EINVAL 3 #define ENOMEM 4 #define EIO 5 +#endif /* The bnx2 seems to be picky about the alignment of the receive buffers * and possibly the status block. @@ -1165,7 +1167,7 @@ bnx2_fw_sync(struct bnx2 *bp, u32 msg_data, int silent) /* If we timed out, inform the firmware that this is the case. */ if ((val & BNX2_FW_MSG_ACK) != (msg_data & BNX2_DRV_MSG_SEQ)) { if (!silent) - printf("fw sync timeout, reset code = %x\n", msg_data); + printf("fw sync timeout, reset code = %x\n", (unsigned int) msg_data); msg_data &= ~BNX2_DRV_MSG_CODE; msg_data |= BNX2_DRV_MSG_CODE_FW_TIMEOUT; @@ -2033,7 +2035,7 @@ static void bnx2_init_rx_ring(struct bnx2 *bp) { struct rx_bd *rxbd; - int i; + unsigned int i; u16 prod, ring_prod; u32 val; @@ -2066,7 +2068,7 @@ bnx2_init_rx_ring(struct bnx2 *bp) val = bp->rx_desc_mapping & 0xffffffff; CTX_WR(bp, GET_CID_ADDR(RX_CID), BNX2_L2CTX_NX_BDHADDR_LO, val); - for (i = 0; i < bp->rx_ring_size; i++) { + for (i = 0; (int) i < bp->rx_ring_size; i++) { rxbd = &bp->rx_desc_ring[RX_RING_IDX(ring_prod)]; rxbd->rx_bd_haddr_hi = 0; rxbd->rx_bd_haddr_lo = virt_to_bus(&bnx2_bss.rx_buf[ring_prod][0]); @@ -2635,8 +2637,8 @@ bnx2_probe(struct nic *nic, struct pci_device *pdev) memcpy(nic->node_addr, bp->mac_addr, ETH_ALEN); printf("Ethernet addr: %s\n", eth_ntoa( nic->node_addr ) ); printf("Broadcom NetXtreme II (%c%d) PCI%s %s %dMHz\n", - ((CHIP_ID(bp) & 0xf000) >> 12) + 'A', - ((CHIP_ID(bp) & 0x0ff0) >> 4), + (int) ((CHIP_ID(bp) & 0xf000) >> 12) + 'A', + (int) ((CHIP_ID(bp) & 0x0ff0) >> 4), ((bp->flags & PCIX_FLAG) ? "-X" : ""), ((bp->flags & PCI_32BIT_FLAG) ? "32-bit" : "64-bit"), bp->bus_speed_mhz); diff --git a/src/drivers/net/bnx2.h b/src/drivers/net/bnx2.h index 855b7151..57d5fee8 100644 --- a/src/drivers/net/bnx2.h +++ b/src/drivers/net/bnx2.h @@ -4091,7 +4091,7 @@ struct flash_spec { u32 page_size; u32 addr_mask; u32 total_size; - u8 *name; + char *name; }; struct bnx2 { diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c index 47e94f0d..fa9671c7 100644 --- a/src/drivers/net/depca.c +++ b/src/drivers/net/depca.c @@ -1,5 +1,6 @@ -#warning "depca.c almost certainly won't work" +#warning "depca.c almost certainly won't work." +#if 0 /* Not fixed for relocation yet. Probably won't work relocated above 16MB */ #ifdef ALLMULTI #error multicast support is not yet implemented @@ -791,3 +792,5 @@ DRIVER ( "depce", nic_driver, isa_driver, depca_driver, depca_probe, depca_disable ); ISA_ROM ( "depca", "Digital DE100 and DE200" ); + +#endif diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c index 7320e903..cc140010 100644 --- a/src/drivers/net/dmfe.c +++ b/src/drivers/net/dmfe.c @@ -1022,7 +1022,7 @@ static u16 phy_read_1bit(unsigned long ioaddr) static void dmfe_parse_srom(struct nic *nic) { - char *srom = db->srom; + unsigned char *srom = db->srom; int dmfe_mode, tmp_reg; /* Init CR15 */ diff --git a/src/drivers/net/eepro.c b/src/drivers/net/eepro.c index 521c720d..2ea4b000 100644 --- a/src/drivers/net/eepro.c +++ b/src/drivers/net/eepro.c @@ -265,11 +265,12 @@ static unsigned eeprom_reg = EEPROM_REG_PRO; #define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(255); /* do a nice reset */ -#define eepro_sel_reset(ioaddr) { \ - outb(SEL_RESET_CMD, ioaddr); \ - SLOW_DOWN; \ - SLOW_DOWN; \ - } +#define eepro_sel_reset(ioaddr) \ + do { \ + outb ( SEL_RESET_CMD, ioaddr ); \ + (void) SLOW_DOWN; \ + (void) SLOW_DOWN; \ + } while (0) /* clear all interrupts */ #define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG) @@ -332,7 +333,7 @@ static void eepro_reset(struct nic *nic) /* Intialise XMT */ outw((XMT_LOWER_LIMIT << 8), nic->ioaddr + xmt_bar); eepro_sel_reset(nic->ioaddr); - tx_start = tx_end = (XMT_LOWER_LIMIT << 8); + tx_start = tx_end = (unsigned int) (XMT_LOWER_LIMIT << 8); tx_last = 0; eepro_en_rx(nic->ioaddr); } diff --git a/src/drivers/net/mtd80x.c b/src/drivers/net/mtd80x.c index d6dc5bcd..5d8987c7 100644 --- a/src/drivers/net/mtd80x.c +++ b/src/drivers/net/mtd80x.c @@ -534,7 +534,7 @@ static int mtd_poll(struct nic *nic, __unused int retrieve) if (rx_status & ErrorSummary) { /* there was a fatal error */ printf( "%s: Receive error, Rx status %8.8x, Error(s) %s%s%s\n", - mtdx.nic_name, rx_status , + mtdx.nic_name, (unsigned int) rx_status, (rx_status & (LONG | RUNT)) ? "length_error ":"", (rx_status & RXER) ? "frame_error ":"", (rx_status & CRC) ? "crc_error ":"" ); @@ -550,7 +550,7 @@ static int mtd_poll(struct nic *nic, __unused int retrieve) short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4; DBG ( " netdev_rx() normal Rx pkt length %d" - " status %x.\n", pkt_len, rx_status ); + " status %x.\n", pkt_len, (unsigned int) rx_status ); nic->packetlen = pkt_len; memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len); @@ -619,7 +619,7 @@ static void mtd_transmit( DBG ( "TX Time Out" ); } else if( tx_status & (CSL | LC | EC | UDF | HF)){ printf( "Transmit error: %8.8x %s %s %s %s %s\n", - tx_status, + (unsigned int) tx_status, tx_status & EC ? "abort" : "", tx_status & CSL ? "carrier" : "", tx_status & LC ? "late" : "", diff --git a/src/drivers/net/natsemi.c b/src/drivers/net/natsemi.c index 8c982c8b..c5b87fcc 100644 --- a/src/drivers/net/natsemi.c +++ b/src/drivers/net/natsemi.c @@ -536,7 +536,8 @@ natsemi_init_rxd(struct nic *nic __unused) rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); if (natsemi_debug > 1) printf("natsemi_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%4.4x\n", - i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); + i, &rxd[i], (unsigned int) rxd[i].link, (unsigned int) rxd[i].cmdsts, + (unsigned int) rxd[i].bufptr); } /* load Receive Descriptor Register */ @@ -648,11 +649,11 @@ natsemi_transmit(struct nic *nic, /* wait */ ; if (currticks() >= to) { - printf("natsemi_transmit: TX Timeout! Tx status %X.\n", tx_status); + printf("natsemi_transmit: TX Timeout! Tx status %X.\n", (unsigned int) tx_status); } if (!(tx_status & 0x08000000)) { - printf("natsemi_transmit: Transmit error, Tx status %X.\n", tx_status); + printf("natsemi_transmit: Transmit error, Tx status %X.\n", (unsigned int) tx_status); } } @@ -677,7 +678,7 @@ natsemi_poll(struct nic *nic, int retrieve) int retstat = 0; if (natsemi_debug > 2) - printf("natsemi_poll: cur_rx:%d, status:%X\n", cur_rx, rx_status); + printf("natsemi_poll: cur_rx:%d, status:%X\n", cur_rx, (unsigned int) rx_status); if (!(rx_status & OWN)) return retstat; @@ -686,14 +687,14 @@ natsemi_poll(struct nic *nic, int retrieve) if (natsemi_debug > 1) printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n", - cur_rx, rx_status); + cur_rx, (unsigned int) rx_status); nic->packetlen = (rx_status & DSIZE) - CRC_SIZE; if ((rx_status & (DescMore|DescPktOK|RxTooLong)) != DescPktOK) { /* corrupted packet received */ printf("natsemi_poll: Corrupted packet received, buffer status = %X\n", - rx_status); + (unsigned int) rx_status); retstat = 0; } else { /* give packet to higher level routine */ diff --git a/src/drivers/net/ns83820.c b/src/drivers/net/ns83820.c index 33358a0d..8b8500f4 100755 --- a/src/drivers/net/ns83820.c +++ b/src/drivers/net/ns83820.c @@ -631,9 +631,10 @@ static void ns83820_run_bist(struct nic *nic __unused, const char *name, } if (status & fail) - printf("%s failed! (0x%hX & 0x%hX)\n", name, status, fail); + printf("%s failed! (0x%hX & 0x%hX)\n", name, (unsigned int) status, + (unsigned int) fail); else if (timed_out) - printf("run_bist %s timed out! (%hX)\n", name, status); + printf("run_bist %s timed out! (%hX)\n", name, (unsigned int) status); dprintf(("done %s in %d loops\n", name, loops)); } diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c index b505ff7a..04212c48 100644 --- a/src/drivers/net/ns8390.c +++ b/src/drivers/net/ns8390.c @@ -449,11 +449,11 @@ static void ns8390_transmit( /* Programmed I/O */ unsigned short type; type = (t >> 8) | (t << 8); - eth_pio_write(d, eth_tx_start<<8, ETH_ALEN); + eth_pio_write( (unsigned char *) d, eth_tx_start<<8, ETH_ALEN); eth_pio_write(nic->node_addr, (eth_tx_start<<8)+ETH_ALEN, ETH_ALEN); /* bcc generates worse code without (const+const) below */ eth_pio_write((unsigned char *)&type, (eth_tx_start<<8)+(ETH_ALEN+ETH_ALEN), 2); - eth_pio_write(p, (eth_tx_start<<8)+ETH_HLEN, s); + eth_pio_write( (unsigned char *) p, (eth_tx_start<<8)+ETH_HLEN, s); s += ETH_HLEN; if (s < ETH_ZLEN) s = ETH_ZLEN; } @@ -533,7 +533,7 @@ static int ns8390_poll(struct nic *nic, int retrieve) #endif pktoff = next << 8; if (eth_flags & FLAG_PIO) - eth_pio_read(pktoff, (char *)&pkthdr, 4); + eth_pio_read(pktoff, (unsigned char *)&pkthdr, 4); else memcpy(&pkthdr, bus_to_virt(eth_rmem + pktoff), 4); pktoff += sizeof(pkthdr); @@ -876,9 +876,10 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) ******************************************************************/ unsigned char c; if (eth_vendor == VENDOR_NONE) { - char romdata[16], testbuf[32]; + unsigned char romdata[16]; + unsigned char testbuf[32]; int idx; - static char test[] = "NE*000 memory"; + static unsigned char test[] = "NE*000 memory"; static unsigned short base[] = { #ifdef NE_SCAN NE_SCAN, @@ -896,7 +897,7 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) eth_rx_start = 32 + D8390_TXBUF_SIZE; c = inb(eth_asic_base + NE_RESET); outb(c, eth_asic_base + NE_RESET); - inb(0x84); + (void) inb(0x84); outb(D8390_COMMAND_STP | D8390_COMMAND_RD2, eth_nic_base + D8390_P0_COMMAND); outb(D8390_RCR_MON, eth_nic_base + D8390_P0_RCR); @@ -907,7 +908,7 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) eth_flags |= FLAG_16BIT; /* force 16-bit mode */ #endif - eth_pio_write(test, 8192, sizeof(test)); + eth_pio_write( (unsigned char *) test, 8192, sizeof(test)); eth_pio_read(8192, testbuf, sizeof(test)); if (!memcmp(test, testbuf, sizeof(test))) break; @@ -919,7 +920,7 @@ static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) D8390_DCR_FT1 | D8390_DCR_LS, eth_nic_base + D8390_P0_DCR); outb(MEM_16384, eth_nic_base + D8390_P0_PSTART); outb(MEM_32768, eth_nic_base + D8390_P0_PSTOP); - eth_pio_write(test, 16384, sizeof(test)); + eth_pio_write( (unsigned char *) test, 16384, sizeof(test)); eth_pio_read(16384, testbuf, sizeof(test)); if (!memcmp(testbuf, test, sizeof(test))) break; diff --git a/src/drivers/net/pcnet32.c b/src/drivers/net/pcnet32.c index 8997603d..0328cf2c 100644 --- a/src/drivers/net/pcnet32.c +++ b/src/drivers/net/pcnet32.c @@ -787,7 +787,7 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) { ltint = 1; } - DBG ( "%s at %hX,", chipname, ioaddr ); + DBG ( "%s at %hX,", chipname, (unsigned int) ioaddr ); /* read PROM address */ for (i = 0; i < 6; i++) @@ -799,7 +799,7 @@ static int pcnet32_probe ( struct nic *nic, struct pci_device *pci ) { } /* Print out some hardware info */ - DBG ( "%s: IO Addr 0x%hX, MAC Addr %s\n ", chipname, ioaddr, + DBG ( "%s: IO Addr 0x%hX, MAC Addr %s\n ", chipname, (unsigned int) ioaddr, eth_ntoa ( nic->node_addr ) ); /* Set to pci bus master */ diff --git a/src/drivers/net/r8169.c b/src/drivers/net/r8169.c index c806ccdc..d9854e9c 100644 --- a/src/drivers/net/r8169.c +++ b/src/drivers/net/r8169.c @@ -74,12 +74,22 @@ static u32 ioaddr; #ifdef RTL8169_DEBUG + +#if 0 #define assert(expr) \ if(!(expr)) { printk( "Assertion failed! %s,%s,%s,line=%d\n", #expr,__FILE__,__FUNCTION__,__LINE__); } +#endif + #define DBG_PRINTF( fmt, args...) printk("r8169: " fmt, ## args); + #else + +#if 0 #define assert(expr) do {} while (0) +#endif + #define DBG_PRINTF( fmt, args...) ; + #endif // end of #ifdef RTL8169_DEBUG /* media options @@ -904,7 +914,7 @@ static int r8169_probe ( struct nic *nic, struct pci_device *pci ) { /* Print out some hardware info */ DBG ( "%s: %s at IOAddr %#hX, ", pci->driver_name, eth_ntoa ( nic->node_addr ), - ioaddr ); + (unsigned int) ioaddr ); /* Config PHY */ rtl8169_hw_PHY_config(nic); diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c index a891ad40..7e15f6d0 100644 --- a/src/drivers/net/sis900.c +++ b/src/drivers/net/sis900.c @@ -751,7 +751,8 @@ sis900_init_rxd(struct nic *nic __unused) rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); if (sis900_debug > 0) printf("sis900_init_rxd: rxd[%d]=%p link=%X cmdsts=%X bufptr=%X\n", - i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); + i, &rxd[i], (unsigned int) rxd[i].link, (unsigned int) rxd[i].cmdsts, + (unsigned int) rxd[i].bufptr); } /* load Receive Descriptor Register */ @@ -1146,12 +1147,14 @@ sis900_transmit(struct nic *nic, /* wait */ ; if (currticks() >= to) { - printf("sis900_transmit: TX Timeout! Tx status %X.\n", tx_status); + printf("sis900_transmit: TX Timeout! Tx status %X.\n", + (unsigned int) tx_status); } if (tx_status & (ABORT | UNDERRUN | OWCOLL)) { /* packet unsuccessfully transmited */ - printf("sis900_transmit: Transmit error, Tx status %X.\n", tx_status); + printf("sis900_transmit: Transmit error, Tx status %X.\n", + (unsigned int) tx_status); } /* Disable interrupts by clearing the interrupt mask. */ outl(0, ioaddr + imr); @@ -1179,14 +1182,15 @@ sis900_poll(struct nic *nic, int retrieve) int retstat = 0; if (sis900_debug > 2) - printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx, rx_status); + printf("sis900_poll: cur_rx:%d, status:%X\n", cur_rx, + (unsigned int) rx_status); if (!(rx_status & OWN)) return retstat; if (sis900_debug > 1) printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n", - cur_rx, rx_status); + cur_rx, (unsigned int) rx_status); if ( ! retrieve ) return 1; @@ -1195,7 +1199,7 @@ sis900_poll(struct nic *nic, int retrieve) if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { /* corrupted packet received */ printf("sis900_poll: Corrupted packet received, buffer status = %X\n", - rx_status); + (unsigned int) rx_status); retstat = 0; } else { /* give packet to higher level routine */ diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c index 99ba611d..32c9453e 100644 --- a/src/drivers/net/sundance.c +++ b/src/drivers/net/sundance.c @@ -611,7 +611,7 @@ static int sundance_probe ( struct nic *nic, struct pci_device *pci ) { DBG ( "Device revision id: %hx\n", sdc->pci_rev_id ); /* Print out some hardware info */ - DBG ( "%s: %s at ioaddr %hX, ", pci->driver_name, nic->node_addr, BASE); + DBG ( "%s: %s at ioaddr %hX, ", pci->driver_name, nic->node_addr, (unsigned int) BASE); sdc->mii_preamble_required = 0; if (1) { diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c index 10593208..dd374cdf 100644 --- a/src/drivers/net/tlan.c +++ b/src/drivers/net/tlan.c @@ -70,7 +70,7 @@ static void TLan_PhyPowerDown(struct nic *nic); static void TLan_PhyPowerUp(struct nic *nic); -static void TLan_SetMac(struct nic *nic __unused, int areg, char *mac); +static void TLan_SetMac(struct nic *nic __unused, int areg, unsigned char *mac); static void TLan_PhyReset(struct nic *nic); static void TLan_PhyStartLink(struct nic *nic); @@ -515,7 +515,7 @@ static int tlan_poll(struct nic *nic, int retrieve) nic->packetlen = framesize; - DBG ( ".%d.", framesize ); + DBG ( ".%d.", (unsigned int) framesize ); memcpy(nic->packet, rxb + (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen); @@ -591,7 +591,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ if (tail_list->cStat != TLAN_CSTAT_UNUSED) { printf("TRANSMIT: %s is busy (Head=%p Tail=%x)\n", - priv->nic_name, priv->txList, priv->txTail); + priv->nic_name, priv->txList, (unsigned int) priv->txTail); tx_ring[entry].cStat = TLAN_CSTAT_UNUSED; // priv->txBusyCount++; return; @@ -1300,7 +1300,7 @@ void TLan_MiiWriteReg(struct nic *nic __unused, u16 phy, u16 reg, u16 val) * **************************************************************/ -void TLan_SetMac(struct nic *nic __unused, int areg, char *mac) +void TLan_SetMac(struct nic *nic __unused, int areg, unsigned char *mac) { int i; @@ -1361,8 +1361,8 @@ void TLan_PhyDetect(struct nic *nic) TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &lo); if ((control != 0xFFFF) || (hi != 0xFFFF) || (lo != 0xFFFF)) { - printf("PHY found at %hX %hX %hX %hX\n", phy, - control, hi, lo); + printf("PHY found at %hX %hX %hX %hX\n", + (unsigned int) phy, control, hi, lo); if ((priv->phy[1] == TLAN_PHY_NONE) && (phy != TLAN_PHY_MAX_ADDR)) { priv->phy[1] = phy; diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c index 90de7a71..4222e0ba 100644 --- a/src/drivers/net/tulip.c +++ b/src/drivers/net/tulip.c @@ -1317,14 +1317,14 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { if (inl(ioaddr + CSR5) == 0xFFFFFFFF) { printf("%s: The Tulip chip at %X is not functioning.\n", - tp->nic_name, ioaddr); + tp->nic_name, (unsigned int) ioaddr); return 0; } pci_read_config_byte(pci, PCI_REVISION, &chip_rev); printf("%s: [chip: %s] rev %d at %hX\n", tp->nic_name, - tulip_tbl[chip_idx].chip_name, chip_rev, ioaddr); + tulip_tbl[chip_idx].chip_name, chip_rev, (unsigned int) ioaddr); printf("%s: Vendor=%hX Device=%hX", tp->nic_name, tp->vendor_id, tp->dev_id); if (chip_idx == DC21041 && inl(ioaddr + CSR9) & 0x8000) { @@ -1404,7 +1404,8 @@ static int tulip_probe ( struct nic *nic, struct pci_device *pci ) { for (i = 0; i < ETH_ALEN; i++) last_phys_addr[i] = nic->node_addr[i]; - DBG ( "%s: %s at ioaddr %hX\n", tp->nic_name, eth_ntoa ( nic->node_addr ), ioaddr ); + DBG ( "%s: %s at ioaddr %hX\n", tp->nic_name, eth_ntoa ( nic->node_addr ), + (unsigned int) ioaddr ); tp->chip_id = chip_idx; tp->revision = chip_rev; diff --git a/src/drivers/net/via-rhine.c b/src/drivers/net/via-rhine.c index a1d58768..b96825e6 100644 --- a/src/drivers/net/via-rhine.c +++ b/src/drivers/net/via-rhine.c @@ -890,10 +890,10 @@ MIIDelay (void) int i; for (i = 0; i < 0x7fff; i++) { - inb (0x61); - inb (0x61); - inb (0x61); - inb (0x61); + ( void ) inb (0x61); + ( void ) inb (0x61); + ( void ) inb (0x61); + ( void ) inb (0x61); } } diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c index 9e362264..cb40e447 100644 --- a/src/drivers/net/w89c840.c +++ b/src/drivers/net/w89c840.c @@ -408,7 +408,7 @@ static int w89c840_poll(struct nic *nic, int retrieve) if ((status & 0xffff) != 0x7fff) { printf("winbond-840 : Oversized Ethernet frame spanned " "multiple buffers, entry %d status %X !\n", - w840private.cur_rx, status); + w840private.cur_rx, (unsigned int) status); } } else if (status & 0x8000) { /* There was a fatal error. */ @@ -568,7 +568,8 @@ static void w89c840_transmit( /* Transmit timed out... */ - printf("winbond-840 : transmission TIMEOUT : status %X\n", w840private.tx_ring[entry].status); + printf("winbond-840 : transmission TIMEOUT : status %X\n", + (unsigned int) w840private.tx_ring[entry].status); return; } -- 2.11.4.GIT