提交 09232c7a 编写于 作者: K Kishon Vijay Abraham I 提交者: Bjorn Helgaas

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: NKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: NSekhar Nori <nsekhar@ti.com>
Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
上级 52c9285d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册