diff options
author | Dexuan Cui <decui@microsoft.com> | 2016-08-23 00:46:39 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-09-06 13:20:44 -0400 |
commit | 7d0f8eec976ae5a364af84fd8e92f6da9ec05a41 (patch) | |
tree | af6e352380a79fb63895566ea0afff775b1415a4 | |
parent | 0c6045d8c0eff0f7784f310407ccad44f622aa40 (diff) |
PCI: hv: Use pci_function_description[0] in struct definitions
The 2 structs can use a zero-length array here, because dynamic memory of
the correct size is allocated in hv_pci_devices_present() and we don't need
this extra element.
No functional change.
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: KY Srinivasan <kys@microsoft.com>
CC: Jake Oshins <jakeo@microsoft.com>
CC: Haiyang Zhang <haiyangz@microsoft.com>
CC: Vitaly Kuznetsov <vkuznets@redhat.com>
-rw-r--r-- | drivers/pci/host/pci-hyperv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-hyperv.c b/drivers/pci/host/pci-hyperv.c index 6fa40f111962..735fcc5aacc1 100644 --- a/drivers/pci/host/pci-hyperv.c +++ b/drivers/pci/host/pci-hyperv.c | |||
@@ -259,7 +259,7 @@ struct pci_bus_d0_entry { | |||
259 | struct pci_bus_relations { | 259 | struct pci_bus_relations { |
260 | struct pci_incoming_message incoming; | 260 | struct pci_incoming_message incoming; |
261 | u32 device_count; | 261 | u32 device_count; |
262 | struct pci_function_description func[1]; | 262 | struct pci_function_description func[0]; |
263 | } __packed; | 263 | } __packed; |
264 | 264 | ||
265 | struct pci_q_res_req_response { | 265 | struct pci_q_res_req_response { |
@@ -394,7 +394,7 @@ struct hv_dr_work { | |||
394 | struct hv_dr_state { | 394 | struct hv_dr_state { |
395 | struct list_head list_entry; | 395 | struct list_head list_entry; |
396 | u32 device_count; | 396 | u32 device_count; |
397 | struct pci_function_description func[1]; | 397 | struct pci_function_description func[0]; |
398 | }; | 398 | }; |
399 | 399 | ||
400 | enum hv_pcichild_state { | 400 | enum hv_pcichild_state { |