All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-kernel@vger.kernel.org,
	Andreas Noever <andreas.noever@gmail.com>,
	Michael Jamet <michael.jamet@intel.com>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	Mario.Limonciello@dell.com,
	Anthony Wong <anthony.wong@canonical.com>,
	Rajmohan Mani <rajmohan.mani@intel.com>,
	Raanan Avargil <raanan.avargil@intel.com>,
	David Laight <David.Laight@aculab.com>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2 7/8] thunderbolt: Add support for Intel Ice Lake
Date: Tue, 13 Aug 2019 20:01:09 +0300	[thread overview]
Message-ID: <20190813170109.GB18281@lahna.fi.intel.com> (raw)
In-Reply-To: <20190813164930.GA18281@lahna.fi.intel.com>

On Tue, Aug 13, 2019 at 07:49:35PM +0300, Mika Westerberg wrote:
> > If so, I'd suggest:
> > 
> > 	/* Keep the domain powered while veto is in effect */
> > 	if (cmpxchg(&icm->veto, false, true))
> > 		pm_runtime_get(&tb->dev);
> > 
> > You'll have to declare icm->veto unsigned int instead of bool
> > because thunderbolt.ko is compiled if CONFIG_COMPILE_TEST is
> > enabled and there are arches which do not support cmpxchg for
> > a size of 1 byte.
> > 
> > The other bools in struct icm should likewise be unsigned int
> > per Linus' dictum:
> > https://lkml.org/lkml/2017/11/21/384
> 
> Yeah, it probably wastes some space but I like them because IMHO they
> are more readable than bitfields. We have a bunch of other bools in the
> driver structures so if we are going to convert struct icm we should do
> the same for others to keep things consistent. Probably should be a
> separate cleanup patch.

Then again assigning to bool looks more "correct" than with bitfield:

   icm->veto = false;

vs.

   icm->veto = 0;

It is possible to use false/true with bitfield but it does not feel
right. Maybe it's just me ;-)

  reply	other threads:[~2019-08-13 17:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 12:38 [PATCH v2 0/8] thunderbolt: Intel Ice Lake support Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 1/8] thunderbolt: Correct path indices for PCIe tunnel Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 2/8] thunderbolt: Move NVM upgrade support flag to struct icm Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 3/8] thunderbolt: Use 32-bit writes when writing ring producer/consumer Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 4/8] thunderbolt: Do not fail adding switch if some port is not implemented Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 5/8] thunderbolt: Hide switch attributes that are not set Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 6/8] thunderbolt: Expose active parts of NVM even if upgrade is not supported Mika Westerberg
2019-08-12 12:38 ` [PATCH v2 7/8] thunderbolt: Add support for Intel Ice Lake Mika Westerberg
2019-08-13 16:10   ` Lukas Wunner
2019-08-13 16:49     ` Mika Westerberg
2019-08-13 17:01       ` Mika Westerberg [this message]
2019-08-12 12:38 ` [PATCH v2 8/8] ACPI / property: Add two new Thunderbolt property GUIDs to the list Mika Westerberg
2019-08-12 21:34   ` Rafael J. Wysocki

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=20190813170109.GB18281@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=David.Laight@aculab.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=anthony.wong@canonical.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    --cc=raanan.avargil@intel.com \
    --cc=rajmohan.mani@intel.com \
    --cc=rjw@rjwysocki.net \
    /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.