From 1f25c77783626191fc498c1b2ca367dfe17022ab Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Sun, 9 Oct 2011 15:37:53 +0000 Subject: =?UTF-8?q?2011-10-09=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libchip/network/greth.c, libchip/network/open_eth.c libchip/network/sonic.c: Eliminate evil typecasts. * libchip/network/greth.h, libchip/network/open_eth.h, libchip/network/sonic.h: Use void* for addresses. --- c/src/ChangeLog | 7 +++++++ c/src/libchip/network/greth.c | 2 +- c/src/libchip/network/greth.h | 2 +- c/src/libchip/network/open_eth.c | 2 +- c/src/libchip/network/open_eth.h | 2 +- c/src/libchip/network/sonic.c | 2 +- c/src/libchip/network/sonic.h | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) (limited to 'c') diff --git a/c/src/ChangeLog b/c/src/ChangeLog index 2c0694913a..a3f2820f2b 100644 --- a/c/src/ChangeLog +++ b/c/src/ChangeLog @@ -1,3 +1,10 @@ +2011-10-09 Ralf Corsépius + + * libchip/network/greth.c, libchip/network/open_eth.c + libchip/network/sonic.c: Eliminate evil typecasts. + * libchip/network/greth.h, libchip/network/open_eth.h, + libchip/network/sonic.h: Use void* for addresses. + 2011-08-30 Sebastian Huber * libchip/network/smc91111exp.h, libchip/network/smc91111.c: Use diff --git a/c/src/libchip/network/greth.c b/c/src/libchip/network/greth.c index 2ca00e92ff..e50c6421cb 100644 --- a/c/src/libchip/network/greth.c +++ b/c/src/libchip/network/greth.c @@ -968,7 +968,7 @@ rtems_greth_driver_attach (struct rtems_bsdnet_ifconfig *config, mtu = ETHERMTU; sc->acceptBroadcast = !config->ignore_broadcast; - sc->regs = (void *) chip->base_address; + sc->regs = chip->base_address; sc->vector = chip->vector; sc->txbufs = chip->txd_count; sc->rxbufs = chip->rxd_count; diff --git a/c/src/libchip/network/greth.h b/c/src/libchip/network/greth.h index 1b4f0d4008..50ddd9991f 100644 --- a/c/src/libchip/network/greth.h +++ b/c/src/libchip/network/greth.h @@ -17,7 +17,7 @@ /* Configuration Information */ typedef struct { - uint32_t base_address; + void *base_address; uint32_t vector; uint32_t txd_count; uint32_t rxd_count; diff --git a/c/src/libchip/network/open_eth.c b/c/src/libchip/network/open_eth.c index 0c132d0d09..86f7e6289b 100644 --- a/c/src/libchip/network/open_eth.c +++ b/c/src/libchip/network/open_eth.c @@ -734,7 +734,7 @@ rtems_open_eth_driver_attach (struct rtems_bsdnet_ifconfig *config, mtu = ETHERMTU; sc->acceptBroadcast = !config->ignore_broadcast; - sc->regs = (void *) chip->base_address; + sc->regs = chip->base_address; sc->vector = chip->vector; sc->txbufs = chip->txd_count; sc->rxbufs = chip->rxd_count; diff --git a/c/src/libchip/network/open_eth.h b/c/src/libchip/network/open_eth.h index 2af8cfa784..66a5204230 100644 --- a/c/src/libchip/network/open_eth.h +++ b/c/src/libchip/network/open_eth.h @@ -8,7 +8,7 @@ /* Configuration Information */ typedef struct { - uint32_t base_address; + void *base_address; uint32_t vector; uint32_t txd_count; uint32_t rxd_count; diff --git a/c/src/libchip/network/sonic.c b/c/src/libchip/network/sonic.c index 378409a4ce..ce7c11168c 100644 --- a/c/src/libchip/network/sonic.c +++ b/c/src/libchip/network/sonic.c @@ -1590,7 +1590,7 @@ rtems_sonic_driver_attach ( sc->tdaCount = chip->tda_count; sc->acceptBroadcast = !config->ignore_broadcast; - sc->sonic = (void *) chip->base_address; + sc->sonic = chip->base_address; sc->vector = chip->vector; sc->dcr_value = chip->dcr_value; sc->dc2_value = chip->dc2_value; diff --git a/c/src/libchip/network/sonic.h b/c/src/libchip/network/sonic.h index 6a4b98f22c..c3faf73f28 100644 --- a/c/src/libchip/network/sonic.h +++ b/c/src/libchip/network/sonic.h @@ -81,7 +81,7 @@ typedef uint32_t (*sonic_read_register_t)( ); typedef struct { - uint32_t base_address; + void *base_address; uint32_t vector; uint32_t dcr_value; uint32_t dc2_value; -- cgit v1.2.3