Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fat: use get/put_unaligned_* helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
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>

authored by

Harvey Harrison and committed by
Linus Torvalds
803f445f d15c0a4d

+3 -5
+3 -5
fs/fat/inode.c
··· 1222 1222 brelse(bh); 1223 1223 goto out_invalid; 1224 1224 } 1225 - logical_sector_size = 1226 - le16_to_cpu(get_unaligned((__le16 *)&b->sector_size)); 1225 + logical_sector_size = get_unaligned_le16(&b->sector_size); 1227 1226 if (!is_power_of_2(logical_sector_size) 1228 1227 || (logical_sector_size < 512) 1229 1228 || (logical_sector_size > 4096)) { ··· 1321 1322 sbi->dir_per_block_bits = ffs(sbi->dir_per_block) - 1; 1322 1323 1323 1324 sbi->dir_start = sbi->fat_start + sbi->fats * sbi->fat_length; 1324 - sbi->dir_entries = 1325 - le16_to_cpu(get_unaligned((__le16 *)&b->dir_entries)); 1325 + sbi->dir_entries = get_unaligned_le16(&b->dir_entries); 1326 1326 if (sbi->dir_entries & (sbi->dir_per_block - 1)) { 1327 1327 if (!silent) 1328 1328 printk(KERN_ERR "FAT: bogus directroy-entries per block" ··· 1333 1335 rootdir_sectors = sbi->dir_entries 1334 1336 * sizeof(struct msdos_dir_entry) / sb->s_blocksize; 1335 1337 sbi->data_start = sbi->dir_start + rootdir_sectors; 1336 - total_sectors = le16_to_cpu(get_unaligned((__le16 *)&b->sectors)); 1338 + total_sectors = get_unaligned_le16(&b->sectors); 1337 1339 if (total_sectors == 0) 1338 1340 total_sectors = le32_to_cpu(b->total_sect); 1339 1341