Re: [PATCH 10/12] PCI/physdev: address Misra 2.1 rule violation
Stefano Stabellini <[email protected]>
| Newsgroups | gmane.comp.emulators.xen.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 28 Aug 2026, Jan Beulich wrote: > 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 <[email protected]> Reviewed-by: Stefano Stabellini <[email protected]> > --- 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_ > break; > > default: > - ret = -EINVAL; > + BUILD_ERROR("PCI_DEVICE_RESET_* inconsistency"); > break; > } > write_unlock(&pdev->domain->pci_lock); >