From: Joe Konno <joe.konno at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH 0/4 v1] lib and tuning cleanup series
Date: Mon, 11 Sep 2017 08:51:55 -0700 [thread overview]
Message-ID: <c91458$4fi1ru@fmsmga006.fm.intel.com> (raw)
In-Reply-To: 20170908223651.27979-1-joe.konno@linux.intel.com
[-- Attachment #1: Type: text/plain, Size: 2223 bytes --]
Feedback appreciated, Magnus. I'll integrate that feedback into a v2 submission.
On Fri, 8 Sep 2017 15:36:47 -0700
Joe Konno <joe.konno(a)linux.intel.com> wrote:
> From: Joe Konno <joe.konno(a)intel.com>
>
> This series could be split in two, one for the libpci stuff in "lib",
> and another for "tuning" cleanups. The cleanups in "lib" are not
> dependent on the cleanups in "tuning" and vice-versa. There should be
> no changes to PowerTOP operations or usage as a result of these
> patches-- code cleanups only.
>
> I was re-learning libpci a while back and, during my walks along various
> PCI buses, spotted a trivial refactor for the libpci functionality in
> "lib". This is to make it (slightly) more tempting to embark on future
> changes to walk PCI buses with libpci instead of sysfs-- especially in
> "tuning" cases.
>
> While looking into additional runtime PM tunables, I stumbled upon
> #defines used for tunable states. Implemented those states in an enum
> instead. Proved easy as those defines were not used as factors in math
> operations, so they were acting as enum entries to begin with. After the
> enum was implemented, gcc warned about unhandled states in
> tunable::result_string()'s switch statement, so I fixed it.
>
>
> Joe Konno (4):
> lib: refactor pci_access checks
> lib: have check_pci_access() scan the entire bus
> tuning: use tunable_state enum instead of defines
> tuning: complete tunable result switch
>
> src/lib.cpp | 14 ++++++++++----
> src/tuning/bluetooth.cpp | 6 +++---
> src/tuning/bluetooth.h | 2 +-
> src/tuning/ethernet.cpp | 4 ++--
> src/tuning/ethernet.h | 2 +-
> src/tuning/runtime.cpp | 2 +-
> src/tuning/runtime.h | 2 +-
> src/tuning/tunable.h | 26 +++++++++++++++++---------
> src/tuning/tuningi2c.cpp | 2 +-
> src/tuning/tuningi2c.h | 2 +-
> src/tuning/tuningsysfs.cpp | 2 +-
> src/tuning/tuningsysfs.h | 2 +-
> src/tuning/tuningusb.cpp | 2 +-
> src/tuning/tuningusb.h | 2 +-
> src/tuning/wifi.cpp | 2 +-
> src/tuning/wifi.h | 2 +-
> 16 files changed, 44 insertions(+), 30 deletions(-)
>
[-- Attachment #2: attachment.sig --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next reply other threads:[~2017-09-11 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 15:51 Joe Konno [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-09-08 22:36 [Powertop] [PATCH 0/4 v1] lib and tuning cleanup series 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='c91458$4fi1ru@fmsmga006.fm.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox