aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-06-16 18:14:00 -0400
committerTony Luck <tony.luck@intel.com>2005-06-16 19:27:14 -0400
commit986a80d5c154808cc78170584670324a22fd8219 (patch)
tree11cc27ed20f65d1693ad2883a8606fbd7822888d /include/linux/efi.h
parent4845f3333765b732aa2d7ea6d72fd03cfec4fbf3 (diff)
[PATCH] avoid signed vs unsigned comparison in efi_range_is_wc()
warning when building with gcc -W : include/linux/efi.h: In function `efi_range_is_wc': include/linux/efi.h:320: warning: comparison between signed and unsigned It looks to me like a significantly large 'len' passed in could cause the loop to never end. Isn't it safer to make 'i' an unsigned long as well? Like this little patch below (which of course also kills the warning) : Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 047e7222df7a..73781ec165b4 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -315,7 +315,7 @@ extern struct efi_memory_map memmap;
315 */ 315 */
316static inline int efi_range_is_wc(unsigned long start, unsigned long len) 316static inline int efi_range_is_wc(unsigned long start, unsigned long len)
317{ 317{
318 int i; 318 unsigned long i;
319 319
320 for (i = 0; i < len; i += (1UL << EFI_PAGE_SHIFT)) { 320 for (i = 0; i < len; i += (1UL << EFI_PAGE_SHIFT)) {
321 unsigned long paddr = __pa(start + i); 321 unsigned long paddr = __pa(start + i);