qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] RFC: mass comment conversion from C99 to C89
@ 2011-01-15 16:02 Blue Swirl
  2011-01-15 17:20 ` Laurent Vivier
  2011-01-17  0:12 ` Peter Maydell
  0 siblings, 2 replies; 8+ messages in thread
From: Blue Swirl @ 2011-01-15 16:02 UTC (permalink / raw)
  To: qemu-devel

With the sed script below (my first I think), I'm able to convert most
files in QEMU from C99 comment style to C89. When successive line with
C99 comments are converted, the comments are merged. Two files
(hw/rtl8139.c and microblaze-dis.c) still fail.

Is this a good idea?

If yes, what should be the commit approach? This could be split very
easily even into 141 patch series if desired, but probably a
combination of per directory patches would make more sense.

Most files only have a few C99 comments, the worst offenders hide in
target-sparc. ;-)

 block.c                      |   42 +--
 block/bochs.c                |   44 +--
 block/curl.c                 |   24 -
 block/parallels.c            |    6
 block/qcow2.h                |    2
 block/vdi.c                  |    4
 block/vmdk.c                 |   40 +--
 block/vpc.c                  |   94 +++----
 block/vvfat.c                |    2
 bsd-user/bsd-mman.h          |    2
 bsd-user/elfload.c           |    4
 bsd-user/main.c              |   14 -
 bsd-user/qemu.h              |    8
 bsd-user/x86_64/syscall.h    |    2
 check-qdict.c                |   14 -
 check-qfloat.c               |    2
 check-qint.c                 |    2
 check-qlist.c                |    6
 check-qstring.c              |    2
 cpu-exec.c                   |   64 ++--
 darwin-user/main.c           |    4
 darwin-user/syscall.c        |   18 -
 exec.c                       |    2
 hw/acpi_piix4.c              |    4
 hw/bitbang_i2c.c             |    2
 hw/cirrus_vga.c              |  468 ++++++++++++++++++------------------
 hw/cs4231.c                  |    8
 hw/cuda.c                    |    2
 hw/e1000.c                   |   50 +--
 hw/eccmemctl.c               |    2
 hw/eeprom93xx.c              |    4
 hw/escc.c                    |   56 ++--
 hw/esp.c                     |    8
 hw/etraxfs_dma.c             |    6
 hw/fdc.c                     |    4
 hw/firmware_abi.h            |    6
 hw/fmopl.c                   |   10
 hw/grackle_pci.c             |    2
 hw/hpet.c                    |   10
 hw/hw.h                      |    2
 hw/ide/ahci.c                |    2
 hw/ide/cmd646.c              |    6
 hw/ide/core.c                |    2
 hw/ide/piix.c                |    2
 hw/integratorcp.c            |    2
 hw/lan9118.c                 |    4
 hw/m48t59.c                  |    8
 hw/mac_nvram.c               |    8
 hw/macio.c                   |    2
 hw/mips_malta.c              |    4
 hw/ne2000.c                  |    2
 hw/omap_sx1.c                |    2
 hw/openpic.c                 |   10
 hw/pcnet-pci.c               |    2
 hw/pflash_cfi01.c            |    4
 hw/pflash_cfi02.c            |    8
 hw/piix4.c                   |   14 -
 hw/piix_pci.c                |   10
 hw/ppc.c                     |    2
 hw/ppc405_boards.c           |    6
 hw/ppc405_uc.c               |    4
 hw/ppc440.c                  |    2
 hw/ppc_prep.c                |   16 -
 hw/prep_pci.c                |    8
 hw/qxl.c                     |    2
 hw/rtl8139.c                 |   64 ++--
 hw/scsi-disk.c               |   40 +--
 hw/slavio_intctl.c           |   16 -
 hw/slavio_misc.c             |    6
 hw/slavio_timer.c            |   68 ++---
 hw/smbios.h                  |    2
 hw/sun4m.c                   |   48 +--
 hw/sun4m_iommu.c             |    4
 hw/sun4u.c                   |   34 +-
 hw/syborg_timer.c            |    2
 hw/tc6393xb.c                |   18 -
 hw/tcx.c                     |    6
 hw/unin_pci.c                |   24 -
 hw/usb-serial.c              |   26 +-
 hw/usb-uhci.c                |    6
 hw/vga-pci.c                 |    4
 hw/virtio-net.c              |    4
 hw/virtio-net.h              |   12
 hw/xen.h                     |    6
 hw/xen_domainbuild.c         |    6
 linux-user/alpha/syscall.h   |   14 -
 linux-user/elfload.c         |    2
 linux-user/main.c            |    4
 linux-user/signal.c          |   26 +-
 linux-user/socket.h          |    2
 linux-user/x86_64/syscall.h  |    2
 microblaze-dis.c             |   30 +-
 monitor.c                    |    2
 net-checksum.c               |    6
 net/checksum.c               |    6
 net/tap-solaris.c            |    2
 net/tap-win32.c              |   50 +--
 qemu-char.c                  |    2
 qemu-img.c                   |    2
 qemu-option.c                |   14 -
 qemu-timer.c                 |    8
 qerror.c                     |    2
 target-alpha/translate.c     |   18 -
 target-i386/kvm.c            |    2
 target-i386/op_helper.c      |    6
 target-m68k/translate.c      |    4
 target-microblaze/helper.c   |    2
 target-mips/cpu.h            |    6
 target-mips/op_helper.c      |   30 +-
 target-mips/translate.c      |  202 +++++++--------
 target-mips/translate_init.c |    6
 target-ppc/helper.c          |    8
 target-ppc/machine.c         |    4
 target-ppc/op_helper.c       |    4
 target-ppc/translate.c       |   36 +-
 target-ppc/translate_init.c  |   10
 target-s390x/exec.h          |    2
 target-sh4/op_helper.c       |    4
 target-sparc/cpu.h           |   26 +-
 target-sparc/helper.c        |   74 ++---
 target-sparc/machine.c       |    4
 target-sparc/op_helper.c     |  552 +++++++++++++++++++++----------------------
 target-sparc/translate.c     |  220 ++++++++---------
 tcg/arm/tcg-target.h         |    8
 tcg/hppa/tcg-target.h        |    4
 tcg/i386/tcg-target.h        |   20 -
 tcg/s390/tcg-target.h        |   24 -
 tcg/sparc/tcg-target.c       |   12
 tcg/sparc/tcg-target.h       |   46 +--
 tcg/tcg.c                    |    2
 tests/cris/sys.c             |    2
 tests/linux-test.c           |    2
 tests/qruncom.c              |    6
 tests/runcom.c               |    2
 ui/keymaps.c                 |    6
 ui/sdl.c                     |    4
 ui/vnc-enc-tight.c           |    4
 ui/vnc-enc-zlib.c            |   22 -
 ui/vnc.h                     |    2
 usb-bsd.c                    |    4
 vl.c                         |    2
 141 files changed, 1570 insertions(+), 1570 deletions(-)


#!/bin/sed -nf

:restart
# convert // to /* */
s/\(^\|[^:"]\)\/\/[ ]*\([^#].*\)$/\1\/* \2 *\//; t convertedfirst
p
b end

:convertedfirst
# match */ at the end of line
s/\(\*\/$\)/\1/; t firstfound
p
b end

:firstfound
h
n

# convert // to /* */
s/\(^\|[^:"]\)\/\/[ ]*\([^#].*\)$/\1\/* \2 *\//; t ignorematch

:ignorematch
# match /* at the beginning of line
s/^\( *\/\*.*\)/\1/; t secondfound
x
p
x
b convertedfirst

# found both
:secondfound
x
# delete */ at the end of line
s/ *\*\/$//
p
x
# delete /* at the beginning of line
s/^\( *\)\/\*/\1  /
b convertedfirst

:end

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-15 16:02 [Qemu-devel] RFC: mass comment conversion from C99 to C89 Blue Swirl
@ 2011-01-15 17:20 ` Laurent Vivier
  2011-01-15 17:27   ` Blue Swirl
  2011-01-15 17:44   ` Stefan Weil
  2011-01-17  0:12 ` Peter Maydell
  1 sibling, 2 replies; 8+ messages in thread
From: Laurent Vivier @ 2011-01-15 17:20 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

Le samedi 15 janvier 2011 à 16:02 +0000, Blue Swirl a écrit :
> With the sed script below (my first I think), I'm able to convert most

nice script. Did you try awk ?

> files in QEMU from C99 comment style to C89. When successive line with
> C99 comments are converted, the comments are merged. Two files

[ This remembers me the port of gstreamer to AIX using xlc, which was
C89 only... ]

> (hw/rtl8139.c and microblaze-dis.c) still fail.
> 
> Is this a good idea?

I think line like:

//#define DEBUG

should be changed to

#if 0
#define DEBUG
#endif

as it is not really a comment but a flag.

Of course a new challenge appears: identify block of following
"//#define" (like in linux-user/sparc64/termbits.h ;-) )

> If yes, what should be the commit approach? This could be split very
> easily even into 141 patch series if desired, but probably a
> combination of per directory patches would make more sense.
> 
> Most files only have a few C99 comments, the worst offenders hide in
> target-sparc. ;-)
> 
>  block.c                      |   42 +--
>  block/bochs.c                |   44 +--
>  block/curl.c                 |   24 -
>  block/parallels.c            |    6
>  block/qcow2.h                |    2
>  block/vdi.c                  |    4
>  block/vmdk.c                 |   40 +--
>  block/vpc.c                  |   94 +++----
>  block/vvfat.c                |    2
>  bsd-user/bsd-mman.h          |    2
>  bsd-user/elfload.c           |    4
>  bsd-user/main.c              |   14 -
>  bsd-user/qemu.h              |    8
>  bsd-user/x86_64/syscall.h    |    2
>  check-qdict.c                |   14 -
>  check-qfloat.c               |    2
>  check-qint.c                 |    2
>  check-qlist.c                |    6
>  check-qstring.c              |    2
>  cpu-exec.c                   |   64 ++--
>  darwin-user/main.c           |    4
>  darwin-user/syscall.c        |   18 -
>  exec.c                       |    2
>  hw/acpi_piix4.c              |    4
>  hw/bitbang_i2c.c             |    2
>  hw/cirrus_vga.c              |  468 ++++++++++++++++++------------------
>  hw/cs4231.c                  |    8
>  hw/cuda.c                    |    2
>  hw/e1000.c                   |   50 +--
>  hw/eccmemctl.c               |    2
>  hw/eeprom93xx.c              |    4
>  hw/escc.c                    |   56 ++--
>  hw/esp.c                     |    8
>  hw/etraxfs_dma.c             |    6
>  hw/fdc.c                     |    4
>  hw/firmware_abi.h            |    6
>  hw/fmopl.c                   |   10
>  hw/grackle_pci.c             |    2
>  hw/hpet.c                    |   10
>  hw/hw.h                      |    2
>  hw/ide/ahci.c                |    2
>  hw/ide/cmd646.c              |    6
>  hw/ide/core.c                |    2
>  hw/ide/piix.c                |    2
>  hw/integratorcp.c            |    2
>  hw/lan9118.c                 |    4
>  hw/m48t59.c                  |    8
>  hw/mac_nvram.c               |    8
>  hw/macio.c                   |    2
>  hw/mips_malta.c              |    4
>  hw/ne2000.c                  |    2
>  hw/omap_sx1.c                |    2
>  hw/openpic.c                 |   10
>  hw/pcnet-pci.c               |    2
>  hw/pflash_cfi01.c            |    4
>  hw/pflash_cfi02.c            |    8
>  hw/piix4.c                   |   14 -
>  hw/piix_pci.c                |   10
>  hw/ppc.c                     |    2
>  hw/ppc405_boards.c           |    6
>  hw/ppc405_uc.c               |    4
>  hw/ppc440.c                  |    2
>  hw/ppc_prep.c                |   16 -
>  hw/prep_pci.c                |    8
>  hw/qxl.c                     |    2
>  hw/rtl8139.c                 |   64 ++--
>  hw/scsi-disk.c               |   40 +--
>  hw/slavio_intctl.c           |   16 -
>  hw/slavio_misc.c             |    6
>  hw/slavio_timer.c            |   68 ++---
>  hw/smbios.h                  |    2
>  hw/sun4m.c                   |   48 +--
>  hw/sun4m_iommu.c             |    4
>  hw/sun4u.c                   |   34 +-
>  hw/syborg_timer.c            |    2
>  hw/tc6393xb.c                |   18 -
>  hw/tcx.c                     |    6
>  hw/unin_pci.c                |   24 -
>  hw/usb-serial.c              |   26 +-
>  hw/usb-uhci.c                |    6
>  hw/vga-pci.c                 |    4
>  hw/virtio-net.c              |    4
>  hw/virtio-net.h              |   12
>  hw/xen.h                     |    6
>  hw/xen_domainbuild.c         |    6
>  linux-user/alpha/syscall.h   |   14 -
>  linux-user/elfload.c         |    2
>  linux-user/main.c            |    4
>  linux-user/signal.c          |   26 +-
>  linux-user/socket.h          |    2
>  linux-user/x86_64/syscall.h  |    2
>  microblaze-dis.c             |   30 +-
>  monitor.c                    |    2
>  net-checksum.c               |    6
>  net/checksum.c               |    6
>  net/tap-solaris.c            |    2
>  net/tap-win32.c              |   50 +--
>  qemu-char.c                  |    2
>  qemu-img.c                   |    2
>  qemu-option.c                |   14 -
>  qemu-timer.c                 |    8
>  qerror.c                     |    2
>  target-alpha/translate.c     |   18 -
>  target-i386/kvm.c            |    2
>  target-i386/op_helper.c      |    6
>  target-m68k/translate.c      |    4
>  target-microblaze/helper.c   |    2
>  target-mips/cpu.h            |    6
>  target-mips/op_helper.c      |   30 +-
>  target-mips/translate.c      |  202 +++++++--------
>  target-mips/translate_init.c |    6
>  target-ppc/helper.c          |    8
>  target-ppc/machine.c         |    4
>  target-ppc/op_helper.c       |    4
>  target-ppc/translate.c       |   36 +-
>  target-ppc/translate_init.c  |   10
>  target-s390x/exec.h          |    2
>  target-sh4/op_helper.c       |    4
>  target-sparc/cpu.h           |   26 +-
>  target-sparc/helper.c        |   74 ++---
>  target-sparc/machine.c       |    4
>  target-sparc/op_helper.c     |  552 +++++++++++++++++++++----------------------
>  target-sparc/translate.c     |  220 ++++++++---------
>  tcg/arm/tcg-target.h         |    8
>  tcg/hppa/tcg-target.h        |    4
>  tcg/i386/tcg-target.h        |   20 -
>  tcg/s390/tcg-target.h        |   24 -
>  tcg/sparc/tcg-target.c       |   12
>  tcg/sparc/tcg-target.h       |   46 +--
>  tcg/tcg.c                    |    2
>  tests/cris/sys.c             |    2
>  tests/linux-test.c           |    2
>  tests/qruncom.c              |    6
>  tests/runcom.c               |    2
>  ui/keymaps.c                 |    6
>  ui/sdl.c                     |    4
>  ui/vnc-enc-tight.c           |    4
>  ui/vnc-enc-zlib.c            |   22 -
>  ui/vnc.h                     |    2
>  usb-bsd.c                    |    4
>  vl.c                         |    2
>  141 files changed, 1570 insertions(+), 1570 deletions(-)
> 
> 
> #!/bin/sed -nf
> 
> :restart
> # convert // to /* */
> s/\(^\|[^:"]\)\/\/[ ]*\([^#].*\)$/\1\/* \2 *\//; t convertedfirst
> p
> b end
> 
> :convertedfirst
> # match */ at the end of line
> s/\(\*\/$\)/\1/; t firstfound
> p
> b end
> 
> :firstfound
> h
> n
> 
> # convert // to /* */
> s/\(^\|[^:"]\)\/\/[ ]*\([^#].*\)$/\1\/* \2 *\//; t ignorematch
> 
> :ignorematch
> # match /* at the beginning of line
> s/^\( *\/\*.*\)/\1/; t secondfound
> x
> p
> x
> b convertedfirst
> 
> # found both
> :secondfound
> x
> # delete */ at the end of line
> s/ *\*\/$//
> p
> x
> # delete /* at the beginning of line
> s/^\( *\)\/\*/\1  /
> b convertedfirst
> 
> :end
> 

-- 
--------------------- laurent@vivier.eu ----------------------
"Tout ce qui est impossible reste à accomplir"    Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-15 17:20 ` Laurent Vivier
@ 2011-01-15 17:27   ` Blue Swirl
  2011-01-15 17:44   ` Stefan Weil
  1 sibling, 0 replies; 8+ messages in thread
From: Blue Swirl @ 2011-01-15 17:27 UTC (permalink / raw)
  To: Laurent Vivier; +Cc: qemu-devel

On Sat, Jan 15, 2011 at 5:20 PM, Laurent Vivier <Laurent@vivier.eu> wrote:
> Le samedi 15 janvier 2011 à 16:02 +0000, Blue Swirl a écrit :
>> With the sed script below (my first I think), I'm able to convert most
>
> nice script. Did you try awk ?

No, this just evolved from one-liner command into multi-line command
and then I suddenly had this.

>> files in QEMU from C99 comment style to C89. When successive line with
>> C99 comments are converted, the comments are merged. Two files
>
> [ This remembers me the port of gstreamer to AIX using xlc, which was
> C89 only... ]
>
>> (hw/rtl8139.c and microblaze-dis.c) still fail.
>>
>> Is this a good idea?
>
> I think line like:
>
> //#define DEBUG
>
> should be changed to
>
> #if 0
> #define DEBUG
> #endif
>
> as it is not really a comment but a flag.
>
> Of course a new challenge appears: identify block of following
> "//#define" (like in linux-user/sparc64/termbits.h ;-) )

The real fix IMHO would be to convert the debug statements into
tracepoints. My script actually avoids converting sequences starting
with  //#.

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-15 17:20 ` Laurent Vivier
  2011-01-15 17:27   ` Blue Swirl
@ 2011-01-15 17:44   ` Stefan Weil
  2011-01-15 18:01     ` Blue Swirl
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Weil @ 2011-01-15 17:44 UTC (permalink / raw)
  To: Blue Swirl; +Cc: Laurent Vivier, qemu-devel

Am 15.01.2011 18:20, schrieb Laurent Vivier:
> Le samedi 15 janvier 2011 à 16:02 +0000, Blue Swirl a écrit :
>> With the sed script below (my first I think), I'm able to convert most
>
> nice script. Did you try awk ?
>
>> files in QEMU from C99 comment style to C89. When successive line with
>> C99 comments are converted, the comments are merged. Two files
>
> [ This remembers me the port of gstreamer to AIX using xlc, which was
> C89 only... ]
>
>> (hw/rtl8139.c and microblaze-dis.c) still fail.
>>
>> Is this a good idea?
>
> I think line like:
>
> //#define DEBUG
>
> should be changed to
>
> #if 0
> #define DEBUG
> #endif
>
> as it is not really a comment but a flag.

The pattern //~ is also some kind of flag.

I must admit that I introduced some of these lines because
my favorite editor (SciTE) allows to toggle these
lines to code.

Laurent's solution would be fine for those, too.
It's also possible to replace all #if 0 by #if 1
to test compilation of debug code.

Is there an urgent need to fix all C99 comments?

I'd appreciate to see blanks at line endings or
tabs fixed, too. At least fixing the blanks is
much easier than fixing C99 comments.

Regards,
Stefan

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-15 17:44   ` Stefan Weil
@ 2011-01-15 18:01     ` Blue Swirl
  0 siblings, 0 replies; 8+ messages in thread
From: Blue Swirl @ 2011-01-15 18:01 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Laurent Vivier, qemu-devel

On Sat, Jan 15, 2011 at 5:44 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 15.01.2011 18:20, schrieb Laurent Vivier:
>>
>> Le samedi 15 janvier 2011 à 16:02 +0000, Blue Swirl a écrit :
>>>
>>> With the sed script below (my first I think), I'm able to convert most
>>
>> nice script. Did you try awk ?
>>
>>> files in QEMU from C99 comment style to C89. When successive line with
>>> C99 comments are converted, the comments are merged. Two files
>>
>> [ This remembers me the port of gstreamer to AIX using xlc, which was
>> C89 only... ]
>>
>>> (hw/rtl8139.c and microblaze-dis.c) still fail.
>>>
>>> Is this a good idea?
>>
>> I think line like:
>>
>> //#define DEBUG
>>
>> should be changed to
>>
>> #if 0
>> #define DEBUG
>> #endif
>>
>> as it is not really a comment but a flag.
>
> The pattern //~ is also some kind of flag.
>
> I must admit that I introduced some of these lines because
> my favorite editor (SciTE) allows to toggle these
> lines to code.
>
> Laurent's solution would be fine for those, too.
> It's also possible to replace all #if 0 by #if 1
> to test compilation of debug code.
>
> Is there an urgent need to fix all C99 comments?

Not really.

> I'd appreciate to see blanks at line endings or
> tabs fixed, too. At least fixing the blanks is
> much easier than fixing C99 comments.

Sure, for example the one line command in r3177 or
3b46e6242767a2c770c0aba0a6595e9511623c92
removes extra white space at the end of line.

Info page for sed presents example scripts which remove empty lines at
the end of the file and more than one successive empty line.

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-15 16:02 [Qemu-devel] RFC: mass comment conversion from C99 to C89 Blue Swirl
  2011-01-15 17:20 ` Laurent Vivier
@ 2011-01-17  0:12 ` Peter Maydell
  2011-01-17 15:04   ` Anthony Liguori
  1 sibling, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2011-01-17  0:12 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

On 15 January 2011 16:02, Blue Swirl <blauwirbel@gmail.com> wrote:
> With the sed script below (my first I think), I'm able to convert most
> files in QEMU from C99 comment style to C89. When successive line with
> C99 comments are converted, the comments are merged. Two files
> (hw/rtl8139.c and microblaze-dis.c) still fail.
>
> Is this a good idea?

I'm a bit wary of this kind of wide-scale no-semantic-change commit
(and more so for things like indent, brace and whitespace fixes
which can affect large chunks of actual code), because it makes
it harder to deal with qemu forks (especially if you were hoping to
be able to periodically rebase with an eye to eventually getting
changes back into mainline qemu).

This particular changeset doesn't touch target-arm so
it doesn't affect me personally, though.

-- PMM

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-17  0:12 ` Peter Maydell
@ 2011-01-17 15:04   ` Anthony Liguori
  2011-01-17 20:17     ` Blue Swirl
  0 siblings, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2011-01-17 15:04 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Blue Swirl, qemu-devel

On 01/16/2011 06:12 PM, Peter Maydell wrote:
> On 15 January 2011 16:02, Blue Swirl<blauwirbel@gmail.com>  wrote:
>    
>> With the sed script below (my first I think), I'm able to convert most
>> files in QEMU from C99 comment style to C89. When successive line with
>> C99 comments are converted, the comments are merged. Two files
>> (hw/rtl8139.c and microblaze-dis.c) still fail.
>>
>> Is this a good idea?
>>      
> I'm a bit wary of this kind of wide-scale no-semantic-change commit
> (and more so for things like indent, brace and whitespace fixes
> which can affect large chunks of actual code), because it makes
> it harder to deal with qemu forks (especially if you were hoping to
> be able to periodically rebase with an eye to eventually getting
> changes back into mainline qemu).
>    

Yeah, I'm equally wary of such changes unless they have a very clear 
value (e.g. changing an API definition to accommodate an extra parameter).

Regards,

Anthony Liguori

> This particular changeset doesn't touch target-arm so
> it doesn't affect me personally, though.
>
> -- PMM
>
>    

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

* Re: [Qemu-devel] RFC: mass comment conversion from C99 to C89
  2011-01-17 15:04   ` Anthony Liguori
@ 2011-01-17 20:17     ` Blue Swirl
  0 siblings, 0 replies; 8+ messages in thread
From: Blue Swirl @ 2011-01-17 20:17 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Peter Maydell, qemu-devel

On Mon, Jan 17, 2011 at 3:04 PM, Anthony Liguori <anthony@codemonkey.ws> wrote:
> On 01/16/2011 06:12 PM, Peter Maydell wrote:
>>
>> On 15 January 2011 16:02, Blue Swirl<blauwirbel@gmail.com>  wrote:
>>
>>>
>>> With the sed script below (my first I think), I'm able to convert most
>>> files in QEMU from C99 comment style to C89. When successive line with
>>> C99 comments are converted, the comments are merged. Two files
>>> (hw/rtl8139.c and microblaze-dis.c) still fail.
>>>
>>> Is this a good idea?
>>>
>>
>> I'm a bit wary of this kind of wide-scale no-semantic-change commit
>> (and more so for things like indent, brace and whitespace fixes
>> which can affect large chunks of actual code), because it makes
>> it harder to deal with qemu forks (especially if you were hoping to
>> be able to periodically rebase with an eye to eventually getting
>> changes back into mainline qemu).
>>
>
> Yeah, I'm equally wary of such changes unless they have a very clear value
> (e.g. changing an API definition to accommodate an extra parameter).

In this case the value is improved consistency. If we only mass
converted target-sparc and cirrus (~1300 lines), the rest could be
converted gradually.

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

end of thread, other threads:[~2011-01-17 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-15 16:02 [Qemu-devel] RFC: mass comment conversion from C99 to C89 Blue Swirl
2011-01-15 17:20 ` Laurent Vivier
2011-01-15 17:27   ` Blue Swirl
2011-01-15 17:44   ` Stefan Weil
2011-01-15 18:01     ` Blue Swirl
2011-01-17  0:12 ` Peter Maydell
2011-01-17 15:04   ` Anthony Liguori
2011-01-17 20:17     ` Blue Swirl

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