diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-10-16 01:04:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 14:21:46 -0400 |
commit | 152b95a1ed499075006cc6552ef49407deeb815b (patch) | |
tree | d77fdf0382669cd541ebb5c723d4e0757cc52e18 /fs/befs/linuxvfs.c | |
parent | bd39597cbd42a784105a04010100e27267481c67 (diff) |
befs: annotate fs32 on tests for superblock endianness
Does compile-time byteswapping rather than runtime.
Noticed by sparse:
fs/befs/super.c:29:6: warning: cast to restricted __le32
fs/befs/super.c:29:6: warning: cast from restricted fs32
fs/befs/super.c:31:11: warning: cast to restricted __be32
fs/befs/super.c:31:11: warning: cast from restricted fs32
fs/befs/super.c:31:11: warning: cast to restricted __be32
fs/befs/super.c:31:11: warning: cast from restricted fs32
fs/befs/super.c:31:11: warning: cast to restricted __be32
fs/befs/super.c:31:11: warning: cast from restricted fs32
fs/befs/super.c:31:11: warning: cast to restricted __be32
fs/befs/super.c:31:11: warning: cast from restricted fs32
fs/befs/super.c:31:11: warning: cast to restricted __be32
fs/befs/super.c:31:11: warning: cast from restricted fs32
fs/befs/super.c:31:11: warning: cast to restricted __be32
fs/befs/super.c:31:11: warning: cast from restricted fs32
fs/befs/linuxvfs.c:811:7: warning: cast to restricted __le32
fs/befs/linuxvfs.c:811:7: warning: cast from restricted fs32
fs/befs/linuxvfs.c:812:7: warning: cast to restricted __be32
fs/befs/linuxvfs.c:812:7: warning: cast from restricted fs32
fs/befs/linuxvfs.c:812:7: warning: cast to restricted __be32
fs/befs/linuxvfs.c:812:7: warning: cast from restricted fs32
fs/befs/linuxvfs.c:812:7: warning: cast to restricted __be32
fs/befs/linuxvfs.c:812:7: warning: cast from restricted fs32
fs/befs/linuxvfs.c:812:7: warning: cast to restricted __be32
fs/befs/linuxvfs.c:812:7: warning: cast from restricted fs32
fs/befs/linuxvfs.c:812:7: warning: cast to restricted __be32
fs/befs/linuxvfs.c:812:7: warning: cast from restricted fs32
fs/befs/linuxvfs.c:812:7: warning: cast to restricted __be32
fs/befs/linuxvfs.c:812:7: warning: cast from restricted fs32
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: "Sergey S. Kostyliov" <rathamahata@php4.ru>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/befs/linuxvfs.c')
-rw-r--r-- | fs/befs/linuxvfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 9286b2af893a..b6dfee37c7b7 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c | |||
@@ -809,8 +809,8 @@ befs_fill_super(struct super_block *sb, void *data, int silent) | |||
809 | 809 | ||
810 | /* account for offset of super block on x86 */ | 810 | /* account for offset of super block on x86 */ |
811 | disk_sb = (befs_super_block *) bh->b_data; | 811 | disk_sb = (befs_super_block *) bh->b_data; |
812 | if ((le32_to_cpu(disk_sb->magic1) == BEFS_SUPER_MAGIC1) || | 812 | if ((disk_sb->magic1 == BEFS_SUPER_MAGIC1_LE) || |
813 | (be32_to_cpu(disk_sb->magic1) == BEFS_SUPER_MAGIC1)) { | 813 | (disk_sb->magic1 == BEFS_SUPER_MAGIC1_BE)) { |
814 | befs_debug(sb, "Using PPC superblock location"); | 814 | befs_debug(sb, "Using PPC superblock location"); |
815 | } else { | 815 | } else { |
816 | befs_debug(sb, "Using x86 superblock location"); | 816 | befs_debug(sb, "Using x86 superblock location"); |