mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Acked-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
c7a6c4edc7
commit
73f20e58b1
2 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue