diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-11-13 19:34:44 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-24 18:30:08 -0500 |
commit | 987c367b4e93be6826394e7c9cc14d28bb5c8810 (patch) | |
tree | 822f6e71b813b8c424f1dc4fdaed726372b623c3 /arch/x86/pci/mmconfig-shared.c | |
parent | 3f0f5503926f7447615f083c2d57545a83b6357c (diff) |
x86/PCI: MMCONFIG: remove typeof so we can use a list
This replaces "typeof(pci_mmcfg_config[0])" with the actual type because
I plan to convert pci_mmcfg_config to a list, and then "pci_mmcfg_config[0]"
won't mean anything.
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/mmconfig-shared.c')
-rw-r--r-- | arch/x86/pci/mmconfig-shared.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 90422b4a7c91..6eeeac0d25f4 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -277,8 +277,8 @@ static struct pci_mmcfg_hostbridge_probe pci_mmcfg_probes[] __initdata = { | |||
277 | 277 | ||
278 | static int __init cmp_mmcfg(const void *x1, const void *x2) | 278 | static int __init cmp_mmcfg(const void *x1, const void *x2) |
279 | { | 279 | { |
280 | const typeof(pci_mmcfg_config[0]) *m1 = x1; | 280 | const struct pci_mmcfg_region *m1 = x1; |
281 | const typeof(pci_mmcfg_config[0]) *m2 = x2; | 281 | const struct pci_mmcfg_region *m2 = x2; |
282 | int start1, start2; | 282 | int start1, start2; |
283 | 283 | ||
284 | start1 = m1->start_bus; | 284 | start1 = m1->start_bus; |
@@ -290,7 +290,7 @@ static int __init cmp_mmcfg(const void *x1, const void *x2) | |||
290 | static void __init pci_mmcfg_check_end_bus_number(void) | 290 | static void __init pci_mmcfg_check_end_bus_number(void) |
291 | { | 291 | { |
292 | int i; | 292 | int i; |
293 | typeof(pci_mmcfg_config[0]) *cfg, *cfgx; | 293 | struct pci_mmcfg_region *cfg, *cfgx; |
294 | 294 | ||
295 | /* sort them at first */ | 295 | /* sort them at first */ |
296 | sort(pci_mmcfg_config, pci_mmcfg_config_num, | 296 | sort(pci_mmcfg_config, pci_mmcfg_config_num, |
@@ -438,7 +438,7 @@ static int __init is_acpi_reserved(u64 start, u64 end, unsigned not_used) | |||
438 | typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); | 438 | typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); |
439 | 439 | ||
440 | static int __init is_mmconf_reserved(check_reserved_t is_reserved, | 440 | static int __init is_mmconf_reserved(check_reserved_t is_reserved, |
441 | int i, typeof(pci_mmcfg_config[0]) *cfg, int with_e820) | 441 | int i, struct pci_mmcfg_region *cfg, int with_e820) |
442 | { | 442 | { |
443 | u64 addr = cfg->res.start; | 443 | u64 addr = cfg->res.start; |
444 | u64 size = resource_size(&cfg->res); | 444 | u64 size = resource_size(&cfg->res); |
@@ -479,7 +479,7 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved, | |||
479 | 479 | ||
480 | static void __init pci_mmcfg_reject_broken(int early) | 480 | static void __init pci_mmcfg_reject_broken(int early) |
481 | { | 481 | { |
482 | typeof(pci_mmcfg_config[0]) *cfg; | 482 | struct pci_mmcfg_region *cfg; |
483 | int i; | 483 | int i; |
484 | 484 | ||
485 | if (pci_mmcfg_config_num == 0) | 485 | if (pci_mmcfg_config_num == 0) |