On Thu, Nov 12, 2026 at 11:07:16PM +0200, Jarkko Sakkinen wrote:
> On Thu, Nov 12, 2026 at 12:40:45PM -0800, Breno Leitao wrote:
> > On Thu, Nov 12, 2026 at 04:03:06PM +0200, Jarkko Sakkinen wrote:
> > > > 
> > > > This would be then nr_lost_responses.
> > > 
> > > Oops sorry.
> > > 
> > > I mean nr_missed_responses (and I would prefer "missed" over "lost").
> > 
> > Would you hate if I go with max_missed_responses?
> 
> It's a great question. Here I think asymmetry defines things better,
> and makes sense also few months from now.
> 
> So I think this would be most consistent:
> 
> 1. kernel command-line: tpm_max_missed_responses
> 2. tpm_chip: nr_missed_responses.
> 
> The first defines the modulo and second counts up to that.
> 
> Can't recall (and too lazy to check) how it exactly was in your code
> change but I would formalize all this along the lines of:
> 
>       if (!(++chip->nr_missed_responses % tpm_max_missed_responses)) {

Ugh, sorry that is broken as hell :-)

I mean:

   if (++chip->nr_missed_responses > tpm_max_missed_responses) {

   }

Probably was already something like similar anyway in your changes. I
just wanted to highlight how the naming makes in code-level a lot of
common sense...

Br, Jarkko

Reply via email to