summaryrefslogtreecommitdiffstats
path: root/drivers/pci/endpoint
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2017-08-18 20:27:57 +0530
committerBjorn Helgaas <bhelgaas@google.com>2017-08-29 16:00:37 -0500
commit09232c7acbd451c6da555ffdebad82661bf3d0be (patch)
treec19cb366c046bc887db4075f3ec6b3c9a0c86a39 /drivers/pci/endpoint
parent52c9285d47459cf241e144c7d8ef15941ba1b181 (diff)
downloadlinux-0-day-09232c7acbd451c6da555ffdebad82661bf3d0be.tar.gz
linux-0-day-09232c7acbd451c6da555ffdebad82661bf3d0be.tar.xz
PCI: endpoint: Add "volatile" to pci_epf_test_reg
struct pci_epf_test_reg is the MEMSPACE of pci-epf-test function driver that will be accessed by the "host" for programming the pci-epf-test device. So this structure shouldn't be subjected to compiler optimization in pci_epf_test_cmd_handler() since the values can be changed by code outside the scope of current code at any time. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/endpoint')
-rw-r--r--drivers/pci/endpoint/functions/pci-epf-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index 53fff80303370..5cbc05a0762d2 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -267,7 +267,7 @@ static void pci_epf_test_cmd_handler(struct work_struct *work)
cmd_handler.work);
struct pci_epf *epf = epf_test->epf;
struct pci_epc *epc = epf->epc;
- struct pci_epf_test_reg *reg = epf_test->reg[0];
+ volatile struct pci_epf_test_reg *reg = epf_test->reg[0];
if (!reg->command)
goto reset_handler;