From: Stefan Weil <weil@mail.berlios.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH v2 02/10] eepro100: Remove type casts which are no longer needed
Date: Sat, 30 Apr 2011 22:40:05 +0200 [thread overview]
Message-ID: <1304196013-14432-3-git-send-email-weil@mail.berlios.de> (raw)
In-Reply-To: <1304196013-14432-1-git-send-email-weil@mail.berlios.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
hw/eepro100.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index cbbaf14..0e22d91 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -311,7 +311,7 @@ static const uint16_t eepro100_mdi_mask[] = {
static void stl_le_phys(target_phys_addr_t addr, uint32_t val)
{
val = cpu_to_le32(val);
- cpu_physical_memory_write(addr, (const uint8_t *)&val, sizeof(val));
+ cpu_physical_memory_write(addr, &val, sizeof(val));
}
#define POLYNOMIAL 0x04c11db6
@@ -694,8 +694,7 @@ static void dump_statistics(EEPRO100State * s)
* values which really matter.
* Number of data should check configuration!!!
*/
- cpu_physical_memory_write(s->statsaddr,
- (uint8_t *) & s->statistics, s->stats_size);
+ cpu_physical_memory_write(s->statsaddr, &s->statistics, s->stats_size);
stl_le_phys(s->statsaddr + 0, s->statistics.tx_good_frames);
stl_le_phys(s->statsaddr + 36, s->statistics.rx_good_frames);
stl_le_phys(s->statsaddr + 48, s->statistics.rx_resource_errors);
@@ -709,7 +708,7 @@ static void dump_statistics(EEPRO100State * s)
static void read_cb(EEPRO100State *s)
{
- cpu_physical_memory_read(s->cb_address, (uint8_t *) &s->tx, sizeof(s->tx));
+ cpu_physical_memory_read(s->cb_address, &s->tx, sizeof(s->tx));
s->tx.status = le16_to_cpu(s->tx.status);
s->tx.command = le16_to_cpu(s->tx.command);
s->tx.link = le32_to_cpu(s->tx.link);
@@ -1268,10 +1267,10 @@ static void eepro100_write_port(EEPRO100State * s, uint32_t val)
case PORT_SELFTEST:
TRACE(OTHER, logout("selftest address=0x%08x\n", address));
eepro100_selftest_t data;
- cpu_physical_memory_read(address, (uint8_t *) & data, sizeof(data));
+ cpu_physical_memory_read(address, &data, sizeof(data));
data.st_sign = 0xffffffff;
data.st_result = 0;
- cpu_physical_memory_write(address, (uint8_t *) & data, sizeof(data));
+ cpu_physical_memory_write(address, &data, sizeof(data));
break;
case PORT_SELECTIVE_RESET:
TRACE(OTHER, logout("selective reset, selftest address=0x%08x\n", address));
@@ -1738,7 +1737,7 @@ static ssize_t nic_receive(VLANClientState *nc, const uint8_t * buf, size_t size
}
/* !!! */
eepro100_rx_t rx;
- cpu_physical_memory_read(s->ru_base + s->ru_offset, (uint8_t *) & rx,
+ cpu_physical_memory_read(s->ru_base + s->ru_offset, &rx,
offsetof(eepro100_rx_t, packet));
uint16_t rfd_command = le16_to_cpu(rx.command);
uint16_t rfd_size = le16_to_cpu(rx.size);
--
1.7.2.5
next prev parent reply other threads:[~2011-04-30 20:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-30 20:40 [Qemu-devel] [PULL v2] eepro100: Update of patch series (fixes and enhancements) Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 01/10] eepro100: Avoid duplicate debug messages Stefan Weil
2011-04-30 20:40 ` Stefan Weil [this message]
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 03/10] eepro100: Remove unused structure element Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 04/10] eepro100: Pad received short frames Stefan Weil
2011-05-05 13:00 ` Michael S. Tsirkin
2011-05-05 16:19 ` Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 05/10] eepro100: Fix endianness issues Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 06/10] eepro100: Support byte/word writes to port address Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 07/10] eepro100: Support byte/word writes to pointer register Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 08/10] eepro100: Support byte/word read/write access to MDI control register Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 09/10] eepro100: Support byte read access to general " Stefan Weil
2011-04-30 20:40 ` [Qemu-devel] [PATCH v2 10/10] eepro100: Support 32 bit read/write access to flash register Stefan Weil
2011-05-05 13:01 ` [Qemu-devel] [PULL v2] eepro100: Update of patch series (fixes and enhancements) Michael S. Tsirkin
2011-05-15 12:48 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1304196013-14432-3-git-send-email-weil@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).