Skip to content

Commit 7d0f8ee

Browse files
dcuibjorn-helgaas
authored andcommitted
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 <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: KY Srinivasan <[email protected]> CC: Jake Oshins <[email protected]> CC: Haiyang Zhang <[email protected]> CC: Vitaly Kuznetsov <[email protected]>
1 parent 0c6045d commit 7d0f8ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/host/pci-hyperv.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ struct pci_bus_d0_entry {
259259
struct pci_bus_relations {
260260
struct pci_incoming_message incoming;
261261
u32 device_count;
262-
struct pci_function_description func[1];
262+
struct pci_function_description func[0];
263263
} __packed;
264264

265265
struct pci_q_res_req_response {
@@ -394,7 +394,7 @@ struct hv_dr_work {
394394
struct hv_dr_state {
395395
struct list_head list_entry;
396396
u32 device_count;
397-
struct pci_function_description func[1];
397+
struct pci_function_description func[0];
398398
};
399399

400400
enum hv_pcichild_state {

0 commit comments

Comments
 (0)