Skip to content

Commit

Permalink
arch/tile: fix pointer cast in cacheflush.c
Browse files Browse the repository at this point in the history
Pragmatically it couldn't be wrong to cast pointers to long to compare
them (since all kernel addresses are in the top half of VA space),
but it's more correct to cast to unsigned long.

Signed-off-by: Chris Metcalf <[email protected]>
  • Loading branch information
cmetcalf-tilera committed Apr 2, 2012
1 parent 2858f85 commit 918cbd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/tile/lib/cacheflush.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void finv_buffer_remote(void *buffer, size_t size, int hfh)

/* Figure out how far back we need to go. */
base = p - (step_size * (load_count - 2));
if ((long)base < (long)buffer)
if ((unsigned long)base < (unsigned long)buffer)
base = buffer;

/*
Expand Down

0 comments on commit 918cbd3

Please sign in to comment.