From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Jiandi An <anjiandi@codeaurora.org>
Cc: tpmdd-devel@lists.sourceforge.net, peterhuewe@gmx.de,
tpmdd@selhorst.net, jarkko.sakkinen@linux.intel.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm/tpm_crb: Access locality for only CRB_START method
Date: Tue, 8 Aug 2017 16:36:43 -0600 [thread overview]
Message-ID: <20170808223643.GD29372@obsidianresearch.com> (raw)
In-Reply-To: <1502074455-4867-1-git-send-email-anjiandi@codeaurora.org>
On Sun, Aug 06, 2017 at 09:54:15PM -0500, Jiandi An wrote:
> static int __maybe_unused crb_go_idle(struct device *dev, struct crb_priv *priv)
> {
> - if ((priv->flags & CRB_FL_ACPI_START) ||
> - (priv->flags & CRB_FL_CRB_SMC_START))
> + if (!(priv->flags & CRB_FL_CRB_START))
I think it would be better to have these list the cases where go_idle
is known to be required. Less brittle that way..
if ((priv->flags & (CRB_FL_ACPI_START | CRB_FL_CRB_START)) == 0)
return 0
> - if (!(priv->flags & CRB_FL_ACPI_START)) {
> + if (priv->flags & CRB_FL_CRB_START) {
Eg like this now makes more sense, assumming CRB_START is the right
test :)
Jason
prev parent reply other threads:[~2017-08-08 22:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 2:54 [PATCH] tpm/tpm_crb: Access locality for only CRB_START method Jiandi An
2017-08-08 22:36 ` Jason Gunthorpe [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=20170808223643.GD29372@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=anjiandi@codeaurora.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.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 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 read-only IMAP folder(s) and NNTP newsgroup(s).