Skip to contentSkip to conversation

Typo in include/linux/mmzone.h

DISCUSSION [email protected] 2 participants 2 messages Jan 8, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · Marco Costalba

Hi,

probably there is a typo in your last patch:
[PATCH] mm: add populated_zone() helper

In

+++ b/include/linux/mmzone.h

Review static inline struct zone *next_zone(str · line 395

Quoted 8 lines
(quoted diff) +5 -0
@@ -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

#2 lore raw
Quoted 9 lines

Review

Quoted 6 lines
(quoted diff) +5 -0
+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

Signature · 2 lines
| Alphagate Systems, http://alphagate.hopto.org/
| jengelh's site, http://jengelh.hopto.org/