staging: exfat: remove two unused functions
PATCH 1/1 staging: exfat: remove two unused functions
Fix sparse warnings:
drivers/staging/exfat/exfat_core.c:2045:4: warning: symbol 'calc_checksum_1byte' was not declared. Should it be static? drivers/staging/exfat/exfat_core.c:2080:5: warning: symbol 'calc_checksum_4byte' was not declared. Should it be static?
The two functions has no caller in tree, so remove it.
--- drivers/staging/exfat/exfat_core.c | 35 ----------------------------------- 1 file changed, 35 deletions(-)
drivers/staging/exfat/exfat_core.c +0 -35
@@ -2042,17 +2042,6 @@ static s32 exfat_calc_num_entries(struct uni_name_t *p_uniname)return (len -1 ) /15 +3 ; } -u8 calc_checksum_1byte (void *data,s32 len,u8 chksum) -{ -int i; -u8 *c = (u8 *)data; - -for (i =0 ; i < len; i++, c++) - chksum = (((chksum &1 ) <<7 ) | ((chksum &0xFE ) >>1 )) + *c; - -return chksum; -} -u16 calc_checksum_2byte (void *data,s32 len,u16 chksum,s32 type) {int i;
@@ -2077,30 +2066,6 @@ u16 calc_checksum_2byte(void *data, s32 len, u16 chksum, s32 type)return chksum; } -u32 calc_checksum_4byte (void *data,s32 len,u32 chksum,s32 type) -{ -int i; -u8 *c = (u8 *)data; - -switch (type) { -case CS_PBR_SECTOR : -for (i =0 ; i < len; i++, c++) { -if ((i ==106 ) || (i ==107 ) || (i ==112 )) -continue ; - chksum = (((chksum &1 ) <<31 ) | - ((chksum &0xFFFFFFFE ) >>1 )) + (u32)*c; - } -break ; -default - : -for (i =0 ; i < len; i++, c++) - chksum = (((chksum &1 ) <<31 ) | - ((chksum &0xFFFFFFFE ) >>1 )) + (u32)*c; - } - -return chksum; -} -/* * Name Resolution Functions */
Signature · 1 line
2.7.4
kbuild test robot
build botThank you for the patch! Yet something to improve:
Hi YueHaibing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20191113]
[also build test ERROR on v5.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/YueHaibing/staging-exfat-remove-two-unused-functions/20191115-014418 base: 4e8f108c3af2d6922a64df9f3d3d488c74f6009d config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag
All errors (new ones prefixed by >>):
>> ERROR: "calc_checksum_1byte" [drivers/staging/exfat/exfat.ko] undefined!
ERROR: "ia64_delay_loop" [drivers/net/phy/mdio-cavium.ko] undefined!
ERROR: "ia64_delay_loop" [drivers/spi/spi-thunderx.ko] undefined!
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
kbuild test robot
build botThank you for the patch! Yet something to improve:
Hi YueHaibing,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20191113]
[also build test ERROR on v5.4-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/YueHaibing/staging-exfat-remove-two-unused-functions/20191115-014418 base: 4e8f108c3af2d6922a64df9f3d3d488c74f6009d config: x86_64-randconfig-a001-20191115 (attached as .config) compiler: gcc-7 (Debian 7.4.0-14) 7.4.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
If you fix the issue, kindly add following tag
All errors (new ones prefixed by >>):
ld: drivers/staging/exfat/exfat_core.o: in function `fat_count_ext_entries':
>> drivers/staging/exfat/exfat_core.c:2396: undefined reference to `calc_checksum_1byte'
ld: drivers/staging/exfat/exfat_core.o: in function `fat_init_ext_entry':
drivers/staging/exfat/exfat_core.c:1309: undefined reference to `calc_checksum_1byte'
vim +2396 drivers/staging/exfat/exfat_core.c
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2386
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2387 s32 fat_count_ext_entries(struct super_block *sb, struct chain_t *p_dir,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2388 s32 entry, struct dentry_t *p_entry)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2389 {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2390 s32 count = 0;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2391 u8 chksum;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2392 struct dos_dentry_t *dos_ep = (struct dos_dentry_t *)p_entry;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2393 struct ext_dentry_t *ext_ep;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2394 struct fs_info_t *p_fs = &(EXFAT_SB(sb)->fs_info);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2395
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 @2396 chksum = calc_checksum_1byte((void *)dos_ep->name, DOS_NAME_LENGTH, 0);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2397
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2398 for (entry--; entry >= 0; entry--) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2399 ext_ep = (struct ext_dentry_t *)get_entry_in_dir(sb, p_dir,
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2400 entry, NULL);
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2401 if (!ext_ep)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2402 return -1;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2403
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2404 if ((p_fs->fs_func->get_entry_type((struct dentry_t *)ext_ep) ==
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2405 TYPE_EXTEND) && (ext_ep->checksum == chksum)) {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2406 count++;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2407 if (ext_ep->order > 0x40)
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2408 return count;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2409 } else {
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2410 return count;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2411 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2412 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2413
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2414 return count;
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2415 }
c48c9f7ff32b8b Valdis Kletnieks 2019-08-28 2416 :::::: The code at line 2396 was first introduced by commit
:::::: c48c9f7ff32b8b3965a08e40eb6763682d905b5d staging: exfat: add exfat filesystem code to staging
:::::: TO: Valdis Klētnieks <[email protected]> :::::: CC: Greg Kroah-Hartman <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation