cpufreq: amd-pstate: modify type in argument 2 for filp_open
authorMeng Li <li.meng@amd.com>
Tue, 6 Sep 2022 02:48:26 +0000 (10:48 +0800)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 5 Oct 2022 17:05:18 +0000 (11:05 -0600)
commitce29a148f34fe93601dab835ec25ada1d95aac02
tree7b63e1ce2fa055148b7404b38e7a24185adeb290
parent7fe3629729ce5466f865b75c506d7cb6223838ba
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: Meng Li <li.meng@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
drivers/cpufreq/amd-pstate-ut.c