qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/xtensa: make xtensa_modules static on import
@ 2021-03-30  7:30 Max Filippov
  2021-03-30 12:11 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2021-03-30  7:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Max Filippov

xtensa_modules variable defined in each xtensa-modules.c.inc is only
used locally by the including file. Make it static.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
 target/xtensa/import_core.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh
index f3404039cc20..53d3c4d099bb 100755
--- a/target/xtensa/import_core.sh
+++ b/target/xtensa/import_core.sh
@@ -35,6 +35,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \
         -e '/^#include "ansidecl.h"/d' \
         -e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^  return 0;$/  return XTENSA_UNDEFINED;/' \
         -e 's/#include <xtensa-isa.h>/#include "xtensa-isa.h"/' \
+        -e 's/^\(xtensa_isa_internal xtensa_modules\)/static \1/' \
     > "$TARGET"/xtensa-modules.c.inc
 
 cat <<EOF > "${TARGET}.c"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] target/xtensa: make xtensa_modules static on import
  2021-03-30  7:30 [PATCH] target/xtensa: make xtensa_modules static on import Max Filippov
@ 2021-03-30 12:11 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-30 12:11 UTC (permalink / raw)
  To: Max Filippov, qemu-devel; +Cc: Yury Gribov

On 3/30/21 9:30 AM, Max Filippov wrote:
> xtensa_modules variable defined in each xtensa-modules.c.inc is only
> used locally by the including file. Make it static.
> 

Reported-by: Yury Gribov <tetra2005@gmail.com>

> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  target/xtensa/import_core.sh | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/target/xtensa/import_core.sh b/target/xtensa/import_core.sh
> index f3404039cc20..53d3c4d099bb 100755
> --- a/target/xtensa/import_core.sh
> +++ b/target/xtensa/import_core.sh
> @@ -35,6 +35,7 @@ tar -xf "$OVERLAY" -O binutils/xtensa-modules.c | \
>          -e '/^#include "ansidecl.h"/d' \
>          -e '/^Slot_[a-zA-Z0-9_]\+_decode (const xtensa_insnbuf insn)/,/^}/s/^  return 0;$/  return XTENSA_UNDEFINED;/' \
>          -e 's/#include <xtensa-isa.h>/#include "xtensa-isa.h"/' \
> +        -e 's/^\(xtensa_isa_internal xtensa_modules\)/static \1/' \
>      > "$TARGET"/xtensa-modules.c.inc
>  
>  cat <<EOF > "${TARGET}.c"
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-30 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  7:30 [PATCH] target/xtensa: make xtensa_modules static on import Max Filippov
2021-03-30 12:11 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).