[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH for-4.11 3/3] vpci/msi: fix size of the vectors fields
The current size (5bits) is not enough to store the maximum number of vectors (32), bump it by one bit. Note that the size of the struct is still the same. Reported-by: Coverity Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/include/xen/vpci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/include/xen/vpci.h b/xen/include/xen/vpci.h index cb39e0ebea..fac12a1c42 100644 --- a/xen/include/xen/vpci.h +++ b/xen/include/xen/vpci.h @@ -100,7 +100,7 @@ struct vpci { /* Data. */ uint16_t data; /* Maximum number of vectors supported by the device. */ - uint8_t max_vectors : 5; + uint8_t max_vectors : 6; /* Enabled? */ bool enabled : 1; /* Supports per-vector masking? */ @@ -108,7 +108,7 @@ struct vpci { /* 64-bit address capable? */ bool address64 : 1; /* Number of vectors configured. */ - uint8_t vectors : 5; + uint8_t vectors : 6; /* Arch-specific data. */ struct vpci_arch_msi arch; } *msi; -- 2.16.2 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |