On Mon, 11 Mar 2024 at 19:11, Klaus Jensen <i...@irrelevant.dk> wrote:
>
> From: Klaus Jensen <k.jen...@samsung.com>
>
> Hi,
>
> The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f:
>
>   Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into staging 
> (2024-03-09 20:12:21 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/birkelund/qemu.git tags/nvme-next-pull-request
>
> for you to fetch changes up to a1505d799232939bf90c1b3e1fc20e81cd398404:
>
>   hw/nvme: add machine compatibility parameter to enable msix exclusive bar 
> (2024-03-11 20:07:41 +0100)
>
> ----------------------------------------------------------------
> hw/nvme updates
> -----BEGIN PGP SIGNATURE-----
>
> iQEzBAABCgAdFiEEUigzqnXi3OaiR2bATeGvMW1PDekFAmXvVsYACgkQTeGvMW1P
> DemWtwf9HU3cjtvCp8AeHGoPFTwp8/Vx3cQlQ6ilADKSDm44up2+M504xE/Mdviv
> 6y3PTPe1yiEpg/MbjWTX/df5lo+VdNoCuCyjph9mea0s1QAjCfVpl+KLMUVF/Oj5
> y1Iz9PQqOVDJ3O4xlgmPTfd8NXE/frNJaiXAjFuBxF2+4lilD5kMxpyu7DXbLiy2
> Szd1I3DhFAEOLEbrSSRDI3Fpy0KBdRzdKuUfmRdrHzbmhzHJefW7wnZ3aAiDboaD
> Ny7y/aovmjGymMp9GrBKWhUFPfSUtJ8l8j4Z7acQs+VDxg8lcAHCJKOyqCBTspUL
> PSnDe6E/CRyjrG2fUVXTLb6YW1eibQ==
> =Ld7a
> -----END PGP SIGNATURE-----

Hi; I'm afraid this fails to build for some jobs, eg
https://gitlab.com/qemu-project/qemu/-/jobs/6373091994
https://gitlab.com/qemu-project/qemu/-/jobs/6373091978
https://gitlab.com/qemu-project/qemu/-/jobs/6373091975

../hw/nvme/ctrl.c: In function ‘nvme_realize’:
../hw/nvme/ctrl.c:8146:15: error: ‘msix_pba_offset’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
8146 | ret = msix_init(pci_dev, n->params.msix_qsize,
     | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8147 | &n->bar0, 0, msix_table_offset,
     | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8148 | &n->bar0, 0, msix_pba_offset, 0, errp);
     | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../hw/nvme/ctrl.c:8099:33: note: ‘msix_pba_offset’ was declared here
8099 | unsigned msix_table_offset, msix_pba_offset;
     | ^~~~~~~~~~~~~~~
../hw/nvme/ctrl.c:8135:9: error: ‘msix_table_offset’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
8135 | memory_region_init_io(&n->iomem, OBJECT(n), &nvme_mmio_ops, n, "nvme",
     | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8136 | msix_table_offset);
     | ~~~~~~~~~~~~~~~~~~
../hw/nvme/ctrl.c:8099:14: note: ‘msix_table_offset’ was declared here
8099 | unsigned msix_table_offset, msix_pba_offset;
     | ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


I think this is because the compiler notices that nvme_mbar_size() has
an early-exit code path which never initializes *msix_table_offset
and *msix-pba_offset.

thanks
-- PMM

Reply via email to