Hi Mary, kernel test robot noticed the following build warnings: [auto build test WARNING on lee-mfd/for-mfd-next] [also build test WARNING on lee-mfd/for-mfd-fixes andi-shyti/i2c/i2c-host akpm-mm/mm-everything linus/master v6.11-rc3 next-20240813] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Mary-Strodl/x86-Add-basic-support-for-the-Congatec-CGEB-BIOS-interface/20240809-075405 base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next patch link: https://lore.kernel.org/r/20240808183527.3950120-2-mstrodl%40csh.rit.edu patch subject: [PATCH v3 1/2] x86: Add basic support for the Congatec CGEB BIOS interface config: i386-randconfig-r111-20240813 (https://download.01.org/0day-ci/archive/20240813/202408132055.GF2IYZIB-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240813/202408132055.GF2IYZIB-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202408132055.GF2IYZIB-lkp@xxxxxxxxx/ sparse warnings: (new ones prefixed by >>) >> drivers/mfd/congatec-cgeb.c:906:17: sparse: sparse: cast removes address space '__iomem' of expression drivers/mfd/congatec-cgeb.c:931:27: sparse: sparse: cast removes address space '__iomem' of expression vim +/__iomem +906 drivers/mfd/congatec-cgeb.c 888 889 static struct cgeb_board_data *cgeb_open(resource_size_t base, u32 len) 890 { 891 u32 dw; 892 struct cgeb_boardinfo pbi; 893 struct cgeb_low_desc *low_desc; 894 struct cgeb_high_desc *high_desc = NULL; 895 u32 high_desc_phys; 896 u32 high_desc_len; 897 void *pcur, *high_desc_virt; 898 int ret; 899 900 struct cgeb_board_data *board; 901 902 board = kzalloc(sizeof(*board), GFP_KERNEL); 903 if (!board) 904 return NULL; 905 > 906 pcur = (void *) ioremap_cache(base, len); 907 if (!pcur) 908 goto err_kfree; 909 910 /* look for the CGEB descriptor */ 911 low_desc = cgeb_find_magic(pcur, len, CGEB_LD_MAGIC); 912 if (!low_desc) 913 goto err_kfree; 914 915 pr_debug("CGEB: Found CGEB_LD_MAGIC\n"); 916 917 if (low_desc->size < sizeof(struct cgeb_low_desc) - sizeof(long)) 918 goto err_kfree; 919 920 if (low_desc->size >= sizeof(struct cgeb_low_desc) 921 && low_desc->hi_desc_phys_addr) 922 high_desc_phys = low_desc->hi_desc_phys_addr; 923 else 924 high_desc_phys = 0xfff00000; 925 926 high_desc_len = (unsigned int) -(int)high_desc_phys; 927 928 pr_debug("CGEB: Looking for CGEB hi desc between phys 0x%x and 0x%x\n", 929 high_desc_phys, -1); 930 931 high_desc_virt = (void *) ioremap_cache(high_desc_phys, high_desc_len); 932 if (!high_desc_virt) 933 goto err_kfree; 934 935 pr_debug("CGEB: Looking for CGEB hi desc between virt 0x%p and 0x%p\n", 936 high_desc_virt, high_desc_virt + high_desc_len - 1); 937 938 high_desc = cgeb_find_magic(high_desc_virt, high_desc_len, 939 CGEB_HD_MAGIC); 940 if (!high_desc) 941 goto err_iounmap; 942 943 pr_debug("CGEB: Found CGEB_HD_MAGIC\n"); 944 945 if (high_desc->size < sizeof(struct cgeb_high_desc)) 946 goto err_iounmap; 947 948 pr_debug("CGEB: data_size %u, code_size %u, entry_rel %u\n", 949 high_desc->data_size, high_desc->code_size, high_desc->entry_rel); 950 951 ret = cgeb_upload_code(high_desc, board); 952 if (ret) { 953 pr_err("CGEB: Couldn't upload code to helper: %d\n", ret); 954 goto err_munmap; 955 } 956 957 board->ds = get_data_segment(); 958 959 ret = cgeb_call_simple(board, CgebGetCgebVersion, 0, NULL, 0, &dw); 960 if (ret) 961 goto err_munmap; 962 963 if (CGEB_GET_VERSION_MAJOR(dw) != CGEB_VERSION_MAJOR) 964 goto err_munmap; 965 966 pr_debug("CGEB: BIOS interface revision: %d.%d\n", 967 dw >> 16, dw & 0xffff); 968 969 if (high_desc->data_size) 970 dw = high_desc->data_size; 971 else 972 ret = cgeb_call_simple(board, CgebGetDataSize, 0, NULL, 0, &dw); 973 974 if (!ret && dw) { 975 board->data = cgeb_user_alloc(high_desc->data_size); 976 if (!board->data) 977 goto err_munmap; 978 } 979 980 ret = cgeb_call_simple(board, CgebOpen, 0, NULL, 0, NULL); 981 if (ret) 982 goto err_free_data; 983 984 pr_debug("CGEB: Mapping memory\n"); 985 ret = cgeb_map_memory(board); 986 if (ret) 987 goto err_free_map; 988 pr_debug("CGEB: Memory is mapped, getting board info\n"); 989 990 ret = cgeb_call_simple(board, CgebBoardGetInfo, 0, &pbi, 991 sizeof(pbi), NULL); 992 if (ret) 993 goto err_free_map; 994 995 pr_info("CGEB: Board name: %c%c%c%c\n", 996 pbi.board[0], pbi.board[1], 997 pbi.board[2], pbi.board[3]); 998 999 iounmap((void __iomem *) high_desc_virt); 1000 1001 return board; 1002 1003 err_free_map: 1004 cgeb_unmap_memory(board); 1005 err_free_data: 1006 cgeb_user_free(board->data); 1007 err_munmap: 1008 cgeb_munmap(board->code, board->code_size); 1009 err_iounmap: 1010 iounmap((void __iomem *) high_desc_virt); 1011 err_kfree: 1012 kfree(board); 1013 return NULL; 1014 } 1015 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki