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-next>] [day] [month] [year] [list]
Date:   Sat, 20 Jul 2019 15:46:48 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Robert Karszniewicz <avoidr@...email.cc>,
        Rudolf Marek <r.marek@...embler.cz>,
        Jean Delvare <jdelvare@...e.com>
Cc:     linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] hwmon: (k8temp) update to use new hwmon registration
 API

On 7/20/19 2:13 PM, Robert Karszniewicz wrote:

[ ... ]

>>> +	if (data->swap_core_select)
>>> +		core = core ? 0 : 1;
>>
>> 		core = 1 - core;
>>
>> would accomplish the same without conditional.
> 
> How do you like
> 	core ^= 1;
> ?
> 

I didn't notice that before.

Your call. Everything is fine as long as it doesn't involve a conditional.
Hmm ... having said that, how about the following ?

	core ^= data->swap_core_select;

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ