Re: [PATCH 1/2 RESEND v10] x86/mm, resource: add a new I/O resource descriptor 'IORES_DESC_RESERVED'

From: Borislav Petkov
Date: Thu Apr 18 2019 - 09:26:52 EST


On Thu, Apr 18, 2019 at 01:17:03PM +0000, Lendacky, Thomas wrote:
> You could probably make this unsigned int for now since you're creating
> the new enum used to assign to this variable and it only uses two bits
> currently.

Right.

> > + if (res->desc & (IORES_DESC_NONE | IORES_DESC_RESERVED))
> > + return 0;
>
> The IORES_DESC_xxxx enums are not bits, just sequential numbers, so you
> won't be able to test them this way. You can probably get away with a
> switch statement here.

Ah, good catch. I thought they're BITs too. Oh well.

Thx.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.