Re: [PATCH] fat: silence warning for 64KB PAGE_SIZE builds

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Olof Johansson
Date: Wednesday, November 7, 2007 - 8:01 am

Annoying gcc warning:

fs/fat/inode.c: In function 'fat_fill_super':
fs/fat/inode.c:1222: warning: comparison is always false due to limited range of data type

Change it to compare with 4K instead of PAGE_CACHE_SIZE, as suggested
by OGAWA-san.


Signed-off-by: Olof Johansson <olof@lixom.net>

---

On Wed, Nov 07, 2007 at 11:39:01PM +0900, OGAWA Hirofumi wrote:
[...]

Sure. New patch.


Thanks,

-Olof

diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 920a576..61e2874 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1219,7 +1219,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
 		le16_to_cpu(get_unaligned((__le16 *)&b->sector_size));
 	if (!is_power_of_2(logical_sector_size)
 	    || (logical_sector_size < 512)
-	    || (PAGE_CACHE_SIZE < logical_sector_size)) {
+	    || (logical_sector_size > 4096)) {
 		if (!silent)
 			printk(KERN_ERR "FAT: bogus logical sector size %u\n",
 			       logical_sector_size);
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] fat: silence warning for 64KB PAGE_SIZE builds, Olof Johansson, (Tue Nov 6, 10:15 pm)
Re: [PATCH] fat: silence warning for 64KB PAGE_SIZE builds, Olof Johansson, (Wed Nov 7, 8:01 am)