Skip to content

Commit c330293

Browse files
OGAWAHirofumitorvalds
authored andcommitted
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>
1 parent 9ca59f4 commit c330293

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎fs/fat/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static int fat__get_entry(struct inode *dir, loff_t *pos,
8686
*bh = sb_bread(sb, phys);
8787
if (*bh == NULL) {
8888
printk(KERN_ERR "FAT: Directory bread(block %llu) failed\n",
89-
(unsigned long long)phys);
89+
(llu)phys);
9090
/* skip this block */
9191
*pos = (iblock + 1) << sb->s_blocksize_bits;
9292
goto next;

‎fs/fat/fat.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,7 @@ extern int fat_sync_bhs(struct buffer_head **bhs, int nr_bhs);
323323
int fat_cache_init(void);
324324
void fat_cache_destroy(void);
325325

326+
/* helper for printk */
327+
typedef unsigned long long llu;
328+
326329
#endif /* !_FAT_H */

‎fs/fat/fatent.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ static int fat12_ent_bread(struct super_block *sb, struct fat_entry *fatent,
9393
err_brelse:
9494
brelse(bhs[0]);
9595
err:
96-
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n",
97-
(unsigned long long)blocknr);
96+
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n", (llu)blocknr);
9897
return -EIO;
9998
}
10099

@@ -107,7 +106,7 @@ static int fat_ent_bread(struct super_block *sb, struct fat_entry *fatent,
107106
fatent->bhs[0] = sb_bread(sb, blocknr);
108107
if (!fatent->bhs[0]) {
109108
printk(KERN_ERR "FAT: FAT read failed (blocknr %llu)\n",
110-
(unsigned long long)blocknr);
109+
(llu)blocknr);
111110
return -EIO;
112111
}
113112
fatent->nr_bhs = 1;

‎fs/fat/misc.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster)
124124
mark_inode_dirty(inode);
125125
}
126126
if (new_fclus != (inode->i_blocks >> (sbi->cluster_bits - 9))) {
127-
fat_fs_panic(sb, "clusters badly computed (%d != %lu)",
128-
new_fclus, inode->i_blocks >> (sbi->cluster_bits - 9));
127+
fat_fs_panic(sb, "clusters badly computed (%d != %llu)",
128+
new_fclus,
129+
(llu)(inode->i_blocks >> (sbi->cluster_bits - 9)));
129130
fat_cache_inval_inode(inode);
130131
}
131132
inode->i_blocks += nr_cluster << (sbi->cluster_bits - 9);

0 commit comments

Comments
 (0)