qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/9] convert many more globals to "static"
@ 2012-05-21 19:51 Jim Meyering
  2012-05-21 19:51 ` [Qemu-devel] [PATCH 1/9] ccid: declare DEFAULT_ATR table to be "static const" Jim Meyering
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Jim Meyering @ 2012-05-21 19:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jim Meyering

From: Jim Meyering <meyering@redhat.com>

Following up on discussion here,

  http://marc.info/?t=133759487600008&r=1&w=2

here are patches to limit the scope of the remaining global variables.
Most changes simply added a preceding "static".  However, in some cases,
I've made minor additional changes, e.g., to make a static
table "const" as well (which sometimes required making an iterator
pointer const, too), and to move or remove declarations of variables
that the compiler then was able to identify as unused.

Initially I put the changes to each file in a separate commit, but that
got old quickly, and I lumped all of the remaining changes into the
9th commit.  If that's a problem, let me know and I'll separate it.


Jim Meyering (9):
  ccid: declare DEFAULT_ATR table to be "static const"
  tcg: declare __jit_debug_descriptor to be static
  alpha-dis: remove unused global; declare others to be static
  linux-user: arg_table need not have global scope
  ccid: make backend_enum_table "static const" and adjust users
  sheepdog: declare bdrv_sheepdog to be static
  mips-dis: declare four globals to be "static"
  bonito: declare bonito_state to be static
  convert many more globals to static

 alpha-dis.c               | 26 ++++++----------
 arm-dis.c                 |  8 ++---
 block/sheepdog.c          |  2 +-
 cpus.c                    |  4 +--
 cris-dis.c                |  2 +-
 hw/9pfs/virtio-9p-synth.c |  2 +-
 hw/bonito.c               |  2 +-
 hw/ccid-card-emulated.c   |  6 ++--
 hw/ccid-card-passthru.c   |  2 +-
 hw/ide/pci.c              |  2 +-
 hw/leon3.c                |  2 +-
 hw/mips_fulong2e.c        |  2 +-
 hw/s390-virtio-bus.c      |  2 +-
 hw/spapr_rtas.c           |  2 +-
 hw/xen_platform.c         |  2 +-
 hw/xgmac.c                |  2 +-
 linux-user/main.c         |  6 ++--
 m68k-dis.c                | 79 ++++++++++++++++++++++++-----------------------
 memory.c                  |  2 +-
 microblaze-dis.c          |  6 ++--
 mips-dis.c                | 15 +++++----
 ppc-dis.c                 | 26 ++++++++--------
 sh4-dis.c                 |  2 +-
 target-cris/translate.c   |  2 +-
 target-i386/cpu.c         |  4 +--
 target-i386/kvm.c         |  2 +-
 tcg/tcg.c                 |  2 +-
 tests/fdc-test.c          |  2 +-
 vl.c                      | 12 ++++---
 29 files changed, 110 insertions(+), 118 deletions(-)

--
1.7.10.2.552.gaa3bb87

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

end of thread, other threads:[~2012-08-17 13:45 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 19:51 [Qemu-devel] [PATCH 0/9] convert many more globals to "static" Jim Meyering
2012-05-21 19:51 ` [Qemu-devel] [PATCH 1/9] ccid: declare DEFAULT_ATR table to be "static const" Jim Meyering
2012-05-21 19:51 ` Jim Meyering
2012-05-21 19:51 ` [Qemu-devel] [PATCH 2/9] tcg: declare __jit_debug_descriptor to be static Jim Meyering
2012-05-21 19:51 ` Jim Meyering
2012-05-21 19:58   ` Peter Maydell
2012-05-21 20:10     ` Jim Meyering
2012-05-21 20:31       ` Peter Maydell
2012-05-22 10:26         ` Jim Meyering
2012-05-21 19:51 ` [Qemu-devel] [PATCH 3/9] alpha-dis: remove unused global; declare others " Jim Meyering
2012-05-21 19:56 ` Jim Meyering
2012-05-21 19:56   ` [Qemu-devel] [PATCH 4/9] linux-user: arg_table need not have global scope Jim Meyering
2012-05-21 19:56   ` [Qemu-devel] [PATCH 5/9] ccid: make backend_enum_table "static const" and adjust users Jim Meyering
2012-05-21 19:56   ` [Qemu-devel] [PATCH 6/9] sheepdog: declare bdrv_sheepdog to be static Jim Meyering
2012-05-21 19:56   ` [Qemu-devel] [PATCH 7/9] mips-dis: declare four globals to be "static" Jim Meyering
2012-05-21 19:56   ` [Qemu-devel] [PATCH 8/9] bonito: declare bonito_state to be static Jim Meyering
2012-05-21 19:56   ` [Qemu-devel] [PATCH 9/9] convert many more globals to static Jim Meyering
2012-08-17 13:37 ` [Qemu-devel] [PATCH 0/9] convert many more globals to "static" Jim Meyering
2012-08-17 13:45   ` Stefan Weil

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).