[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.1 1/3] target: Remove unnecessary CPU() cast
From: |
Cédric Le Goater |
Subject: |
Re: [PATCH-for-5.1 1/3] target: Remove unnecessary CPU() cast |
Date: |
Wed, 15 Apr 2020 09:48:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 4/12/20 11:09 PM, Philippe Mathieu-Daudé wrote:
> The CPU() macro is defined as:
>
> #define CPU(obj) ((CPUState *)(obj))
>
> Remove an unnecessary CPU() cast.
>
> Patch created mechanically using spatch with this script:
>
> @@
> typedef CPUState;
> CPUState *s;
> @@
> - CPU(s)
> + s
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Cédric Le Goater <address@hidden>
> ---
> target/ppc/mmu_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c
> index 86c667b094..8972714775 100644
> --- a/target/ppc/mmu_helper.c
> +++ b/target/ppc/mmu_helper.c
> @@ -1820,7 +1820,7 @@ static inline void do_invalidate_BAT(CPUPPCState *env,
> target_ulong BATu,
> if (((end - base) >> TARGET_PAGE_BITS) > 1024) {
> /* Flushing 1024 4K pages is slower than a complete flush */
> LOG_BATS("Flush all BATs\n");
> - tlb_flush(CPU(cs));
> + tlb_flush(cs);
> LOG_BATS("Flush done\n");
> return;
> }
>
- [PATCH-for-5.1 0/3] various: Remove unnecessary casts, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 1/3] target: Remove unnecessary CPU() cast, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 2/3] various: Remove unnecessary OBJECT() cast, Philippe Mathieu-Daudé, 2020/04/12
- [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast, Philippe Mathieu-Daudé, 2020/04/12
- Re: [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast, David Gibson, 2020/04/13
- Re: [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast, Markus Armbruster, 2020/04/14
- RE: [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast, Paul Durrant, 2020/04/14
- Re: [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast, Cédric Le Goater, 2020/04/15
- Re: [PATCH-for-5.1 3/3] hw: Remove unnecessary DEVICE() cast, John Snow, 2020/04/17