Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1694998
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/4] ACPI: Introduce DMA ranges parsing |
| Date | 2017-07-24 20:50 +0200 |
| Message-ID | <u6QAx-jq-1@gated-at.bofh.it> (permalink) |
| References | <u5kW6-lk-5@gated-at.bofh.it> <u5kW6-lk-17@gated-at.bofh.it> <u5OAN-277-17@gated-at.bofh.it> <u6IWn-3vE-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 24, 2017 at 12:40 PM, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Sat, Jul 22, 2017 at 12:15:42AM +0200, Rafael J. Wysocki wrote:
>
[cut]
>
>> > + return -EINVAL;
>> > + }
>> > +
>> > + ret = acpi_dev_get_dma_resources(adev, &list);
>> > + if (ret > 0) {
>> > + list_for_each_entry(rentry, &list, node) {
>> > + if (dma_offset && rentry->offset != dma_offset) {
>> > + ret = -EINVAL;
>> > + pr_warn("Can't handle multiple windows with different offsets\n");
>> > + goto out;
>> > + }
>> > + dma_offset = rentry->offset;
>> > +
>> > + /* Take lower and upper limits */
>> > + if (rentry->res->start < dma_start)
>> > + dma_start = rentry->res->start;
>> > + if (rentry->res->end > dma_end)
>> > + dma_end = rentry->res->end;
>> > + }
>> > +
>> > + if (dma_start >= dma_end) {
>> > + ret = -EINVAL;
>> > + pr_warn("Invalid DMA regions configuration\n");
>>
>> dev_warn()?
>>
>> And why _warn() and not _info()?
>
> Mmm..ok for the dev_ prefix - basically this would be a FW_BUG (I think
> this specific error condition is overkill TBH, the ACPI resource
> validation code should catch it before we even get here) not sure
> about downgrading it to _info() though, I would leave it at this
> loglevel - in particular in the offset check above:
>
> if (dma_offset && rentry->offset != dma_offset) {
> ret = -EINVAL;
> pr_warn("Can't handle multiple windows with different offsets\n");
> goto out;
> }
Well, so the "why" question above still has no answer ...
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 3/4] ACPI: Introduce DMA ranges parsing Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-20 16:50 +0200
Re: [PATCH 3/4] ACPI: Introduce DMA ranges parsing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-22 00:30 +0200
Re: [PATCH 3/4] ACPI: Introduce DMA ranges parsing Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-24 12:40 +0200
Re: [PATCH 3/4] ACPI: Introduce DMA ranges parsing "Rafael J. Wysocki" <rafael@kernel.org> - 2017-07-24 20:50 +0200
Re: [PATCH 3/4] ACPI: Introduce DMA ranges parsing Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-07-25 11:10 +0200
Re: [PATCH 3/4] ACPI: Introduce DMA ranges parsing "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-07-26 02:40 +0200
csiph-web