Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636508 > unrolled thread

Re: [PATCH v5 13/32] x86/boot/e820: Add support to determine the E820 type of an address

Started byBorislav Petkov <bp@alien8.de>
First post2017-05-05 19:20 +0200
Last post2017-05-06 09:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v5 13/32] x86/boot/e820: Add support to determine the  E820 type of an address Borislav Petkov <bp@alien8.de> - 2017-05-05 19:20 +0200
    Re: [PATCH v5 13/32] x86/boot/e820: Add support to determine the E820  type of an address Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-05-06 09:50 +0200

#1636508 — Re: [PATCH v5 13/32] x86/boot/e820: Add support to determine the E820 type of an address

FromBorislav Petkov <bp@alien8.de>
Date2017-05-05 19:20 +0200
SubjectRe: [PATCH v5 13/32] x86/boot/e820: Add support to determine the E820 type of an address
Message-ID<tDP3A-4H2-9@gated-at.bofh.it>
On Tue, Apr 18, 2017 at 04:18:31PM -0500, Tom Lendacky wrote:
> Add a function that will return the E820 type associated with an address
> range.

...

> @@ -110,9 +111,28 @@ bool __init e820__mapped_all(u64 start, u64 end, enum e820_type type)
>  		 * coverage of the desired range exists:
>  		 */
>  		if (start >= end)
> -			return 1;
> +			return entry;
>  	}
> -	return 0;
> +
> +	return NULL;
> +}
> +
> +/*
> + * This function checks if the entire range <start,end> is mapped with type.
> + */
> +bool __init e820__mapped_all(u64 start, u64 end, enum e820_type type)
> +{
> +	return __e820__mapped_all(start, end, type) ? 1 : 0;

	return !!__e820__mapped_all(start, end, type);

-- 
Regards/Gruss,
    Boris.

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

[toc] | [next] | [standalone]


#1636838 — Re: [PATCH v5 13/32] x86/boot/e820: Add support to determine the E820 type of an address

FromArd Biesheuvel <ard.biesheuvel@linaro.org>
Date2017-05-06 09:50 +0200
SubjectRe: [PATCH v5 13/32] x86/boot/e820: Add support to determine the E820 type of an address
Message-ID<tE2Dv-5c1-3@gated-at.bofh.it>
In reply to#1636508
On 5 May 2017 at 18:11, Borislav Petkov <bp@alien8.de> wrote:
> On Tue, Apr 18, 2017 at 04:18:31PM -0500, Tom Lendacky wrote:
>> Add a function that will return the E820 type associated with an address
>> range.
>
> ...
>
>> @@ -110,9 +111,28 @@ bool __init e820__mapped_all(u64 start, u64 end, enum e820_type type)
>>                * coverage of the desired range exists:
>>                */
>>               if (start >= end)
>> -                     return 1;
>> +                     return entry;
>>       }
>> -     return 0;
>> +
>> +     return NULL;
>> +}
>> +
>> +/*
>> + * This function checks if the entire range <start,end> is mapped with type.
>> + */
>> +bool __init e820__mapped_all(u64 start, u64 end, enum e820_type type)
>> +{
>> +     return __e820__mapped_all(start, end, type) ? 1 : 0;
>
>         return !!__e820__mapped_all(start, end, type);
>

Even the !! double negation is redundant, given that the function returns bool.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web