lkml.org 
[lkml]   [2017]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tpm/tpm_crb: Access locality for only CRB_START method
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

\
 
 \ /
  Last update: 2017-08-09 00:37    [W:0.021 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site