linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: "Meng, Li (Jassmine)" <Li.Meng@amd.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Fontenot, Nathan" <Nathan.Fontenot@amd.com>,
	"Sharma, Deepak" <Deepak.Sharma@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Limonciello, Mario" <Mario.Limonciello@amd.com>,
	"Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>,
	"Yuan, Perry" <Perry.Yuan@amd.com>,
	"Du, Xiaojian" <Xiaojian.Du@amd.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Borislav Petkov <bp@alien8.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	kernel test robot <lkp@intel.com>
Subject: Re: [Patch] cpufreq: amd-pstate: modify type in argument 2 for filp_open
Date: Tue, 6 Sep 2022 11:19:35 +0800	[thread overview]
Message-ID: <Yxa8R7NfcA3EFD5Y@amd.com> (raw)
In-Reply-To: <20220906024826.1560949-1-li.meng@amd.com>

On Tue, Sep 06, 2022 at 10:48:26AM +0800, Meng, Li (Jassmine) wrote:
> 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>

> ---
>  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
> 

      reply	other threads:[~2022-09-06  3:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06  2:48 [Patch] cpufreq: amd-pstate: modify type in argument 2 for filp_open Meng Li
2022-09-06  3:19 ` Huang Rui [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yxa8R7NfcA3EFD5Y@amd.com \
    --to=ray.huang@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Deepak.Sharma@amd.com \
    --cc=Jinzhou.Su@amd.com \
    --cc=Li.Meng@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Nathan.Fontenot@amd.com \
    --cc=Perry.Yuan@amd.com \
    --cc=Xiaojian.Du@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=skhan@linuxfoundation.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).