]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitbec987f4674a19f27f445d3a11c547041e9d94fd
tree7b63e1ce2fa055148b7404b38e7a24185adeb290
parent84a620cabef5f94047aa8eb2508f7f7554050fe4
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