[Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type

Philippe Mathieu-Daudé posted 11 patches 7 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20181012002217.2864-1-philmd@redhat.com
Test docker-clang@ubuntu failed
Test checkpatch passed
Test docker-quick@centos7 failed
Test docker-mingw@fedora passed
backends/rng-egd.c          |  6 +++---
chardev/baum.c              |  2 +-
chardev/char-fd.c           |  8 ++++----
chardev/char-fe.c           |  8 ++++----
chardev/char-io.c           |  4 ++--
chardev/char-mux.c          |  6 +++---
chardev/char-pty.c          |  6 +++---
chardev/char-ringbuf.c      |  4 ++--
chardev/char-socket.c       | 10 +++++-----
chardev/char-udp.c          |  6 +++---
chardev/char-win-stdio.c    |  2 +-
chardev/char-win.c          |  2 +-
chardev/char.c              | 20 ++++++++++++--------
chardev/msmouse.c           |  2 +-
chardev/spice.c             |  2 +-
chardev/testdev.c           |  2 +-
chardev/wctablet.c          |  4 ++--
gdbstub.c                   |  6 +++---
hw/arm/pxa2xx.c             |  4 ++--
hw/arm/strongarm.c          |  5 +++--
hw/bt/hci-csr.c             |  4 ++--
hw/char/bcm2835_aux.c       |  4 ++--
hw/char/cadence_uart.c      |  6 +++---
hw/char/cmsdk-apb-uart.c    |  4 ++--
hw/char/digic-uart.c        |  4 ++--
hw/char/escc.c              |  8 ++++----
hw/char/etraxfs_ser.c       |  4 ++--
hw/char/exynos4210_uart.c   |  5 +++--
hw/char/grlib_apbuart.c     |  4 ++--
hw/char/imx_serial.c        |  4 ++--
hw/char/ipoctal232.c        |  6 +++---
hw/char/lm32_juart.c        |  4 ++--
hw/char/lm32_uart.c         |  4 ++--
hw/char/mcf_uart.c          |  4 ++--
hw/char/milkymist-uart.c    |  4 ++--
hw/char/parallel.c          |  2 +-
hw/char/pl011.c             |  6 +++---
hw/char/sclpconsole-lm.c    |  4 ++--
hw/char/sclpconsole.c       |  6 +++---
hw/char/serial.c            |  8 ++++----
hw/char/sh_serial.c         |  6 +++---
hw/char/spapr_vty.c         |  6 +++---
hw/char/stm32f2xx_usart.c   |  5 +++--
hw/char/terminal3270.c      |  4 ++--
hw/char/virtio-console.c    |  4 ++--
hw/char/xen_console.c       |  4 ++--
hw/char/xilinx_uartlite.c   |  4 ++--
hw/ipmi/ipmi_bmc_extern.c   |  8 ++------
hw/misc/ivshmem.c           |  6 +++---
hw/riscv/riscv_htif.c       |  4 ++--
hw/riscv/sifive_uart.c      |  4 ++--
hw/usb/ccid-card-passthru.c |  6 +++---
hw/usb/dev-serial.c         |  4 ++--
hw/usb/redirect.c           |  4 ++--
include/chardev/char-fd.h   |  2 +-
include/chardev/char-fe.h   |  6 +++---
include/chardev/char-io.h   |  2 +-
include/chardev/char.h      | 13 +++++++------
include/qemu/main-loop.h    |  4 ++--
include/sysemu/replay.h     |  8 ++++----
monitor.c                   |  6 +++---
net/colo-compare.c          |  6 +++---
net/filter-mirror.c         |  4 ++--
net/slirp.c                 |  4 ++--
qtest.c                     |  4 ++--
replay/replay-char.c        |  8 ++++----
stubs/replay.c              |  8 ++++----
target/xtensa/xtensa-semi.c |  6 ++----
ui/console.c                |  2 +-
ui/gtk.c                    |  2 +-
70 files changed, 180 insertions(+), 178 deletions(-)
[Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type
Posted by Philippe Mathieu-Daudé 7 years, 3 months ago
Hi Paolo,

Here are the changes you suggested in
https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html

First two simple cleanups while here,
then slowly convert backends then frontends.

Regards,

Phil.

Philippe Mathieu-Daudé (11):
  hw/ipmi: Remove unnecessary declarations
  target/xtensa: Remove unnecessary declarations
  chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc
  chardev: Assert backend's chr_can_read() is positive
  chardev: Let chr_sync_read() use unsigned type
  chardev: Let chr_write use unsigned type
  chardev: Let IOReadHandler use unsigned type
  chardev: Let IOCanReadHandler use unsigned type
  chardev: Let qemu_chr_fe_* use unsigned type
  chardev: Let qemu_chr_be_* use unsigned type
  chardev: FDChardev::max_size be unsigned

 backends/rng-egd.c          |  6 +++---
 chardev/baum.c              |  2 +-
 chardev/char-fd.c           |  8 ++++----
 chardev/char-fe.c           |  8 ++++----
 chardev/char-io.c           |  4 ++--
 chardev/char-mux.c          |  6 +++---
 chardev/char-pty.c          |  6 +++---
 chardev/char-ringbuf.c      |  4 ++--
 chardev/char-socket.c       | 10 +++++-----
 chardev/char-udp.c          |  6 +++---
 chardev/char-win-stdio.c    |  2 +-
 chardev/char-win.c          |  2 +-
 chardev/char.c              | 20 ++++++++++++--------
 chardev/msmouse.c           |  2 +-
 chardev/spice.c             |  2 +-
 chardev/testdev.c           |  2 +-
 chardev/wctablet.c          |  4 ++--
 gdbstub.c                   |  6 +++---
 hw/arm/pxa2xx.c             |  4 ++--
 hw/arm/strongarm.c          |  5 +++--
 hw/bt/hci-csr.c             |  4 ++--
 hw/char/bcm2835_aux.c       |  4 ++--
 hw/char/cadence_uart.c      |  6 +++---
 hw/char/cmsdk-apb-uart.c    |  4 ++--
 hw/char/digic-uart.c        |  4 ++--
 hw/char/escc.c              |  8 ++++----
 hw/char/etraxfs_ser.c       |  4 ++--
 hw/char/exynos4210_uart.c   |  5 +++--
 hw/char/grlib_apbuart.c     |  4 ++--
 hw/char/imx_serial.c        |  4 ++--
 hw/char/ipoctal232.c        |  6 +++---
 hw/char/lm32_juart.c        |  4 ++--
 hw/char/lm32_uart.c         |  4 ++--
 hw/char/mcf_uart.c          |  4 ++--
 hw/char/milkymist-uart.c    |  4 ++--
 hw/char/parallel.c          |  2 +-
 hw/char/pl011.c             |  6 +++---
 hw/char/sclpconsole-lm.c    |  4 ++--
 hw/char/sclpconsole.c       |  6 +++---
 hw/char/serial.c            |  8 ++++----
 hw/char/sh_serial.c         |  6 +++---
 hw/char/spapr_vty.c         |  6 +++---
 hw/char/stm32f2xx_usart.c   |  5 +++--
 hw/char/terminal3270.c      |  4 ++--
 hw/char/virtio-console.c    |  4 ++--
 hw/char/xen_console.c       |  4 ++--
 hw/char/xilinx_uartlite.c   |  4 ++--
 hw/ipmi/ipmi_bmc_extern.c   |  8 ++------
 hw/misc/ivshmem.c           |  6 +++---
 hw/riscv/riscv_htif.c       |  4 ++--
 hw/riscv/sifive_uart.c      |  4 ++--
 hw/usb/ccid-card-passthru.c |  6 +++---
 hw/usb/dev-serial.c         |  4 ++--
 hw/usb/redirect.c           |  4 ++--
 include/chardev/char-fd.h   |  2 +-
 include/chardev/char-fe.h   |  6 +++---
 include/chardev/char-io.h   |  2 +-
 include/chardev/char.h      | 13 +++++++------
 include/qemu/main-loop.h    |  4 ++--
 include/sysemu/replay.h     |  8 ++++----
 monitor.c                   |  6 +++---
 net/colo-compare.c          |  6 +++---
 net/filter-mirror.c         |  4 ++--
 net/slirp.c                 |  4 ++--
 qtest.c                     |  4 ++--
 replay/replay-char.c        |  8 ++++----
 stubs/replay.c              |  8 ++++----
 target/xtensa/xtensa-semi.c |  6 ++----
 ui/console.c                |  2 +-
 ui/gtk.c                    |  2 +-
 70 files changed, 180 insertions(+), 178 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type
Posted by Daniel P. Berrangé 7 years, 3 months ago
On Fri, Oct 12, 2018 at 02:22:06AM +0200, Philippe Mathieu-Daudé wrote:
> Hi Paolo,
> 
> Here are the changes you suggested in
> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html
> 
> First two simple cleanups while here,
> then slowly convert backends then frontends.
> 
> Regards,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (11):
>   hw/ipmi: Remove unnecessary declarations
>   target/xtensa: Remove unnecessary declarations
>   chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc
>   chardev: Assert backend's chr_can_read() is positive
>   chardev: Let chr_sync_read() use unsigned type
>   chardev: Let chr_write use unsigned type
>   chardev: Let IOReadHandler use unsigned type
>   chardev: Let IOCanReadHandler use unsigned type
>   chardev: Let qemu_chr_fe_* use unsigned type
>   chardev: Let qemu_chr_be_* use unsigned type
>   chardev: FDChardev::max_size be unsigned

s/unsigned/size_t/ in all these commit messages, as it looked
like you meant 'unsigned int' with the current commit msg.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type
Posted by Philippe Mathieu-Daudé 11 months, 3 weeks ago
On 12/10/18 10:20, Daniel P. Berrangé wrote:
> On Fri, Oct 12, 2018 at 02:22:06AM +0200, Philippe Mathieu-Daudé wrote:
>> Hi Paolo,
>>
>> Here are the changes you suggested in
>> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html


>>    chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc
>>    chardev: Assert backend's chr_can_read() is positive
>>    chardev: Let chr_sync_read() use unsigned type
>>    chardev: Let chr_write use unsigned type
>>    chardev: Let IOReadHandler use unsigned type
>>    chardev: Let IOCanReadHandler use unsigned type
>>    chardev: Let qemu_chr_fe_* use unsigned type
>>    chardev: Let qemu_chr_be_* use unsigned type
>>    chardev: FDChardev::max_size be unsigned
> 
> s/unsigned/size_t/ in all these commit messages, as it looked
> like you meant 'unsigned int' with the current commit msg.

Sure.

Paolo, any blocking comment before I fix the bitrotten places?


Re: [Qemu-devel] [PATCH v2 00/11] chardev: Convert IO handlers to use unsigned type
Posted by Philippe Mathieu-Daudé 11 months, 3 weeks ago
On 20/2/25 11:07, Philippe Mathieu-Daudé wrote:
> On 12/10/18 10:20, Daniel P. Berrangé wrote:
>> On Fri, Oct 12, 2018 at 02:22:06AM +0200, Philippe Mathieu-Daudé wrote:
>>> Hi Paolo,
>>>
>>> Here are the changes you suggested in
>>> https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html
> 
> 
>>>    chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc
>>>    chardev: Assert backend's chr_can_read() is positive
>>>    chardev: Let chr_sync_read() use unsigned type
>>>    chardev: Let chr_write use unsigned type
>>>    chardev: Let IOReadHandler use unsigned type
>>>    chardev: Let IOCanReadHandler use unsigned type
>>>    chardev: Let qemu_chr_fe_* use unsigned type
>>>    chardev: Let qemu_chr_be_* use unsigned type
>>>    chardev: FDChardev::max_size be unsigned
>>
>> s/unsigned/size_t/ in all these commit messages, as it looked
>> like you meant 'unsigned int' with the current commit msg.
> 
> Sure.
> 
> Paolo, any blocking comment before I fix the bitrotten places?

Doh, I just noticed your comments in the last patch:
https://lore.kernel.org/qemu-devel/786ca1d4-f874-e643-b85a-20652f1c84d8@redhat.com/