mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
fatfs: fix build warning with 64k PAGE_SIZE
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. [FAT spec says: logical_sector_size should be 512, 1024, 2048 4096] So, at least for now, we limit it to 4096. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0607fd0258
commit
9f354858b8
1 changed files with 1 additions and 1 deletions
|
@ -1226,7 +1226,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
|
||||||
le16_to_cpu(get_unaligned((__le16 *)&b->sector_size));
|
le16_to_cpu(get_unaligned((__le16 *)&b->sector_size));
|
||||||
if (!is_power_of_2(logical_sector_size)
|
if (!is_power_of_2(logical_sector_size)
|
||||||
|| (logical_sector_size < 512)
|
|| (logical_sector_size < 512)
|
||||||
|| (PAGE_CACHE_SIZE < logical_sector_size)) {
|
|| (logical_sector_size > 4096)) {
|
||||||
if (!silent)
|
if (!silent)
|
||||||
printk(KERN_ERR "FAT: bogus logical sector size %u\n",
|
printk(KERN_ERR "FAT: bogus logical sector size %u\n",
|
||||||
logical_sector_size);
|
logical_sector_size);
|
||||||
|
|
Loading…
Add table
Reference in a new issue