All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@redhat.com>
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH 0/5] acpi_power_meter: clean up duplicate code
Date: Mon, 02 Apr 2012 18:18:59 +0000	[thread overview]
Message-ID: <cover.1333390501.git.kyle@mcmartin.ca> (raw)

From: Kyle McMartin <kyle@mcmartin.ca>

acpi_power_meter currently duplicates a lot of code between the rw and
ro sensor templates unnecessarily. The attached five part series cleans
things up to use the same code path for both, deciding which is which by
the use of the .set field.

Additionally, (imho at least) it makes the struct initializers a bit
more pretty and uses a macro to reduce the repetition of each member.

It's been compile tested across the series for bisectability, but I do
not currently have access to any device which uses this driver for
testing.

regards, Kyle McMartin

Kyle McMartin (5):
  acpi_power_meter: use the same struct {rw,ro}_sensor_template for
    both
  acpi_power_meter: use a {RW,RO}_SENSOR_TEMPLATE macro to clean things
    up
  acpi_power_meter: remove duplicate code between
    register_{ro,rw}_attrs
  acpi_power_meter: drop meter_rw_attrs, use common meter_attrs
  acpi_power_meter: clean up code around setup_attrs

 drivers/hwmon/acpi_power_meter.c |  165 +++++++++++++++++---------------------
 1 files changed, 72 insertions(+), 93 deletions(-)

-- 
1.7.7.6


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

             reply	other threads:[~2012-04-02 18:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 18:18 Kyle McMartin [this message]
2012-04-03 15:39 ` [lm-sensors] [PATCH 0/5] acpi_power_meter: clean up duplicate code Guenter Roeck
2012-04-04 15:32 ` Kyle McMartin
2012-04-04 23:36 ` Guenter Roeck

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=cover.1333390501.git.kyle@mcmartin.ca \
    --to=kyle@redhat.com \
    --cc=lm-sensors@vger.kernel.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.