From: Julia Lawall Date: Sat, 14 Nov 2015 10:07:01 +0000 (+0100) Subject: vfio-pci: constify pci_error_handlers structures X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d10f4e0797597a31f2724b46e619ee10d8eb501;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git vfio-pci: constify pci_error_handlers structures 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 Signed-off-by: Alex Williamson --- diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 32b88bd2c82c..2760a7ba3f30 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c @@ -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, };