aboutsummaryrefslogtreecommitdiff
path: root/hw/arm
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-19 20:28:22 +0100
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-20 14:47:08 +0100
commitb7cbebf2b9d7aa8854cfd6a45484e160244e9f48 (patch)
treebc79526f8e8936820d3a52fdef813a18221fb2c4 /hw/arm
parent4ef044cb148a5238161310f06bc581aeed70059f (diff)
downloadqemu-b7cbebf2b9d7aa8854cfd6a45484e160244e9f48.zip
qemu-b7cbebf2b9d7aa8854cfd6a45484e160244e9f48.tar.gz
qemu-b7cbebf2b9d7aa8854cfd6a45484e160244e9f48.tar.bz2
Remove unnecessary cast when using the address_space API
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Two lines in hw/net/dp8393x.c that Coccinelle produced that were over 80 characters were re-wrapped by hand. Suggested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'hw/arm')
-rw-r--r--hw/arm/boot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index 0c213ca..fef4072 100644
--- a/hw/arm/boot.c
+++ b/hw/arm/boot.c
@@ -327,8 +327,7 @@ static void set_kernel_args(const struct arm_boot_info *info, AddressSpace *as)
cmdline_size = strlen(info->kernel_cmdline);
address_space_write(as, p + 8, MEMTXATTRS_UNSPECIFIED,
- (const uint8_t *)info->kernel_cmdline,
- cmdline_size + 1);
+ info->kernel_cmdline, cmdline_size + 1);
cmdline_size = (cmdline_size >> 2) + 1;
WRITE_WORD(p, cmdline_size + 2);
WRITE_WORD(p, 0x54410009);
@@ -420,8 +419,7 @@ static void set_kernel_args_old(const struct arm_boot_info *info,
}
s = info->kernel_cmdline;
if (s) {
- address_space_write(as, p, MEMTXATTRS_UNSPECIFIED,
- (const uint8_t *)s, strlen(s) + 1);
+ address_space_write(as, p, MEMTXATTRS_UNSPECIFIED, s, strlen(s) + 1);
} else {
WRITE_WORD(p, 0);
}