vfio-pci: constify pci_error_handlers structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 14 Nov 2015 10:07:01 +0000 (11:07 +0100)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 19 Nov 2015 23:53:07 +0000 (16:53 -0700)
This pci_error_handlers structure is never modified, like all the other
pci_error_handlers structures, so declare it as const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/vfio_pci.c

index 32b88bd2c82c7e3a3f4cd8cae11a253a171c76fa..2760a7ba3f309d1a344781c2f9a4eb6c3b3ff4aa 100644 (file)
@@ -1035,7 +1035,7 @@ static pci_ers_result_t vfio_pci_aer_err_detected(struct pci_dev *pdev,
        return PCI_ERS_RESULT_CAN_RECOVER;
 }
 
-static struct pci_error_handlers vfio_err_handlers = {
+static const struct pci_error_handlers vfio_err_handlers = {
        .error_detected = vfio_pci_aer_err_detected,
 };