projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c6045d
)
PCI: hv: Use pci_function_description[0] in struct definitions
author
Dexuan Cui
<
[email protected]
>
Tue, 23 Aug 2016 04:46:39 +0000
(
04:46
+0000)
committer
Bjorn Helgaas
<
[email protected]
>
Tue, 6 Sep 2016 17:20:44 +0000
(12:20 -0500)
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]
>
drivers/pci/host/pci-hyperv.c
patch
|
blob
|
history
diff --git
a/drivers/pci/host/pci-hyperv.c
b/drivers/pci/host/pci-hyperv.c
index 6fa40f11196261ac6049a12de2b6ccb225038913..735fcc5aacc1ccd1ddbe1a7fd4e4da8f88b516cc 100644
(file)
--- a/
drivers/pci/host/pci-hyperv.c
+++ b/
drivers/pci/host/pci-hyperv.c
@@
-259,7
+259,7
@@
struct pci_bus_d0_entry {
struct pci_bus_relations {
struct pci_incoming_message incoming;
u32 device_count;
- struct pci_function_description func[
1
];
+ struct pci_function_description func[
0
];
} __packed;
struct pci_q_res_req_response {
@@
-394,7
+394,7
@@
struct hv_dr_work {
struct hv_dr_state {
struct list_head list_entry;
u32 device_count;
- struct pci_function_description func[
1
];
+ struct pci_function_description func[
0
];
};
enum hv_pcichild_state {