From: Jarkko Sakkinen <jarkko@kernel.org>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, stefanb@linux.vnet.ibm.com,
linux@mniewoehner.de, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org, l.sanfilippo@kunbus.com,
lukas@wunner.de, p.rosenberger@kunbus.com
Subject: Re: [PATCH v6 5/9] tpm, tpm_tis: Only handle supported interrupts
Date: Tue, 28 Jun 2022 02:09:42 +0300 [thread overview]
Message-ID: <Yro4tl7g1IqkEszT@kernel.org> (raw)
In-Reply-To: <6b950660-6a78-f329-39b4-11d585e4959c@gmx.de>
On Sun, Jun 26, 2022 at 02:18:17PM +0200, Lino Sanfilippo wrote:
> On 26.06.22 at 08:40, Jarkko Sakkinen wrote:
> >
> > I would instead mask out bits and write a helper function
> > taking care of this:
> >
> > static u8 tpm_tis_filter_sts_mask(u8 int_mask, u8 sts_mask)
> > {
> > struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev);
> >
> > if (!(int_mask & TPM_INTF_STS_VALID_INT))
> > sts_mask &= ~TPM_STS_VALID;
> >
> > if (!(int_mask & TPM_INTF_DATA_AVAIL_INT))
> > sts_mask &= ~TPM_STS_DATA_AVAIL;
> >
> > if (!(int_mask & TPM_INTF_CMD_READY_INT))
> > sts_mask &= ~TPM_STS_COMMAND_READY;
> >
> > return sts_mask;
> > }
> >
> > Less operations and imho somewhat cleaner structure.
> >
> > Add suggested-by if you want.
>
> I thought of a helper like this before but then decided to
> not introduce another function to keep the code changes minimal. But yes,
> it is indeed cleaner. I will do the change and resubmit the series.
>
> Thanks for the review!
>
> Regards,
> Lino
Yeah, please don't add suggested-by, it's such a minor detail
in the overall patch :-) Thanks for taking time to fix these
glitches and also taking all the feedback into account (and
also being patient).
BR, Jarkko
next prev parent reply other threads:[~2022-06-27 23:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 13:24 [PATCH v6 0/9] TPM IRQ fixes Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 1/9] tpm, tpm_tis: Avoid cache incoherency in test for interrupts Lino Sanfilippo
2022-06-26 6:23 ` Jarkko Sakkinen
2022-06-21 13:24 ` [PATCH v6 2/9] tpm, tpm_tis: Claim locality before writing TPM_INT_ENABLE register Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 3/9] tpm, tpm_tis: Disable interrupts if tpm_tis_probe_irq() failed Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 4/9] tpm, tmp_tis: Claim locality before writing interrupt registers Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 5/9] tpm, tpm_tis: Only handle supported interrupts Lino Sanfilippo
2022-06-26 6:40 ` Jarkko Sakkinen
2022-06-26 6:44 ` Jarkko Sakkinen
2022-06-26 12:18 ` Lino Sanfilippo
2022-06-27 23:09 ` Jarkko Sakkinen [this message]
2022-06-29 9:20 ` Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 6/9] tmp, tmp_tis: Implement usage counter for locality Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 7/9] tpm, tpm_tis: Request threaded interrupt handler Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 8/9] tpm, tpm_tis: Claim locality in " Lino Sanfilippo
2022-06-21 13:24 ` [PATCH v6 9/9] tpm, tpm_tis: Enable interrupt test Lino Sanfilippo
2022-06-21 22:39 ` Michael Niewöhner
2022-06-22 9:53 ` Lino Sanfilippo
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=Yro4tl7g1IqkEszT@kernel.org \
--to=jarkko@kernel.org \
--cc=LinoSanfilippo@gmx.de \
--cc=jgg@ziepe.ca \
--cc=l.sanfilippo@kunbus.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@mniewoehner.de \
--cc=lukas@wunner.de \
--cc=p.rosenberger@kunbus.com \
--cc=peterhuewe@gmx.de \
--cc=stefanb@linux.vnet.ibm.com \
/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).