Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1306608
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 2/2] ACPI: amba bus probing support |
| Date | 2016-01-11 20:10 +0100 |
| Message-ID | <qPQ0P-6AV-27@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <qPKHM-2Wj-33@gated-at.bofh.it> <qPMqe-46s-13@gated-at.bofh.it> <qPMzW-4ae-67@gated-at.bofh.it> <qPNvZ-4Q9-29@gated-at.bofh.it> <qPOs2-5vv-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jan 11, 2016 at 7:24 PM, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Mon, Jan 11, 2016 at 06:26:00PM +0200, Andy Shevchenko wrote: >> On Mon, Jan 11, 2016 at 5:27 PM, Russell King - ARM Linux >> <linux@arm.linux.org.uk> wrote: >> > On Mon, Jan 11, 2016 at 05:13:20PM +0200, Andy Shevchenko wrote: >> >> On Mon, Jan 11, 2016 at 3:26 PM, Aleksey Makarov >> >> <aleksey.makarov@linaro.org> wrote: >> >> dev->res is 0 before this one, right? Could you use this fact instead >> >> of address_found flag? >> > >> > amba_device_alloc() zero-initialises everything. However, dev->res is >> > a struct resource, and I'd prefer _this_ method that the OT is using >> > to testing some random part of struct resource. >> >> So, you mean resource->start = 0 is not enough reliable? > > I'd rather not make assumptions about what in a resource is valid > or not valid. Fair enough. >> >> > + default: >> >> > + dev_warn(&adev->dev, "Invalid resource\n"); >> >> >> >> Why? Isn't possible to have other resources for the devices? >> > >> > AMBA primecell devices have one memory region, and a number of >> > interrupts. Other resource types don't make sense. >> >> But isn't warning on the other side too noisy? > > Why would it be "too noisy" ? Isn't it saying that the ACPI is in > error to include more resource types that aren't part of specifying > the AMBA primecell device? Maybe it should be dev_err(), because > it's technically an error... > > Are you expecting people to create ACPI tables with a lot of rubbish > resources attached to these devices? I'm expecting broken ACPI tables coming from some vendors which is often the case for some devices. I would rather leave it as a warning or move to less verbose level. >> Yes, and in this case ret > 0 should be converted to an appropriate >> error code, otherwise ACPI core will consider this as a normal >> execution, right? > > You are assuming that it does return a positive non-zero value in the > first place. Frankly, I didn't check what that function can return, but I'm sure that if it will return positive value at some point this will print a message and tell ACPI that everything okay when it's not. So, here I suppose to have explicit check for that, or at least (if you believe that above will never happen) to show that only negative numbers are possible as error values. However, I will not insist if Rafael is okay with the original code. -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v5 0/2] ACPI: amba bus probing support Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-01-11 14:30 +0100
[PATCH v5 1/2] ACPI: introduce a function to find the first physical device Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-01-11 14:30 +0100
Re: [PATCH v5 1/2] ACPI: introduce a function to find the first physical device Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-01-11 15:50 +0100
Re: [PATCH v5 1/2] ACPI: introduce a function to find the first physical device Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-01-11 15:50 +0100
[PATCH v5 2/2] ACPI: amba bus probing support Aleksey Makarov <aleksey.makarov@linaro.org> - 2016-01-11 14:30 +0100
Re: [PATCH v5 2/2] ACPI: amba bus probing support Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-11 16:10 +0100
Re: [PATCH v5 2/2] ACPI: amba bus probing support Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-01-11 16:20 +0100
Re: [PATCH v5 2/2] ACPI: amba bus probing support Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-11 16:30 +0100
Re: [PATCH v5 2/2] ACPI: amba bus probing support Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-01-11 17:30 +0100
Re: [PATCH v5 2/2] ACPI: amba bus probing support Russell King - ARM Linux <linux@arm.linux.org.uk> - 2016-01-11 18:30 +0100
Re: [PATCH v5 2/2] ACPI: amba bus probing support Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-01-11 20:10 +0100
csiph-web