mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: Francisco Jerez <currojerez@riseup.net>,
	kbuild-all@01.org,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Len Brown <lenb@kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	0day robot <fengguang.wu@intel.com>
Subject: Re: [PATCH] OPTIONAL: cpufreq/intel_pstate: fix debugfs_simple_attr.cocci warnings
Date: Fri, 30 Mar 2018 11:51:01 +0200	[thread overview]
Message-ID: <2337789.pyKKFBg1Bd@aspire.rjw.lan> (raw)
In-Reply-To: <alpine.DEB.2.20.1803292109180.2750@hadrien>

Hi Julia,

On Thursday, March 29, 2018 9:12:06 PM CEST Julia Lawall wrote:
>  Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
>  for debugfs files.
> 
> Semantic patch information:
>  Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
>  imposes some significant overhead as compared to
>  DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
> 
> Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

We've dropped the debugfs bits from intel_pstate entirely, so this change
is not applicable any more.

Thanks!

> Fixes: 9eec7989e762 ("OPTIONAL: cpufreq/intel_pstate: Expose LP controller parameters via debugfs.")
> CC: Francisco Jerez <currojerez@riseup.net>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
> 
> I don't actually know anything about this issue.  The change was suggested
> by kbuild.
> 
>  intel_pstate.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -885,7 +885,7 @@ static int lp_param_get(void *data, u64
>  	*val = *(u32 *)data;
>  	return 0;
>  }
> -DEFINE_SIMPLE_ATTRIBUTE(fops_lp_param, lp_param_get, lp_param_set, "%llu\n");
> +DEFINE_DEBUGFS_ATTRIBUTE(fops_lp_param, lp_param_get, lp_param_set, "%llu\n");
> 
>  static struct dentry *debugfs_parent;
> 
> @@ -922,9 +922,10 @@ static void intel_pstate_debug_expose_pa
>  	for (i = 0; lp_files[i].name; i++) {
>  		struct dentry *dentry;
> 
> -		dentry = debugfs_create_file(lp_files[i].name, 0660,
> -					     debugfs_parent, lp_files[i].value,
> -					     &fops_lp_param);
> +		dentry = debugfs_create_file_unsafe(lp_files[i].name, 0660,
> +						    debugfs_parent,
> +						    lp_files[i].value,
> +						    &fops_lp_param);
>  		if (!IS_ERR(dentry))
>  			lp_files[i].dentry = dentry;
>  	}
> 

      parent reply	other threads:[~2018-03-30  9:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 19:12 Julia Lawall
2018-03-29 19:11 ` Francisco Jerez
2018-03-29 19:31 ` [kbuild-all] " Fabio Estevam
2018-03-29 19:23   ` Francisco Jerez
2018-03-29 19:44   ` Julia Lawall
2018-03-30  6:14     ` Nicolai Stange
2018-03-30  6:22       ` Julia Lawall
2018-03-30 15:33         ` Fabio Estevam
2018-03-31  4:20         ` Nicolai Stange
2018-03-30  9:51 ` Rafael J. Wysocki [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=2337789.pyKKFBg1Bd@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=currojerez@riseup.net \
    --cc=fengguang.wu@intel.com \
    --cc=julia.lawall@lip6.fr \
    --cc=kbuild-all@01.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --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

all inboxes | Powered by JetHome®