diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2008-11-06 15:53:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-06 18:41:22 -0500 |
commit | c3302931db090d87e9015c3a7ce5c97a7dd90f78 (patch) | |
tree | d7a1f9a2769630d7cfbcfc6f69199dbf69396e36 | |
parent | 9ca59f4c3d28df14a1545a1e2832f34a0a50e3ed (diff) |
fat: i_blocks warning fix
blkcnt_t type depends on CONFIG_LSF. Use unsigned long long always for
printk(). But lazy to type it, so add "llu" and use it.
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>
-rw-r--r-- | fs/fat/dir.c | 2 | ||||
-rw-r--r-- | fs/fat/fat.h | 3 | ||||
-rw-r--r-- | fs/fat/fatent.c | 5 | ||||
-rw-r--r-- | fs/fat/misc.c | 5 |
4 files changed, 9 insertions, 6 deletions
diff --git a/fs/fat/dir.c b/fs/fat/dir.c index 2ecaa17acdb5..67e058357098 100644 --- a/fs/fat/dir.c +++ b/fs/fat/dir.c | |||
@@ -86,7 +86,7 @@ next: | |||
86 | *bh = sb_bread(sb, phys); | 86 | *bh = sb_bread(sb, phys); |
87 | if (*bh == NULL) { | 87 | if (*bh == NULL) { |
88 | printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", | 88 | printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n", |
89 | (unsigned long long)phys); | 89 | (llu)phys); |
90 | /* skip this block */ | 90 | /* skip this block */ |
91 | *pos = (iblock + 1) << sb->s_blocksize_bits; | 91 | *pos = (iblock + 1) << sb->s_blocksize_bits; |
92 | goto next; | 92 | goto next; |
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index 4efc5038ed29..ea440d65819c 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h | |||
@@ -323,4 +323,7 @@ extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs); | |||
323 | int fat_cache_init(void); | 323 | int fat_cache_init(void); |
324 | void fat_cache_destroy(void); | 324 | void fat_cache_destroy(void); |
325 | 325 | ||
326 | /* helper for printk */ | ||
327 | typedef unsigned long long llu; | ||
328 | |||
326 | #endif /* !_FAT_H */ | 329 | #endif /* !_FAT_H */ |
diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c index 13513992da3c..da6eea47872f 100644 --- a/fs/fat/fatent.c +++ b/fs/fat/fatent.c | |||
@@ -93,8 +93,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent, | |||
93 | err_brelse: | 93 | err_brelse: |
94 | brelse(bhs[0]); | 94 | brelse(bhs[0]); |
95 | err: | 95 | err: |
96 | printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", | 96 | printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", (llu)blocknr); |
97 | (unsigned long long)blocknr); | ||
98 | return -EIO; | 97 | return -EIO; |
99 | } | 98 | } |
100 | 99 | ||
@@ -107,7 +106,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent, | |||
107 | fatent->bhs[0] = sb_bread(sb, blocknr); | 106 | fatent->bhs[0] = sb_bread(sb, blocknr); |
108 | if (!fatent->bhs[0]) { | 107 | if (!fatent->bhs[0]) { |
109 | printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", | 108 | printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", |
110 | (unsigned long long)blocknr); | 109 | (llu)blocknr); |
111 | return -EIO; | 110 | return -EIO; |
112 | } | 111 | } |
113 | fatent->nr_bhs = 1; | 112 | fatent->nr_bhs = 1; |
diff --git a/fs/fat/misc.c b/fs/fat/misc.c index a191e79e66a9..ac39ebcc1496 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c | |||
@@ -124,8 +124,9 @@ int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster) | |||
124 | mark_inode_dirty(inode); | 124 | mark_inode_dirty(inode); |
125 | } | 125 | } |
126 | if (new_fclus != (inode->i_blocks >> (sbi->cluster_bits - 9))) { | 126 | if (new_fclus != (inode->i_blocks >> (sbi->cluster_bits - 9))) { |
127 | fat_fs_panic(sb, "clusters badly computed (%d != %lu)", | 127 | fat_fs_panic(sb, "clusters badly computed (%d != %llu)", |
128 | new_fclus, inode->i_blocks >> (sbi->cluster_bits - 9)); | 128 | new_fclus, |
129 | (llu)(inode->i_blocks >> (sbi->cluster_bits - 9))); | ||
129 | fat_cache_inval_inode(inode); | 130 | fat_cache_inval_inode(inode); |
130 | } | 131 | } |
131 | inode->i_blocks += nr_cluster << (sbi->cluster_bits - 9); | 132 | inode->i_blocks += nr_cluster << (sbi->cluster_bits - 9); |