From 73f20e58b1d586e9f6d3ddc3aad872829aca7743 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 28 Apr 2008 02:16:30 -0700 Subject: FAT_VALID_MEDIA(): remove pointless test The on-disk media specification field in FAT is only 8-bits, so testing for <=0xff is pointless, and can generate a "comparison is always true due to limited range of data type" warning. While we're there, convert FAT_VALID_MEDIA() into a C function - the present implementation is buggy: it generates either one or two references to its argument. Cc: Frank Seidel Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/fat/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/fat') diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 1604a8a5c01..bf918929e79 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1215,7 +1215,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, */ media = b->media; - if (!FAT_VALID_MEDIA(media)) { + if (!fat_valid_media(media)) { if (!silent) printk(KERN_ERR "FAT: invalid media value (0x%02x)\n", media); -- cgit v1.2.3