Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1311520
| From | Tomasz Nowicki <tn@semihalf.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 20/21] pci, acpi: Match PCI config space accessors against platfrom specific quirks. |
| Date | 2016-01-18 13:50 +0100 |
| Message-ID | <qShpT-GJ-5@gated-at.bofh.it> (permalink) |
| References | <qQtES-hT-3@gated-at.bofh.it> <qQtES-hT-23@gated-at.bofh.it> <qQSaf-yO-47@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 14.01.2016 16:36, Mark Salter wrote:
>> +extern struct pci_mcfg_fixup __start_acpi_mcfg_fixups[];
>> >+extern struct pci_mcfg_fixup __end_acpi_mcfg_fixups[];
>> >+
>> >+static struct pci_ops *pci_mcfg_check_quirks(struct acpi_pci_root *root)
>> >+{
>> >+ struct pci_mcfg_fixup *f;
>> >+ int bus_num = root->secondary.start;
>> >+ int domain = root->segment;
>> >+
>> >+ /*
>> >+ * First match against PCI topology <domain:bus> then use DMI or
>> >+ * custom match handler.
>> >+ */
>> >+ for (f = __start_acpi_mcfg_fixups; f < __end_acpi_mcfg_fixups; f++) {
>> >+ if ((f->domain == domain || f->domain == PCI_MCFG_DOMAIN_ANY) &&
>> >+ (f->bus_num == bus_num || f->bus_num == PCI_MCFG_BUS_ANY) &&
>> >+ (f->system ? dmi_check_system(f->system) : 0 ||
>> >+ f->match ? f->match(f, root) : 0))
>> >+ return f->ops;
> I think this would be better as:
>
> (f->system ? dmi_check_system(f->system) : 1 &&
> f->match ? f->match(f, root) : 1))
> return f->ops;
>
> Otherwise, one has to call dmi_check_system() from f->match() if
> access to root is needed.
Makes a lot of sense to me, I will modify as you suggested.
Tomasz
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH V3 20/21] pci, acpi: Match PCI config space accessors against platfrom specific quirks. Tomasz Nowicki <tn@semihalf.com> - 2016-01-18 13:50 +0100
Re: [PATCH V3 20/21] pci, acpi: Match PCI config space accessors against platfrom specific quirks. "liudongdong (C)" <liudongdong3@huawei.com> - 2016-01-19 03:00 +0100
Re: [PATCH V3 20/21] pci, acpi: Match PCI config space accessors against platfrom specific quirks. Tomasz Nowicki <tn@semihalf.com> - 2016-01-19 09:00 +0100
Re: [PATCH V3 20/21] pci, acpi: Match PCI config space accessors against platfrom specific quirks. "liudongdong (C)" <liudongdong3@huawei.com> - 2016-01-19 10:00 +0100
csiph-web