|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 08/20] Remove unnecessary cast when using the address_space API
On Thu, 20 Feb 2020 14:05:36 +0100
Philippe Mathieu-Daudé <philmd@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxxx>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
> ---
> scripts/coccinelle/exec_rw_const.cocci | 15 +++++++++++++-
> target/i386/hvf/vmx.h | 2 +-
> hw/arm/boot.c | 6 ++----
> hw/dma/rc4030.c | 4 ++--
> hw/dma/xlnx-zdma.c | 2 +-
> hw/net/cadence_gem.c | 21 +++++++++----------
> hw/net/dp8393x.c | 28 +++++++++++++-------------
> hw/s390x/css.c | 4 ++--
> qtest.c | 12 +++++------
> target/i386/hvf/x86_mmu.c | 2 +-
> target/i386/whpx-all.c | 2 +-
> target/s390x/mmu_helper.c | 2 +-
> 12 files changed, 54 insertions(+), 46 deletions(-)
>
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 844caab408..f27f8c45a5 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -875,7 +875,7 @@ static inline int ida_read_next_idaw(CcwDataStream *cds)
> return -EINVAL; /* channel program check */
> }
> ret = address_space_rw(&address_space_memory, idaw_addr,
> - MEMTXATTRS_UNSPECIFIED, (void *) &idaw.fmt2,
> + MEMTXATTRS_UNSPECIFIED, &idaw.fmt2,
> sizeof(idaw.fmt2), false);
> cds->cda = be64_to_cpu(idaw.fmt2);
> } else {
> @@ -884,7 +884,7 @@ static inline int ida_read_next_idaw(CcwDataStream *cds)
> return -EINVAL; /* channel program check */
> }
> ret = address_space_rw(&address_space_memory, idaw_addr,
> - MEMTXATTRS_UNSPECIFIED, (void *) &idaw.fmt1,
> + MEMTXATTRS_UNSPECIFIED, &idaw.fmt1,
> sizeof(idaw.fmt1), false);
> cds->cda = be64_to_cpu(idaw.fmt1);
> if (cds->cda & 0x80000000) {
> diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c
> index c9f3f34750..0be2f300bb 100644
> --- a/target/s390x/mmu_helper.c
> +++ b/target/s390x/mmu_helper.c
> @@ -106,7 +106,7 @@ static inline bool read_table_entry(CPUS390XState *env,
> hwaddr gaddr,
> * We treat them as absolute addresses and don't wrap them.
> */
> if (unlikely(address_space_read(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED,
> - (uint8_t *)entry, sizeof(*entry)) !=
> + entry, sizeof(*entry)) !=
> MEMTX_OK)) {
> return false;
> }
s390 parts
Acked-by: Cornelia Huck <cohuck@xxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |