diff mbox series

[RFC] hw/intc: don't use target_ulong for LoongArch ipi

Message ID 20230404132711.2563638-1-alex.bennee@linaro.org
State Superseded
Headers show
Series [RFC] hw/intc: don't use target_ulong for LoongArch ipi | expand

Commit Message

Alex Bennée April 4, 2023, 1:27 p.m. UTC
The calling function is already working with hwaddr and uint64_t so
lets avoid bringing target_ulong in if we don't need to.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 hw/intc/loongarch_ipi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé April 4, 2023, 2:20 p.m. UTC | #1
On 4/4/23 15:27, Alex Bennée wrote:
> The calling function is already working with hwaddr and uint64_t so
> lets avoid bringing target_ulong in if we don't need to.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   hw/intc/loongarch_ipi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
gaosong April 7, 2023, 2:11 a.m. UTC | #2
在 2023/4/4 下午9:27, Alex Bennée 写道:
> The calling function is already working with hwaddr and uint64_t so
> lets avoid bringing target_ulong in if we don't need to.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   hw/intc/loongarch_ipi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Song Gao <gaosong@loongson.cn>

Thanks.
Song Gao
> diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
> index aa4bf9eb74..bdba0f8107 100644
> --- a/hw/intc/loongarch_ipi.c
> +++ b/hw/intc/loongarch_ipi.c
> @@ -50,7 +50,7 @@ static uint64_t loongarch_ipi_readl(void *opaque, hwaddr addr, unsigned size)
>       return ret;
>   }
>   
> -static void send_ipi_data(CPULoongArchState *env, target_ulong val, target_ulong addr)
> +static void send_ipi_data(CPULoongArchState *env, uint64_t val, hwaddr addr)
>   {
>       int i, mask = 0, data = 0;
>
diff mbox series

Patch

diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c
index aa4bf9eb74..bdba0f8107 100644
--- a/hw/intc/loongarch_ipi.c
+++ b/hw/intc/loongarch_ipi.c
@@ -50,7 +50,7 @@  static uint64_t loongarch_ipi_readl(void *opaque, hwaddr addr, unsigned size)
     return ret;
 }
 
-static void send_ipi_data(CPULoongArchState *env, target_ulong val, target_ulong addr)
+static void send_ipi_data(CPULoongArchState *env, uint64_t val, hwaddr addr)
 {
     int i, mask = 0, data = 0;