Message ID | 1585307647-24456-1-git-send-email-jasowang@redhat.com |
---|---|
State | New |
Headers | show |
On Fri, 27 Mar 2020 at 11:14, Jason Wang <jasowang@redhat.com> wrote: > > The following changes since commit cfe68ae025f704f336d7dd3d1903ce37b445831d: > > Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.0-pull-request' into staging (2020-03-26 20:55:54 +0000) > > are available in the git repository at: > > https://github.com/jasowang/qemu.git tags/net-pull-request > > for you to fetch changes up to f3b364f4f77fcb24cec468f518bf5e093dc27cb7: > > hw/net/allwinner-sun8i-emac.c: Fix REG_ADDR_HIGH/LOW reads (2020-03-27 18:59:47 +0800) > > ---------------------------------------------------------------- > > ---------------------------------------------------------------- Hi; this fails to compile (all platforms): /home/petmay01/qemu-for-merges/hw/net/allwinner-sun8i-emac.c:773:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .can_receive = allwinner_sun8i_emac_can_receive, ^ /home/petmay01/qemu-for-merges/hw/net/allwinner-sun8i-emac.c:773:20: note: (near initialization for 'net_allwinner_sun8i_emac_info.can_receive') There's also this one, though not every compiler picked it up: /home/peter.maydell/qemu/hw/net/i82596.c: In function 'i82596_receive': /home/peter.maydell/qemu/hw/net/i82596.c:657:30: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] assert(bufsz >= 0); ^ /home/peter.maydell/qemu/hw/net/i82596.c:657:30: error: comparison of unsigned expression >= 0 is always true [-Werror=type-limits] assert(bufsz >= 0); ^ For the first error, I think this needs squashing into "hw/net: Make NetCanReceive() return a boolean": diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c index fc67a1be70..28637ff4c1 100644 --- a/hw/net/allwinner-sun8i-emac.c +++ b/hw/net/allwinner-sun8i-emac.c @@ -395,7 +395,7 @@ static void allwinner_sun8i_emac_flush_desc(FrameDescriptor *desc, cpu_physical_memory_write(phys_addr, desc, sizeof(*desc)); } -static int allwinner_sun8i_emac_can_receive(NetClientState *nc) +static bool allwinner_sun8i_emac_can_receive(NetClientState *nc) { AwSun8iEmacState *s = qemu_get_nic_opaque(nc); FrameDescriptor desc; Squashing this into my "hw/net/i82596.c: Avoid reading off end of buffer in i82596_receive()" commit fixes the second error. diff --git a/hw/net/i82596.c b/hw/net/i82596.c index a9bdbac339..055c3a1470 100644 --- a/hw/net/i82596.c +++ b/hw/net/i82596.c @@ -653,8 +653,8 @@ ssize_t i82596_receive(NetClientState *nc, const uint8_t *buf, size_t sz) if (bufcount > 0) { /* Still some of the actual data buffer to transfer */ + assert(bufsz >= bufcount); bufsz -= bufcount; - assert(bufsz >= 0); address_space_write(&address_space_memory, rba, MEMTXATTRS_UNSPECIFIED, buf, bufcount); rba += bufcount; thanks -- PMM
Patchew URL: https://patchew.org/QEMU/1585307647-24456-1-git-send-email-jasowang@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash make docker-image-centos7 V=1 NETWORK=1 time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1 === TEST SCRIPT END === CC hw/net/can/can_pcm3680_pci.o CC hw/net/can/can_mioe3680_pci.o CC hw/nvram/eeprom93xx.o /tmp/qemu-test/src/hw/net/allwinner-sun8i-emac.c:773:5: error: initialization from incompatible pointer type [-Werror] .can_receive = allwinner_sun8i_emac_can_receive, ^ /tmp/qemu-test/src/hw/net/allwinner-sun8i-emac.c:773:5: error: (near initialization for 'net_allwinner_sun8i_emac_info.can_receive') [-Werror] cc1: all warnings being treated as errors make: *** [hw/net/allwinner-sun8i-emac.o] Error 1 make: *** Waiting for unfinished jobs.... Traceback (most recent call last): File "./tests/docker/docker.py", line 664, in <module> --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=9de76a7b115b4ab8a94068ca9c2cad7f', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-tnhlej87/src/docker-src.2020-03-27-08.00.45.17095:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=9de76a7b115b4ab8a94068ca9c2cad7f make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-tnhlej87/src' make: *** [docker-run-test-quick@centos7] Error 2 real 2m20.630s user 0m8.048s The full log is available at http://patchew.org/logs/1585307647-24456-1-git-send-email-jasowang@redhat.com/testing.docker-quick@centos7/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
Patchew URL: https://patchew.org/QEMU/1585307647-24456-1-git-send-email-jasowang@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #! /bin/bash export ARCH=x86_64 make docker-image-fedora V=1 NETWORK=1 time make docker-test-mingw@fedora J=14 NETWORK=1 === TEST SCRIPT END === CC hw/net/rocker/rocker_world.o CC hw/net/rocker/rocker_of_dpa.o CC hw/net/can/can_sja1000.o /tmp/qemu-test/src/hw/net/allwinner-sun8i-emac.c:773:20: error: initialization of '_Bool (*)(NetClientState *)' {aka '_Bool (*)(struct NetClientState *)'} from incompatible pointer type 'int (*)(NetClientState *)' {aka 'int (*)(struct NetClientState *)'} [-Werror=incompatible-pointer-types] .can_receive = allwinner_sun8i_emac_can_receive, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/qemu-test/src/hw/net/allwinner-sun8i-emac.c:773:20: note: (near initialization for 'net_allwinner_sun8i_emac_info.can_receive') cc1: all warnings being treated as errors make: *** [/tmp/qemu-test/src/rules.mak:69: hw/net/allwinner-sun8i-emac.o] Error 1 make: *** Waiting for unfinished jobs.... CC hw/net/can/can_kvaser_pci.o Traceback (most recent call last): --- raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=5f98328ddc9546e3a22732b69d331039', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-25jm6435/src/docker-src.2020-03-27-08.03.37.24872:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2. filter=--filter=label=com.qemu.instance.uuid=5f98328ddc9546e3a22732b69d331039 make[1]: *** [docker-run] Error 1 make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-25jm6435/src' make: *** [docker-run-test-mingw@fedora] Error 2 real 2m1.238s user 0m8.179s The full log is available at http://patchew.org/logs/1585307647-24456-1-git-send-email-jasowang@redhat.com/testing.docker-mingw@fedora/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On 2020/3/27 下午7:36, Peter Maydell wrote: > On Fri, 27 Mar 2020 at 11:14, Jason Wang <jasowang@redhat.com> wrote: >> The following changes since commit cfe68ae025f704f336d7dd3d1903ce37b445831d: >> >> Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.0-pull-request' into staging (2020-03-26 20:55:54 +0000) >> >> are available in the git repository at: >> >> https://github.com/jasowang/qemu.git tags/net-pull-request >> >> for you to fetch changes up to f3b364f4f77fcb24cec468f518bf5e093dc27cb7: >> >> hw/net/allwinner-sun8i-emac.c: Fix REG_ADDR_HIGH/LOW reads (2020-03-27 18:59:47 +0800) >> >> ---------------------------------------------------------------- >> >> ---------------------------------------------------------------- > Hi; this fails to compile (all platforms): My bad, forget to run full docker test before sending the pull request. > > /home/petmay01/qemu-for-merges/hw/net/allwinner-sun8i-emac.c:773:20: > error: initialization from incompatible pointer type > [-Werror=incompatible-pointer-types] > .can_receive = allwinner_sun8i_emac_can_receive, > ^ > /home/petmay01/qemu-for-merges/hw/net/allwinner-sun8i-emac.c:773:20: > note: (near initialization for > 'net_allwinner_sun8i_emac_info.can_receive') > > > There's also this one, though not every compiler picked it up: > > /home/peter.maydell/qemu/hw/net/i82596.c: In function 'i82596_receive': > /home/peter.maydell/qemu/hw/net/i82596.c:657:30: error: comparison of > unsigned expression >= 0 is always true [-Werror=type-limits] > assert(bufsz >= 0); > ^ > /home/peter.maydell/qemu/hw/net/i82596.c:657:30: error: comparison of > unsigned expression >= 0 is always true [-Werror=type-limits] > assert(bufsz >= 0); > ^ > > > For the first error, I think this needs squashing into > "hw/net: Make NetCanReceive() return a boolean": > > diff --git a/hw/net/allwinner-sun8i-emac.c b/hw/net/allwinner-sun8i-emac.c > index fc67a1be70..28637ff4c1 100644 > --- a/hw/net/allwinner-sun8i-emac.c > +++ b/hw/net/allwinner-sun8i-emac.c > @@ -395,7 +395,7 @@ static void > allwinner_sun8i_emac_flush_desc(FrameDescriptor *desc, > cpu_physical_memory_write(phys_addr, desc, sizeof(*desc)); > } > > -static int allwinner_sun8i_emac_can_receive(NetClientState *nc) > +static bool allwinner_sun8i_emac_can_receive(NetClientState *nc) > { > AwSun8iEmacState *s = qemu_get_nic_opaque(nc); > FrameDescriptor desc; > > > Squashing this into my > "hw/net/i82596.c: Avoid reading off end of buffer in i82596_receive()" > commit fixes the second error. > > diff --git a/hw/net/i82596.c b/hw/net/i82596.c > index a9bdbac339..055c3a1470 100644 > --- a/hw/net/i82596.c > +++ b/hw/net/i82596.c > @@ -653,8 +653,8 @@ ssize_t i82596_receive(NetClientState *nc, const > uint8_t *buf, size_t sz) > > if (bufcount > 0) { > /* Still some of the actual data buffer to transfer */ > + assert(bufsz >= bufcount); > bufsz -= bufcount; > - assert(bufsz >= 0); > address_space_write(&address_space_memory, rba, > MEMTXATTRS_UNSPECIFIED, buf, bufcount); > rba += bufcount; > > thanks > -- PMM > Right, will fix them. Thanks