From: Frank Seidel <fseidel@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: [RFC][PATCH] fs/partitions/msdos: directly check if FAT boot sector
Date: Sat, 01 Mar 2008 10:38:39 +0100 [thread overview]
Message-ID: <47C9241F.3080008@suse.de> (raw)
In-Reply-To: <20080229170246.67391f7b.akpm@linux-foundation.org>
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
prev parent reply other threads:[~2008-03-01 9:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-28 12:32 [RFC][PATCH] fs/partitions/msdos: directly check if FAT boot sector Frank Seidel
2008-02-29 2:16 ` Andreas Dilger
2008-03-01 1:02 ` Andrew Morton
2008-03-01 9:38 ` Frank Seidel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47C9241F.3080008@suse.de \
--to=fseidel@suse.de \
--cc=akpm@linux-foundation.org \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.