Maybe I'm beating a dead horse, but here's what I came up with:
include/linux/mmzone.h:640:22: warning: potentially expensive pointer
subtraction
Using arch/x86/mm/highmem_32.o as an example, line 82, PageHighMem
expands to is_highmem.
if (!PageHighMem(page))
return page
include/linux/mmzone.h:640:22: warning: potentially expensive pointer
subtraction
Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]>
---
Linus, something like the following?
include/linux/mmzone.h |7 ---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/mmzon
On Fri, 8 Feb 2008, Linus Torvalds wrote:
>
> It would probably make more sense to just write it as something like
>
> struct zone *base = zone->zone_pgdat->node_zones;
>
> if (zone == base + ZONE_HIGHMEM ||
> (zone == base + ZONE_MOVABLE && zone_movable_is_highmem())
* Linus Torvalds <[EMAIL PROTECTED]> wrote:
> Heh, yeah. That's a very odd way to write it.
>
> It would probably make more sense to just write it as something like
>
> struct zone *base = zone->zone_pgdat->node_zones;
>
> if (zone == base + ZONE_HIGHMEM ||
> (zone ==
On Fri, 2008-02-08 at 14:04 -0800, Linus Torvalds wrote:
>
> On Fri, 8 Feb 2008, Andrew Morton wrote:
> > > #ifdef CONFIG_HIGHMEM
> > > - int zone_idx = zone - zone->zone_pgdat->node_zones;
> > > - return zone_idx == ZONE_HIGHMEM ||
> > > - (zone_idx == ZONE_MOVABLE && zone_movable_is_hig
On Fri, 8 Feb 2008, Andrew Morton wrote:
> > #ifdef CONFIG_HIGHMEM
> > - int zone_idx = zone - zone->zone_pgdat->node_zones;
> > - return zone_idx == ZONE_HIGHMEM ||
> > - (zone_idx == ZONE_MOVABLE && zone_movable_is_highmem());
> > + const int highmem_off = ZONE_HIGHMEM * sizeof
On Thu, 07 Feb 2008 12:52:23 -0800
Harvey Harrison <[EMAIL PROTECTED]> wrote:
> include/linux/mmzone.h:640:22: warning: potentially expensive pointer
> subtraction
>
> The code in question was doing a pointer subtraction to find the index of
> the zone argument in the node_zones array. This ess
include/linux/mmzone.h:640:22: warning: potentially expensive pointer
subtraction
The code in question was doing a pointer subtraction to find the index of
the zone argument in the node_zones array. This essentially boils down to:
((unsigned long)zone - (unsigned
long)zone->zone_pgdat->node_zo
8 matches
Mail list logo