]> git.karo-electronics.de Git - karo-tx-linux.git/commit
FAT_VALID_MEDIA(): remove pointless test
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 28 Apr 2008 09:16:30 +0000 (02:16 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 6 Aug 2008 17:11:01 +0000 (10:11 -0700)
commitbc4e51023d592becd9e582923b35d3bfd7211dc7
tree61d61b2377170135487d425034f328153e40d80b
parente6eabbc07825ed69c0b07e3c986b656eb85bcc0c
FAT_VALID_MEDIA(): remove pointless test

commit 73f20e58b1d586e9f6d3ddc3aad872829aca7743 upstream

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 <fseidel@suse.de>
Acked-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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/fat/inode.c
include/linux/msdos_fs.h