From 52576da3545e78c534d901a39f6f2391665c641b Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 17 Apr 2012 15:28:51 -0400 Subject: hpfs: bitmaps are little-endian annotate properly... Signed-off-by: Al Viro --- fs/hpfs/hpfs_fn.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/hpfs/hpfs_fn.h') diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index de946170ebb1..88f096d9dbee 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -178,7 +178,7 @@ static inline void copy_de(struct hpfs_dirent *dst, struct hpfs_dirent *src) dst->not_8x3 = n; } -static inline unsigned tstbits(u32 *bmp, unsigned b, unsigned n) +static inline unsigned tstbits(__le32 *bmp, unsigned b, unsigned n) { int i; if ((b >= 0x4000) || (b + n - 1 >= 0x4000)) return n; @@ -275,8 +275,8 @@ void hpfs_evict_inode(struct inode *); /* map.c */ -unsigned *hpfs_map_dnode_bitmap(struct super_block *, struct quad_buffer_head *); -unsigned *hpfs_map_bitmap(struct super_block *, unsigned, struct quad_buffer_head *, char *); +__le32 *hpfs_map_dnode_bitmap(struct super_block *, struct quad_buffer_head *); +__le32 *hpfs_map_bitmap(struct super_block *, unsigned, struct quad_buffer_head *, char *); unsigned char *hpfs_load_code_page(struct super_block *, secno); secno *hpfs_load_bitmap_directory(struct super_block *, secno bmp); struct fnode *hpfs_map_fnode(struct super_block *s, ino_t, struct buffer_head **); -- cgit v1.2.1 From 46287aa652fa8ea1edac41817ddc63332495ffc3 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 17 Apr 2012 16:20:49 -0400 Subject: hpfs: annotate struct hpfs_dirent Signed-off-by: Al Viro --- fs/hpfs/hpfs_fn.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/hpfs/hpfs_fn.h') diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 88f096d9dbee..067269143543 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -100,7 +100,7 @@ struct quad_buffer_head { static inline dnode_secno de_down_pointer (struct hpfs_dirent *de) { CHKCOND(de->down,("HPFS: de_down_pointer: !de->down\n")); - return le32_to_cpu(*(dnode_secno *) ((void *) de + le16_to_cpu(de->length) - 4)); + return le32_to_cpu(*(__le32 *) ((void *) de + le16_to_cpu(de->length) - 4)); } /* The first dir entry in a dnode */ -- cgit v1.2.1 From 77ee26e44c28823a29bc09091950544566ae7cea Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 17 Apr 2012 16:26:46 -0400 Subject: hpfs: annotate ea Signed-off-by: Al Viro --- fs/hpfs/hpfs_fn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/hpfs/hpfs_fn.h') diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 067269143543..1acb40f55a3a 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -148,12 +148,12 @@ static inline struct extended_attribute *next_ea(struct extended_attribute *ea) static inline secno ea_sec(struct extended_attribute *ea) { - return le32_to_cpu(get_unaligned((secno *)((char *)ea + 9 + ea->namelen))); + return le32_to_cpu(get_unaligned((__le32 *)((char *)ea + 9 + ea->namelen))); } static inline secno ea_len(struct extended_attribute *ea) { - return le32_to_cpu(get_unaligned((secno *)((char *)ea + 5 + ea->namelen))); + return le32_to_cpu(get_unaligned((__le32 *)((char *)ea + 5 + ea->namelen))); } static inline char *ea_data(struct extended_attribute *ea) -- cgit v1.2.1 From 28fe3c1963b0bafa56ec92df1987828090151d87 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 17 Apr 2012 16:41:13 -0400 Subject: hpfs: assorted endianness annotations Signed-off-by: Al Viro --- fs/hpfs/hpfs_fn.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/hpfs/hpfs_fn.h') diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 1acb40f55a3a..8515bbbc9e2e 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -82,7 +82,7 @@ struct hpfs_sb_info { unsigned char *sb_cp_table; /* code page tables: */ /* 128 bytes uppercasing table & */ /* 128 bytes lowercasing table */ - unsigned *sb_bmp_dir; /* main bitmap directory */ + __le32 *sb_bmp_dir; /* main bitmap directory */ unsigned sb_c_bitmap; /* current bitmap */ unsigned sb_max_fwd_alloc; /* max forwad allocation */ int sb_timeshift; @@ -278,7 +278,7 @@ void hpfs_evict_inode(struct inode *); __le32 *hpfs_map_dnode_bitmap(struct super_block *, struct quad_buffer_head *); __le32 *hpfs_map_bitmap(struct super_block *, unsigned, struct quad_buffer_head *, char *); unsigned char *hpfs_load_code_page(struct super_block *, secno); -secno *hpfs_load_bitmap_directory(struct super_block *, secno bmp); +__le32 *hpfs_load_bitmap_directory(struct super_block *, secno bmp); struct fnode *hpfs_map_fnode(struct super_block *s, ino_t, struct buffer_head **); struct anode *hpfs_map_anode(struct super_block *s, anode_secno, struct buffer_head **); struct dnode *hpfs_map_dnode(struct super_block *s, dnode_secno, struct quad_buffer_head *); -- cgit v1.2.1