[PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static

Alex Bennée posted 10 patches 10 months, 3 weeks ago
Maintainers: "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>, David Hildenbrand <david@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>
There is a newer version of this series
[PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static
Posted by Alex Bennée 10 months, 3 weeks ago
It's not used outside of the gdbstub code.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 target/ppc/cpu.h     | 1 -
 target/ppc/gdbstub.c | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 1e833ade04..950bb6e06c 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -3016,7 +3016,6 @@ static inline bool ppc_interrupts_little_endian(PowerPCCPU *cpu, bool hv)
 
 void dump_mmu(CPUPPCState *env);
 
-void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len);
 void ppc_store_vscr(CPUPPCState *env, uint32_t vscr);
 uint32_t ppc_get_vscr(CPUPPCState *env);
 void ppc_set_cr(CPUPPCState *env, uint64_t cr);
diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c
index 3b28d4e21c..c09e93abaf 100644
--- a/target/ppc/gdbstub.c
+++ b/target/ppc/gdbstub.c
@@ -81,7 +81,7 @@ static int ppc_gdb_register_len(int n)
  * TARGET_BIG_ENDIAN is always set, and we must check the current
  * mode of the chip to see if we're running in little-endian.
  */
-void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len)
+static void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len)
 {
 #ifndef CONFIG_USER_ONLY
     if (!FIELD_EX64(env->msr, MSR, LE)) {
-- 
2.39.5


Re: [PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static
Posted by Pierrick Bouvier 10 months, 3 weeks ago
On 3/19/25 11:22, Alex Bennée wrote:
> It's not used outside of the gdbstub code.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   target/ppc/cpu.h     | 1 -
>   target/ppc/gdbstub.c | 2 +-
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index 1e833ade04..950bb6e06c 100644
> --- a/target/ppc/cpu.h
> +++ b/target/ppc/cpu.h
> @@ -3016,7 +3016,6 @@ static inline bool ppc_interrupts_little_endian(PowerPCCPU *cpu, bool hv)
>   
>   void dump_mmu(CPUPPCState *env);
>   
> -void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len);
>   void ppc_store_vscr(CPUPPCState *env, uint32_t vscr);
>   uint32_t ppc_get_vscr(CPUPPCState *env);
>   void ppc_set_cr(CPUPPCState *env, uint64_t cr);
> diff --git a/target/ppc/gdbstub.c b/target/ppc/gdbstub.c
> index 3b28d4e21c..c09e93abaf 100644
> --- a/target/ppc/gdbstub.c
> +++ b/target/ppc/gdbstub.c
> @@ -81,7 +81,7 @@ static int ppc_gdb_register_len(int n)
>    * TARGET_BIG_ENDIAN is always set, and we must check the current
>    * mode of the chip to see if we're running in little-endian.
>    */
> -void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len)
> +static void ppc_maybe_bswap_register(CPUPPCState *env, uint8_t *mem_buf, int len)
>   {
>   #ifndef CONFIG_USER_ONLY
>       if (!FIELD_EX64(env->msr, MSR, LE)) {

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>

Re: [PATCH 06/10] target/ppc: make ppc_maybe_bswap_register static
Posted by Philippe Mathieu-Daudé 10 months, 3 weeks ago
On 19/3/25 19:22, Alex Bennée wrote:
> It's not used outside of the gdbstub code.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   target/ppc/cpu.h     | 1 -
>   target/ppc/gdbstub.c | 2 +-
>   2 files changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>