Commit ce29a148 authored by Meng Li's avatar Meng Li Committed by Shuah Khan

cpufreq: amd-pstate: modify type in argument 2 for filp_open

Modify restricted FMODE_PREAD to experted int O_RDONLY to
fix the sparse warnings below:
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]
Signed-off-by: default avatarMeng Li <li.meng@amd.com>
Reported-by: default avatarkernel test robot <lkp@intel.com>
Acked-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 7fe36297
...@@ -71,7 +71,7 @@ static bool get_shared_mem(void) ...@@ -71,7 +71,7 @@ static bool get_shared_mem(void)
ssize_t ret; ssize_t ret;
if (!boot_cpu_has(X86_FEATURE_CPPC)) { if (!boot_cpu_has(X86_FEATURE_CPPC)) {
filp = filp_open(path, FMODE_PREAD, 0); filp = filp_open(path, O_RDONLY, 0);
if (IS_ERR(filp)) if (IS_ERR(filp))
pr_err("%s unable to open %s file!\n", __func__, path); pr_err("%s unable to open %s file!\n", __func__, path);
else { else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment