lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150611101151.6ca81769@endymion.delvare>
Date:	Thu, 11 Jun 2015 10:11:51 +0200
From:	Jean Delvare <jdelvare@...e.de>
To:	Fabian Frederick <fabf@...net.be>
Cc:	linux-kernel@...r.kernel.org, Julia Lawall <Julia.Lawall@...6.fr>,
	Guenter Roeck <linux@...ck-us.net>, lm-sensors@...sensors.org
Subject: Re: [PATCH 1/1 linux-next] hwmon: (w83627ehf) use swap() in
 w82627ehf_swap_tempreg()

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@...net.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ