lkml.org 
[lkml]   [2008]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] fs/partitions/msdos: directly check if FAT boot sector
Andrew Morton schrieb:
> fs/partitions/msdos.c: In function 'msdos_partition':
> fs/partitions/msdos.c:446: warning: comparison is always true due to limited range of data type
>
> didn't you get this?

Yes, sorry, but i saw it too late after posting.

> The reason is that FAT_VALID_MEDIA() is bogus:

yes, i stated this in our bug to the complaint
(https://bugzilla.novell.com/show_bug.cgi?id=364365#c15), but should have
also posted it here, sorry.

> #define FAT_VALID_MEDIA(x) ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
>
> It appears that the on-disk field which FAT_VALID_MEDIA() is designed to
> test is only 8-bit, so the comparison with 0xff is pointless. The only
> existing caller of FAT_VALID_MEDIA() cheats by copying the value into a
> local unsigned int first.
>
> So I'll leave things as they are for now, but I'd ask that someone can
> confirm that we should simply remove the 0xff test from FAT_VALID_MEDIA()?

At least in my opinion it should be removed.

Thanks,
Frank


\
 
 \ /
  Last update: 2008-03-01 10:41    [W:0.348 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site