diff options
author | Tetsuhiro Kohada <kohada.t2@gmail.com> | 2020-05-29 13:14:59 +0300 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-06-09 10:49:25 +0300 |
commit | 5875bf287d95314c58add01184f361cc5aa38429 (patch) | |
tree | 1de468fb69859f1d17eac04c52d125d4761af6f6 /fs/exfat/exfat_fs.h | |
parent | 476189c0ef3b658de3f6b89fd0fdeb6dc451b564 (diff) | |
download | linux-5875bf287d95314c58add01184f361cc5aa38429.tar.xz |
exfat: standardize checksum calculation
To clarify that it is a 16-bit checksum, the parts related to the 16-bit
checksum are renamed and change type to u16.
Furthermore, replace checksum calculation in exfat_load_upcase_table()
with exfat_calc_checksum32().
Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/exfat_fs.h')
-rw-r--r-- | fs/exfat/exfat_fs.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h index 8c2a70bfaa10..595f3117f492 100644 --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -137,7 +137,7 @@ struct exfat_dentry_namebuf { struct exfat_uni_name { /* +3 for null and for converting */ unsigned short name[MAX_NAME_LENGTH + 3]; - unsigned short name_hash; + u16 name_hash; unsigned char name_len; }; @@ -512,8 +512,7 @@ void exfat_get_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, void exfat_truncate_atime(struct timespec64 *ts); void exfat_set_entry_time(struct exfat_sb_info *sbi, struct timespec64 *ts, u8 *tz, __le16 *time, __le16 *date, u8 *time_cs); -unsigned short exfat_calc_chksum_2byte(void *data, int len, - unsigned short chksum, int type); +u16 exfat_calc_chksum16(void *data, int len, u16 chksum, int type); u32 exfat_calc_chksum32(void *data, int len, u32 chksum, int type); void exfat_update_bh(struct super_block *sb, struct buffer_head *bh, int sync); void exfat_chain_set(struct exfat_chain *ec, unsigned int dir, |