mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[PATCH] fat: cleanup and optimization of checksum
Signed-off-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4e57b68178
commit
451cbaa1c3
3 changed files with 14 additions and 10 deletions
|
|
@ -621,8 +621,7 @@ static int vfat_build_slots(struct inode *dir, const unsigned char *name,
|
|||
}
|
||||
|
||||
/* build the entry of long file name */
|
||||
for (cksum = i = 0; i < 11; i++)
|
||||
cksum = (((cksum&1)<<7)|((cksum&0xfe)>>1)) + msdos_name[i];
|
||||
cksum = fat_checksum(msdos_name);
|
||||
|
||||
*nr_slots = usize / 13;
|
||||
for (ps = slots, i = *nr_slots; i > 0; i--, ps++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue