]> www.infradead.org Git - users/dwmw2/qemu.git/commit
hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 15 Aug 2024 13:52:45 +0000 (14:52 +0100)
committerCédric Le Goater <clg@redhat.com>
Tue, 17 Sep 2024 08:37:55 +0000 (10:37 +0200)
commit4bd683d6f19dfe05a628af5deca2009e2a1783bf
tree146dc87f7b4e4964c00087b80a5a2748c54ee9f5
parentea9cdbcf3a0b8d5497cddf87990f1b39d8f3bb0a
hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup()

The tracepoint trace_vfio_msix_early_setup() uses "int" for the type
of the table_bar argument, but we use this to print a uint32_t.
Coverity warns that this means that we could end up treating it as a
negative number.

We only use this in printing the value in the tracepoint, so
mishandling it as a negative number would be harmless, but it's
better to use the right type in the tracepoint.  Use uint64_t to
match how we print the table_offset in the vfio_msix_relo()
tracepoint.

Resolves: Coverity CID 1547690
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/trace-events