Hi "Pali, [FYI, it's a private test report for your RFC patch.] [auto build test ERROR on cifs/for-next] [also build test ERROR on shaggy/jfs-next linus/master v5.14-rc4 next-20210806] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Pali-Roh-r/fs-Remove-usage-of-broken-nls_utf8-and-drop-it/20210809-002825 base: git://git.samba.org/sfrench/cifs-2.6.git for-next config: mips-buildonly-randconfig-r004-20210808 (attached as .config) compiler: mips64-linux-gcc (GCC) 10.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/1f2cb15ebff9ec518589b3c7ffceea1ff121009b git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Pali-Roh-r/fs-Remove-usage-of-broken-nls_utf8-and-drop-it/20210809-002825 git checkout 1f2cb15ebff9ec518589b3c7ffceea1ff121009b # save the attached .config to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash fs/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): fs/befs/linuxvfs.c: In function 'befs_fill_super': >> fs/befs/linuxvfs.c:914:13: error: 'opt' undeclared (first use in this function) 914 | if (strcmp(opt.iocharset ? opt.iocharset : CONFIG_NLS_DEFAULT, "utf8") == 0) { | ^~~ fs/befs/linuxvfs.c:914:13: note: each undeclared identifier is reported only once for each function it appears in vim +/opt +914 fs/befs/linuxvfs.c 804 805 /* Allocate private field of the superblock, fill it. 806 * 807 * Finish filling the public superblock fields 808 * Make the root directory 809 * Load a set of NLS translations if needed. 810 */ 811 static int 812 befs_fill_super(struct super_block *sb, void *data, int silent) 813 { 814 struct buffer_head *bh; 815 struct befs_sb_info *befs_sb; 816 befs_super_block *disk_sb; 817 struct inode *root; 818 long ret = -EINVAL; 819 const unsigned long sb_block = 0; 820 const off_t x86_sb_off = 512; 821 int blocksize; 822 823 sb->s_fs_info = kzalloc(sizeof(*befs_sb), GFP_KERNEL); 824 if (sb->s_fs_info == NULL) 825 goto unacquire_none; 826 827 befs_sb = BEFS_SB(sb); 828 829 if (!parse_options((char *) data, &befs_sb->mount_opts)) { 830 if (!silent) 831 befs_error(sb, "cannot parse mount options"); 832 goto unacquire_priv_sbp; 833 } 834 835 befs_debug(sb, "---> %s", __func__); 836 837 if (!sb_rdonly(sb)) { 838 befs_warning(sb, 839 "No write support. Marking filesystem read-only"); 840 sb->s_flags |= SB_RDONLY; 841 } 842 843 /* 844 * Set dummy blocksize to read super block. 845 * Will be set to real fs blocksize later. 846 * 847 * Linux 2.4.10 and later refuse to read blocks smaller than 848 * the logical block size for the device. But we also need to read at 849 * least 1k to get the second 512 bytes of the volume. 850 */ 851 blocksize = sb_min_blocksize(sb, 1024); 852 if (!blocksize) { 853 if (!silent) 854 befs_error(sb, "unable to set blocksize"); 855 goto unacquire_priv_sbp; 856 } 857 858 bh = sb_bread(sb, sb_block); 859 if (!bh) { 860 if (!silent) 861 befs_error(sb, "unable to read superblock"); 862 goto unacquire_priv_sbp; 863 } 864 865 /* account for offset of super block on x86 */ 866 disk_sb = (befs_super_block *) bh->b_data; 867 if ((disk_sb->magic1 == BEFS_SUPER_MAGIC1_LE) || 868 (disk_sb->magic1 == BEFS_SUPER_MAGIC1_BE)) { 869 befs_debug(sb, "Using PPC superblock location"); 870 } else { 871 befs_debug(sb, "Using x86 superblock location"); 872 disk_sb = 873 (befs_super_block *) ((void *) bh->b_data + x86_sb_off); 874 } 875 876 if ((befs_load_sb(sb, disk_sb) != BEFS_OK) || 877 (befs_check_sb(sb) != BEFS_OK)) 878 goto unacquire_bh; 879 880 befs_dump_super_block(sb, disk_sb); 881 882 brelse(bh); 883 884 if (befs_sb->num_blocks > ~((sector_t)0)) { 885 if (!silent) 886 befs_error(sb, "blocks count: %llu is larger than the host can use", 887 befs_sb->num_blocks); 888 goto unacquire_priv_sbp; 889 } 890 891 /* 892 * set up enough so that it can read an inode 893 * Fill in kernel superblock fields from private sb 894 */ 895 sb->s_magic = BEFS_SUPER_MAGIC; 896 /* Set real blocksize of fs */ 897 sb_set_blocksize(sb, (ulong) befs_sb->block_size); 898 sb->s_op = &befs_sops; 899 sb->s_export_op = &befs_export_operations; 900 sb->s_time_min = 0; 901 sb->s_time_max = 0xffffffffffffll; 902 root = befs_iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir))); 903 if (IS_ERR(root)) { 904 ret = PTR_ERR(root); 905 goto unacquire_priv_sbp; 906 } 907 sb->s_root = d_make_root(root); 908 if (!sb->s_root) { 909 if (!silent) 910 befs_error(sb, "get root inode failed"); 911 goto unacquire_priv_sbp; 912 } 913 > 914 if (strcmp(opt.iocharset ? opt.iocharset : CONFIG_NLS_DEFAULT, "utf8") == 0) { 915 befs_debug(sb, "Using native UTF-8 without nls"); 916 /* load nls library */ 917 } else if (befs_sb->mount_opts.iocharset) { 918 befs_debug(sb, "Loading nls: %s", 919 befs_sb->mount_opts.iocharset); 920 befs_sb->nls = load_nls(befs_sb->mount_opts.iocharset); 921 if (!befs_sb->nls) { 922 befs_error(sb, "Cannot load nls %s", 923 befs_sb->mount_opts.iocharset); 924 goto unacquire_priv_sbp; 925 } 926 /* load default nls if none is specified in mount options */ 927 } else { 928 befs_debug(sb, "Loading default nls"); 929 befs_sb->nls = load_nls_default(); 930 } 931 932 return 0; 933 934 unacquire_bh: 935 brelse(bh); 936 937 unacquire_priv_sbp: 938 kfree(befs_sb->mount_opts.iocharset); 939 kfree(sb->s_fs_info); 940 sb->s_fs_info = NULL; 941 942 unacquire_none: 943 return ret; 944 } 945 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org