From 2b434157fb69ed6fb617af763e0d89718461c5c8 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Tue, 1 Sep 2026 10:00:48 +0200 Subject: [PATCH] PCI/physdev: address Misra 2.1 rule violation Cases 0..3 are handled, and a 2-bit mask is applied to the switch() expression. Therefore the default: case is reported unreachable by Eclair. Insert BUILD_ERROR() to annotate this for Eclair. No functional change. Signed-off-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/drivers/pci/physdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/pci/physdev.c b/xen/drivers/pci/physdev.c index d46501b884..5695c300f7 100644 --- a/xen/drivers/pci/physdev.c +++ b/xen/drivers/pci/physdev.c @@ -114,7 +114,7 @@ ret_t pci_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) break; default: - ret = -EINVAL; + BUILD_ERROR("PCI_DEVICE_RESET_* inconsistency"); break; } write_unlock(&pdev->domain->pci_lock);