Re: [PATCH] ACPI, APEI, Fix use resource_size

From: Rafael J. Wysocki
Date: Sat Dec 16 2017 - 05:43:37 EST


On Sat, Dec 16, 2017 at 11:34 AM, Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> On Thu, Dec 14, 2017 at 10:37 AM, Borislav Petkov <bp@xxxxxxxxx> wrote:
>> On Thu, Dec 14, 2017 at 12:07:30AM +0100, Rafael J. Wysocki wrote:
>>> Which is exactly why you've got this question at all. ;-)
>>
>> So you're saying, you've got your minions to do review for you - you can
>> lay back and play all managerial now, huh?
>>
>> :-P
>>
>>> OK, let's queue it up for 4.16, then.
>>
>> Yeah, just keep an eye on reports of mapping errors...
>
> This appears to cause sparse to complain:
> drivers/acpi/apei/apei-base.c:509:21: sparse: incorrect type in
> argument 1 (different base types)
>
> It looks like that's a false-positive to me, though.

Ah, OK

It is not a false-positive.

The argument of resource_size() is (const struct resource *) and res
is of type (struct apei_res *).

I'm dropping this one.