[PATCH] page-types: unsigned cannot be less than 0 in add_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If not signed, testing of the read() return value in this function
will not work.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
Or is long too small?

diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
index fa1a30d..d8a799a 100644
--- a/Documentation/vm/page-types.c
+++ b/Documentation/vm/page-types.c
@@ -416,7 +416,7 @@ static void add_page(unsigned long offset, uint64_t flags)
 static void walk_pfn(unsigned long index, unsigned long count)
 {
 	unsigned long batch;
-	unsigned long n;
+	long n;
 	unsigned long i;
 
 	if (index > ULONG_MAX / KPF_BYTES)
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux