From: Jean Delvare <jdelvare@suse.de>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, Julia Lawall <Julia.Lawall@lip6.fr>,
Guenter Roeck <linux@roeck-us.net>,
lm-sensors@lm-sensors.org
Subject: Re: [PATCH 1/1 linux-next] hwmon: (w83627ehf) use swap() in w82627ehf_swap_tempreg()
Date: Thu, 11 Jun 2015 10:11:51 +0200 [thread overview]
Message-ID: <20150611101151.6ca81769@endymion.delvare> (raw)
In-Reply-To: <1433953981-24515-1-git-send-email-fabf@skynet.be>
On Wed, 10 Jun 2015 18:33:01 +0200, Fabian Frederick wrote:
> Use kernel.h macro definition.
>
> Thanks to Julia Lawall for Coccinelle scripting support.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> drivers/hwmon/w83627ehf.c | 26 +++++---------------------
> 1 file changed, 5 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> index b10353b..697007a 100644
> --- a/drivers/hwmon/w83627ehf.c
> +++ b/drivers/hwmon/w83627ehf.c
> @@ -1937,27 +1937,11 @@ static inline void w83627ehf_init_device(struct w83627ehf_data *data,
> static void w82627ehf_swap_tempreg(struct w83627ehf_data *data,
> int r1, int r2)
> {
> - u16 tmp;
> -
> - tmp = data->temp_src[r1];
> - data->temp_src[r1] = data->temp_src[r2];
> - data->temp_src[r2] = tmp;
> -
> - tmp = data->reg_temp[r1];
> - data->reg_temp[r1] = data->reg_temp[r2];
> - data->reg_temp[r2] = tmp;
> -
> - tmp = data->reg_temp_over[r1];
> - data->reg_temp_over[r1] = data->reg_temp_over[r2];
> - data->reg_temp_over[r2] = tmp;
> -
> - tmp = data->reg_temp_hyst[r1];
> - data->reg_temp_hyst[r1] = data->reg_temp_hyst[r2];
> - data->reg_temp_hyst[r2] = tmp;
> -
> - tmp = data->reg_temp_config[r1];
> - data->reg_temp_config[r1] = data->reg_temp_config[r2];
> - data->reg_temp_config[r2] = tmp;
> + swap(data->temp_src[r1], data->temp_src[r2]);
> + swap(data->reg_temp[r1], data->reg_temp[r2]);
> + swap(data->reg_temp_over[r1], data->reg_temp_over[r2]);
> + swap(data->reg_temp_hyst[r1], data->reg_temp_hyst[r2]);
> + swap(data->reg_temp_config[r1], data->reg_temp_config[r2]);
> }
>
> static void
Looks good. Applied, thanks.
--
Jean Delvare
SUSE L3 Support
prev parent reply other threads:[~2015-06-11 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 16:33 Fabian Frederick
2015-06-11 8:11 ` Jean Delvare [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=20150611101151.6ca81769@endymion.delvare \
--to=jdelvare@suse.de \
--cc=Julia.Lawall@lip6.fr \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lm-sensors@lm-sensors.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®