[U-Boot] [PATCH] arch/powerpc/cpu/mpc8220/fec.c: Fix compile warning

Fix this: fec.c: In function 'mpc8220_fec_recv': fec.c:791:9: warning: passing argument 1 of 'NetReceive' discards qualifiers from pointer target type include/net.h:438:13: note: expected 'uchar *' but argument is of type 'volatile uchar *' fec.c: In function 'mpc8220_fec_initialize': fec.c:839:12: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- arch/powerpc/cpu/mpc8220/fec.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8220/fec.c b/arch/powerpc/cpu/mpc8220/fec.c index 2053fea..aaf9be1 100644 --- a/arch/powerpc/cpu/mpc8220/fec.c +++ b/arch/powerpc/cpu/mpc8220/fec.c @@ -624,7 +624,7 @@ static void rfifo_print (char *devname, mpc8220_fec_priv * fec)
/********************************************************************/
-static int mpc8220_fec_send (struct eth_device *dev, volatile void *eth_data, +static int mpc8220_fec_send(struct eth_device *dev, void *eth_data, int data_length) { /* @@ -787,8 +787,7 @@ static int mpc8220_fec_recv (struct eth_device *dev) */ /* memcpy(buff, frame->head, 14); memcpy(buff + 14, frame->data, frame_length);*/ - NetReceive ((volatile uchar *) pRbd->dataPointer, - frame_length); + NetReceive((uchar *)pRbd->dataPointer, frame_length); len = frame_length; } /*

Fix this: ether_fcc.c: In function 'fec_initialize': ether_fcc.c:390:15: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- arch/powerpc/cpu/mpc8260/ether_fcc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8260/ether_fcc.c b/arch/powerpc/cpu/mpc8260/ether_fcc.c index 879ec0e..eed0a4b 100644 --- a/arch/powerpc/cpu/mpc8260/ether_fcc.c +++ b/arch/powerpc/cpu/mpc8260/ether_fcc.c @@ -142,7 +142,7 @@ static RTXBD rtx __attribute__ ((aligned(8))); #error "rtx must be 64-bit aligned" #endif
-static int fec_send(struct eth_device* dev, volatile void *packet, int length) +static int fec_send(struct eth_device *dev, void *packet, int length) { int i; int result = 0;

Fix this: ether_fcc.c: In function 'fec_initialize': ether_fcc.c:453:15: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- arch/powerpc/cpu/mpc85xx/ether_fcc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/cpu/mpc85xx/ether_fcc.c b/arch/powerpc/cpu/mpc85xx/ether_fcc.c index 41c3c84..7d372aa 100644 --- a/arch/powerpc/cpu/mpc85xx/ether_fcc.c +++ b/arch/powerpc/cpu/mpc85xx/ether_fcc.c @@ -138,7 +138,7 @@ static RTXBD rtx __attribute__ ((aligned(8)));
#undef ET_DEBUG
-static int fec_send(struct eth_device* dev, volatile void *packet, int length) +static int fec_send(struct eth_device *dev, void *packet, int length) { int i = 0; int result = 0;

Fix this: cpci405.c: In function 'do_get_bpip': cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 3 has type 'IPaddr_t' cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 4 has type 'IPaddr_t' cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 5 has type 'IPaddr_t' cpci405.c:737:4: warning: format '%ld' expects type 'long int', but argument 6 has type 'IPaddr_t' cpci405.c:700:8: warning: unused variable 'bd'
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- board/esd/cpci405/cpci405.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c index 1441b10..fb08245 100644 --- a/board/esd/cpci405/cpci405.c +++ b/board/esd/cpci405/cpci405.c @@ -697,7 +697,6 @@ U_BOOT_CMD( */ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { - bd_t *bd = gd->bd; char *buf; ulong crc; char str[32]; @@ -730,11 +729,7 @@ int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) /* * Update whole ip-addr */ - sprintf(str, "%ld.%ld.%ld.%ld", - (ipaddr & 0xff000000) >> 24, - (ipaddr & 0x00ff0000) >> 16, - (ipaddr & 0x0000ff00) >> 8, - (ipaddr & 0x000000ff)); + sprintf(str, "%pI4", &ipaddr); setenv("ipaddr", str); printf("Updated ip_addr from bp_eeprom to %s!\n", str); }

Fix this: e1000.c: In function 'e1000_initialize': e1000.c:5264:13: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/e1000.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index e726f39..94b2a41 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -5031,10 +5031,9 @@ e1000_poll(struct eth_device *nic) /************************************************************************** TRANSMIT - Transmit a frame ***************************************************************************/ -static int -e1000_transmit(struct eth_device *nic, volatile void *packet, int length) +static int e1000_transmit(struct eth_device *nic, void *packet, int length) { - void * nv_packet = (void *)packet; + void *nv_packet = (void *)packet; struct e1000_hw *hw = nic->priv; struct e1000_tx_desc *txp; int i = 0;

Fix this: eth.c: In function 'fm_eth_initialize': eth.c:651:12: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/fm/eth.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/fm/eth.c b/drivers/net/fm/eth.c index f7ed850..f34f4db 100644 --- a/drivers/net/fm/eth.c +++ b/drivers/net/fm/eth.c @@ -420,7 +420,7 @@ static void fm_eth_halt(struct eth_device *dev) phy_shutdown(fm_eth->phydev); }
-static int fm_eth_send(struct eth_device *dev, volatile void *buf, int len) +static int fm_eth_send(struct eth_device *dev, void *buf, int len) { struct fm_eth *fm_eth; struct fm_port_global_pram *pram;

Fix this: natsemi.c: In function 'natsemi_initialize': natsemi.c:338:13: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/natsemi.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 9386adf..04743bd 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c @@ -237,8 +237,7 @@ static void natsemi_init_txd(struct eth_device *dev); static void natsemi_init_rxd(struct eth_device *dev); static void natsemi_set_rx_mode(struct eth_device *dev); static void natsemi_check_duplex(struct eth_device *dev); -static int natsemi_send(struct eth_device *dev, volatile void *packet, - int length); +static int natsemi_send(struct eth_device *dev, void *packet, int length); static int natsemi_poll(struct eth_device *dev); static void natsemi_disable(struct eth_device *dev);
@@ -754,8 +753,7 @@ natsemi_check_duplex(struct eth_device *dev) * Description: transmits a packet and waits for completion or timeout. * * Returns: void. */ -static int -natsemi_send(struct eth_device *dev, volatile void *packet, int length) +static int natsemi_send(struct eth_device *dev, void *packet, int length) { u32 i, status = 0; u32 tx_status = 0;

Fix this: ns8382x.c: In function 'ns8382x_initialize': ns8382x.c:352:13: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/ns8382x.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ns8382x.c b/drivers/net/ns8382x.c index 11863fe..cfe1f34 100644 --- a/drivers/net/ns8382x.c +++ b/drivers/net/ns8382x.c @@ -258,8 +258,7 @@ static void ns8382x_init_txd(struct eth_device *dev); static void ns8382x_init_rxd(struct eth_device *dev); static void ns8382x_set_rx_mode(struct eth_device *dev); static void ns8382x_check_duplex(struct eth_device *dev); -static int ns8382x_send(struct eth_device *dev, volatile void *packet, - int length); +static int ns8382x_send(struct eth_device *dev, void *packet, int length); static int ns8382x_poll(struct eth_device *dev); static void ns8382x_disable(struct eth_device *dev);
@@ -735,8 +734,7 @@ ns8382x_check_duplex(struct eth_device *dev) /* Function: ns8382x_send * Description: transmits a packet and waits for completion or timeout. * Returns: void. */ -static int -ns8382x_send(struct eth_device *dev, volatile void *packet, int length) +static int ns8382x_send(struct eth_device *dev, void *packet, int length) { u32 i, status = 0; vu_long tx_stat = 0;

Fix this: rtl8139.c: In function 'rtl8139_initialize': rtl8139.c:234:13: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/rtl8139.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/rtl8139.c b/drivers/net/rtl8139.c index e3feef8..4186699 100644 --- a/drivers/net/rtl8139.c +++ b/drivers/net/rtl8139.c @@ -184,7 +184,7 @@ static unsigned char rx_ring[RX_BUF_LEN+16] __attribute__((aligned(4))); static int rtl8139_probe(struct eth_device *dev, bd_t *bis); static int read_eeprom(int location, int addr_len); static void rtl_reset(struct eth_device *dev); -static int rtl_transmit(struct eth_device *dev, volatile void *packet, int length); +static int rtl_transmit(struct eth_device *dev, void *packet, int length); static int rtl_poll(struct eth_device *dev); static void rtl_disable(struct eth_device *dev); #ifdef CONFIG_MCAST_TFTP/* This driver already accepts all b/mcast */ @@ -407,7 +407,7 @@ static void rtl_reset(struct eth_device *dev) outw(0, ioaddr + IntrMask); }
-static int rtl_transmit(struct eth_device *dev, volatile void *packet, int length) +static int rtl_transmit(struct eth_device *dev, void *packet, int length) { unsigned int status; unsigned long txstatus;

Fix this: tsi108_eth.c: In function 'tsi108_eth_initialize': tsi108_eth.c:745:13: warning: assignment from incompatible pointer type tsi108_eth.c: In function 'tsi108_eth_recv': tsi108_eth.c:989:4: warning: passing argument 1 of 'NetReceive' discards qualifiers from pointer target type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/tsi108_eth.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index f100ec1..b2c1be5 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c @@ -433,8 +433,7 @@ static struct dma_descriptor rx_descr_array[NUM_RX_DESC] static struct dma_descriptor *rx_descr_current;
static int tsi108_eth_probe (struct eth_device *dev, bd_t * bis); -static int tsi108_eth_send (struct eth_device *dev, - volatile void *packet, int length); +static int tsi108_eth_send(struct eth_device *dev, void *packet, int length); static int tsi108_eth_recv (struct eth_device *dev); static void tsi108_eth_halt (struct eth_device *dev); static unsigned int read_phy (unsigned int base, @@ -872,8 +871,7 @@ static int tsi108_eth_probe (struct eth_device *dev, bd_t * bis) /* * send a packet */ -static int tsi108_eth_send (struct eth_device *dev, - volatile void *packet, int length) +static int tsi108_eth_send(struct eth_device *dev, void *packet, int length) { unsigned long base; int timeout; @@ -948,7 +946,7 @@ static int tsi108_eth_recv (struct eth_device *dev) unsigned long base; int length = 0; unsigned long status; - volatile uchar *buffer; + uchar *buffer;
base = dev->iobase;
@@ -983,10 +981,8 @@ static int tsi108_eth_recv (struct eth_device *dev) le32_to_cpu(rx_descr->vlan_byte_count) & 0xFFFF;
/*** process packet ***/ - buffer = - (volatile uchar - *)(le32_to_cpu (rx_descr->start_addr0)); - NetReceive (buffer, length); + buffer = (uchar *)(le32_to_cpu(rx_descr->start_addr0)); + NetReceive(buffer, length);
invalidate_dcache_range ((unsigned long)buffer, (unsigned long)buffer +

Fix this: uli526x.c: In function 'uli526x_initialize': uli526x.c:243:13: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/net/uli526x.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/uli526x.c b/drivers/net/uli526x.c index 5933bdd..9648901 100644 --- a/drivers/net/uli526x.c +++ b/drivers/net/uli526x.c @@ -168,8 +168,7 @@ static char buf_pool[TX_BUF_ALLOC * TX_DESC_CNT + 4]; static int mode = 8;
/* function declaration -- */ -static int uli526x_start_xmit(struct eth_device *dev, - volatile void *packet, int length); +static int uli526x_start_xmit(struct eth_device *dev, void *packet, int length); static const struct ethtool_ops netdev_ethtool_ops; static u16 read_srom_word(long, int); static void uli526x_descriptor_init(struct uli526x_board_info *, unsigned long); @@ -443,8 +442,7 @@ static void uli526x_init(struct eth_device *dev) * Send a packet to media from the upper layer. */
-static int uli526x_start_xmit(struct eth_device *dev, - volatile void *packet, int length) +static int uli526x_start_xmit(struct eth_device *dev, void *packet, int length) { struct uli526x_board_info *db = dev->priv; struct tx_desc *txptr;

Fix this: uec.c: In function 'uec_initialize': uec.c:1404:12: warning: assignment from incompatible pointer type
Signed-off-by: Joe Hershberger joe.hershberger@ni.com --- drivers/qe/uec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/qe/uec.c b/drivers/qe/uec.c index 3e46e35..216c898 100644 --- a/drivers/qe/uec.c +++ b/drivers/qe/uec.c @@ -1288,7 +1288,7 @@ static void uec_halt(struct eth_device* dev) uec_stop(uec, COMM_DIR_RX_AND_TX); }
-static int uec_send(struct eth_device* dev, volatile void *buf, int len) +static int uec_send(struct eth_device *dev, void *buf, int len) { uec_private_t *uec; ucc_fast_private_t *uccf;
participants (1)
-
Joe Hershberger