From: Guenter Roeck <linux@roeck-us.net>
To: Robert Karszniewicz <avoidr@firemail.cc>,
Rudolf Marek <r.marek@assembler.cz>,
Jean Delvare <jdelvare@suse.com>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] hwmon: (k8temp) update to use new hwmon registration API
Date: Sat, 20 Jul 2019 15:46:48 -0700 [thread overview]
Message-ID: <1d0f98fb-a0a6-38b7-98f6-ec4c365587b0@roeck-us.net> (raw)
In-Reply-To: <BVOE7U9MRMZY.38N6DGWH9KX7H@HP>
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
next parent reply other threads:[~2019-07-20 22:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BVOE7U9MRMZY.38N6DGWH9KX7H@HP>
2019-07-20 22:46 ` Guenter Roeck [this message]
2019-07-21 12:00 ` [PATCH v3 1/1] hwmon: (k8temp) update to use new hwmon registration API Robert Karszniewicz
2019-07-21 15:14 ` Guenter Roeck
2019-07-21 20:37 ` avoidr
2019-07-22 0:03 ` Guenter Roeck
[not found] <BVOE1YNHJDU6.38N6DGWH9KX7H@HP>
2019-07-20 21:12 ` [PATCH 1/2] " Guenter Roeck
2019-07-20 13:15 [PATCH 0/2] " Robert Karszniewicz
2019-07-20 13:16 ` [PATCH 1/2] " Robert Karszniewicz
2019-07-20 14:08 ` 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=1d0f98fb-a0a6-38b7-98f6-ec4c365587b0@roeck-us.net \
--to=linux@roeck-us.net \
--cc=avoidr@firemail.cc \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=r.marek@assembler.cz \
/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;
as well as URLs for NNTP newsgroup(s).