All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] Fix for some 'requesting unregistered parameter'
Date: Tue, 29 Oct 2013 14:27:02 +0300	[thread overview]
Message-ID: <20131029112701.GA2180@swordfish.minsk.epam.com> (raw)
In-Reply-To: 435649119.17204207.1383038286562.JavaMail.root@redhat.com

[-- Attachment #1: Type: text/plain, Size: 2054 bytes --]

On (10/29/13 05:18), Jaroslav Skarvada wrote:
> Hi,
> 
> the attached patch may fix 'requesting unregistered parameter' for cases
> if e.g NIC was added after calibration
> 

added to -next. thanks.

	-ss

> regards
> 
> Jaroslav

> From d1daec6fd9c1d6534d81df1c3c73de9d714b7196 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad(a)redhat.com>
> Date: Tue, 29 Oct 2013 10:12:12 +0100
> Subject: [PATCH] network: fixed 'requesting unregistered parameter' if NIC is
>  added
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
> 
> Signed-off-by: Jaroslav ??karvada <jskarvad(a)redhat.com>
> ---
>  src/devices/network.cpp | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/src/devices/network.cpp b/src/devices/network.cpp
> index d0827ef..002600b 100644
> --- a/src/devices/network.cpp
> +++ b/src/devices/network.cpp
> @@ -345,11 +345,32 @@ const char * network::device_name(void)
>  
>  static void netdev_callback(const char *d_name)
>  {
> +	char devname[128];
> +
>  	std::string f_name("/sys/class/net/");
>  	if (strcmp(d_name, "lo") == 0)
>  		return;
>  
>  	f_name.append(d_name);
> +
> +	sprintf(devname, "%s-up", d_name);
> +	register_parameter(devname);
> +
> +	sprintf(devname, "%s-powerunsave", d_name);
> +	register_parameter(devname);
> +
> +	sprintf(devname, "%s-link-100", d_name);
> +	register_parameter(devname);
> +
> +	sprintf(devname, "%s-link-1000", d_name);
> +	register_parameter(devname);
> +
> +	sprintf(devname, "%s-link-high", d_name);
> +	register_parameter(devname);
> +
> +	sprintf(devname, "%s-packets", d_name);
> +	register_parameter(devname);
> +
>  	network *bl = new(std::nothrow) class network(d_name, f_name.c_str());
>  	if (bl) {
>  		all_devices.push_back(bl);
> -- 
> 1.8.3.1
> 

> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop


             reply	other threads:[~2013-10-29 11:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 11:27 Sergey Senozhatsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-10-29  9:18 [Powertop] Fix for some 'requesting unregistered parameter' Jaroslav Skarvada

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=20131029112701.GA2180@swordfish.minsk.epam.com \
    --to=powertop@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.