tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: e47eb90a0a9ae20b82635b9b99a8d0979b757ad8 commit: e2093f5df2381effc84a7dd0414443d972b4c7af [3399/4736] cpufreq: amd-pstate: Add test module for amd-pstate driver config: i386-randconfig-s001-20220905 compiler: gcc-11 (Debian 11.3.0-5) 11.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-39-gce1a6720-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e2093f5df2381effc84a7dd0414443d972b4c7af git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout e2093f5df2381effc84a7dd0414443d972b4c7af # save the config file mkdir build_dir && cp config build_dir/.config make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/cpufreq/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/cpufreq/amd-pstate-ut.c:74:40: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected int @@ got restricted fmode_t [usertype] @@ drivers/cpufreq/amd-pstate-ut.c:74:40: sparse: expected int drivers/cpufreq/amd-pstate-ut.c:74:40: sparse: got restricted fmode_t [usertype] vim +74 drivers/cpufreq/amd-pstate-ut.c 63 64 static bool get_shared_mem(void) 65 { 66 bool result = false; 67 char path[] = "/sys/module/amd_pstate/parameters/shared_mem"; 68 char buf[5] = {0}; 69 struct file *filp = NULL; 70 loff_t pos = 0; 71 ssize_t ret; 72 73 if (!boot_cpu_has(X86_FEATURE_CPPC)) { > 74 filp = filp_open(path, FMODE_PREAD, 0); 75 if (IS_ERR(filp)) 76 pr_err("%s unable to open %s file!\n", __func__, path); 77 else { 78 ret = kernel_read(filp, &buf, sizeof(buf), &pos); 79 if (ret < 0) 80 pr_err("%s read %s file fail ret=%ld!\n", 81 __func__, path, (long)ret); 82 filp_close(filp, NULL); 83 } 84 85 if ('Y' == *buf) 86 result = true; 87 } 88 89 return result; 90 } 91 -- 0-DAY CI Kernel Test Service https://01.org/lkp