From: Sergey Senozhatsky <sergey.senozhatsky at gmail.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH v2 8/8] Adding a clean_shutdown function
Date: Wed, 15 Oct 2014 21:59:22 +0900 [thread overview]
Message-ID: <20141015125922.GD1189@swordfish> (raw)
In-Reply-To: 1413310159-30577-9-git-send-email-joe.konno@linux.intel.com
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
On (10/14/14 11:09), Joe Konno wrote:
> src/main.cpp | 15 ++++++++++++---
> 1 file changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/src/main.cpp b/src/main.cpp
> index d3963ed..b6ce090 100644
> --- a/src/main.cpp
> +++ b/src/main.cpp
> @@ -368,6 +368,17 @@ static void powertop_init(void)
> initialized = 1;
> }
>
> +void clean_shutdown()
> +{
> + close_results();
> + close_display();
> + clean_open_devices();
> + clear_all_devices();
> + clear_all_cpus();
> +
> + return;
> +}
> +
I would agree on that refactoring if we would call this function
from several places. otherwise, I see no actual reason.
-ss
> int main(int argc, char **argv)
> {
> @@ -498,9 +509,7 @@ int main(int argc, char **argv)
> clear_tuning();
> reset_display();
>
> - clean_open_devices();
> - clear_all_devices();
> - clear_all_cpus();
> + clean_shutdown();
>
> return 0;
> }
> --
> 2.1.2
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
next reply other threads:[~2014-10-15 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 12:59 Sergey Senozhatsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-17 17:34 [Powertop] [PATCH v2 8/8] Adding a clean_shutdown function Joe Konno
2014-10-14 18:09 Joe Konno
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=20141015125922.GD1189@swordfish \
--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.