2006-01-08 03:03:22

by Con Kolivas

[permalink] [raw]
Subject: Re: Typo in include/linux/mmzone.h

On Sunday 08 January 2006 08:54, Marco Costalba wrote:
> Hi,
>
> probably there is a typo in your last patch:
> [PATCH] mm: add populated_zone() helper
>
> In
>
> +++ b/include/linux/mmzone.h
> @@ -388,6 +388,11 @@ static inline struct zone *next_zone(str
> #define for_each_zone(zone) \
> for (zone = pgdat_list->node_zones; zone; zone = next_zone(zone))
>
> +static inline int populated_zone(struct zone *zone)
> +{
> + return (!!zone->present_pages);
> +}
> +

No typo there at all. !! guarantees return of 1.

Cheers,
Con


2006-01-08 12:00:44

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Typo in include/linux/mmzone.h

>>
>> +static inline int populated_zone(struct zone *zone)
>> +{
>> + return (!!zone->present_pages);
>> +}
>> +
>
>No typo there at all. !! guarantees return of 1.
>
But we do not need the parentheses around it.


Jan Engelhardt
--
| Alphagate Systems, http://alphagate.hopto.org/
| jengelh's site, http://jengelh.hopto.org/