lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Sep 2022 10:48:26 +0800
From:   Meng Li <li.meng@....com>
To:     Shuah Khan <skhan@...uxfoundation.org>,
        Huang Rui <ray.huang@....com>, <linux-pm@...r.kernel.org>
CC:     "Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
        Nathan Fontenot <nathan.fontenot@....com>,
        Deepak Sharma <deepak.sharma@....com>,
        "Alex Deucher" <alexander.deucher@....com>,
        Mario Limonciello <mario.limonciello@....com>,
        Jinzhou Su <Jinzhou.Su@....com>,
        Perry Yuan <Perry.Yuan@....com>,
        Xiaojian Du <Xiaojian.Du@....com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Borislav Petkov <bp@...en8.de>, <linux-kernel@...r.kernel.org>,
        Meng Li <li.meng@....com>, kernel test robot <lkp@...el.com>
Subject: [Patch] 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@....com>
Reported-by: kernel test robot <lkp@...el.com>
---
 drivers/cpufreq/amd-pstate-ut.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/amd-pstate-ut.c b/drivers/cpufreq/amd-pstate-ut.c
index 3947b7138184..e4a5b4d90f83 100644
--- a/drivers/cpufreq/amd-pstate-ut.c
+++ b/drivers/cpufreq/amd-pstate-ut.c
@@ -71,7 +71,7 @@ static bool get_shared_mem(void)
 	ssize_t ret;
 
 	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))
 			pr_err("%s unable to open %s file!\n", __func__, path);
 		else {
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ