diff mbox series

tpm: Drop warning when an auth session is active

Message ID Z8rQ7Mxf_G6227HP@earth.li (mailing list archive)
State New
Headers show
Series tpm: Drop warning when an auth session is active | expand

Commit Message

Jonathan McDowell March 7, 2025, 10:56 a.m. UTC
Auth sessions are lazily flushed since commit df745e25098dc ("tpm:
Lazily flush the auth session"), so it's expected that we might try to
start a new session when one is still active.

Signed-off-by: Jonathan McDowell <noodles@meta.com>
---
 drivers/char/tpm/tpm2-sessions.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jarkko Sakkinen March 7, 2025, 4:36 p.m. UTC | #1
On Fri, Mar 07, 2025 at 10:56:44AM +0000, Jonathan McDowell wrote:
> Auth sessions are lazily flushed since commit df745e25098dc ("tpm:
> Lazily flush the auth session"), so it's expected that we might try to
> start a new session when one is still active.
> 
> Signed-off-by: Jonathan McDowell <noodles@meta.com>
> ---
>  drivers/char/tpm/tpm2-sessions.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c
> index b70165b588ec..2d2c192ebb14 100644
> --- a/drivers/char/tpm/tpm2-sessions.c
> +++ b/drivers/char/tpm/tpm2-sessions.c
> @@ -982,7 +982,6 @@ int tpm2_start_auth_session(struct tpm_chip *chip)
>  	int rc;
>  
>  	if (chip->auth) {
> -		dev_warn_once(&chip->dev, "auth session is active\n");
>  		return 0;
>  	}

OK so curly faces should be also removed but I can adjust this
(if you don't mind), so we save all of us from trouble of
going through additional review round?

>  
> -- 
> 2.48.1
> 

BR, Jarkko
Jonathan McDowell March 7, 2025, 5:25 p.m. UTC | #2
On Fri, Mar 07, 2025 at 06:36:02PM +0200, Jarkko Sakkinen wrote:
> On Fri, Mar 07, 2025 at 10:56:44AM +0000, Jonathan McDowell wrote:
> > Auth sessions are lazily flushed since commit df745e25098dc ("tpm:
> > Lazily flush the auth session"), so it's expected that we might try to
> > start a new session when one is still active.
> > 
> > Signed-off-by: Jonathan McDowell <noodles@meta.com>
> > ---
> >  drivers/char/tpm/tpm2-sessions.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c
> > index b70165b588ec..2d2c192ebb14 100644
> > --- a/drivers/char/tpm/tpm2-sessions.c
> > +++ b/drivers/char/tpm/tpm2-sessions.c
> > @@ -982,7 +982,6 @@ int tpm2_start_auth_session(struct tpm_chip *chip)
> >  	int rc;
> >  
> >  	if (chip->auth) {
> > -		dev_warn_once(&chip->dev, "auth session is active\n");
> >  		return 0;
> >  	}
> 
> OK so curly faces should be also removed but I can adjust this
> (if you don't mind), so we save all of us from trouble of
> going through additional review round?

Doh! Shoulda caught that. Feel free to do the fix up.

J.
Jarkko Sakkinen March 7, 2025, 7:49 p.m. UTC | #3
On Fri, Mar 07, 2025 at 05:25:36PM +0000, Jonathan McDowell wrote:
> On Fri, Mar 07, 2025 at 06:36:02PM +0200, Jarkko Sakkinen wrote:
> > On Fri, Mar 07, 2025 at 10:56:44AM +0000, Jonathan McDowell wrote:
> > > Auth sessions are lazily flushed since commit df745e25098dc ("tpm:
> > > Lazily flush the auth session"), so it's expected that we might try to
> > > start a new session when one is still active.
> > > 
> > > Signed-off-by: Jonathan McDowell <noodles@meta.com>
> > > ---
> > >  drivers/char/tpm/tpm2-sessions.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c
> > > index b70165b588ec..2d2c192ebb14 100644
> > > --- a/drivers/char/tpm/tpm2-sessions.c
> > > +++ b/drivers/char/tpm/tpm2-sessions.c
> > > @@ -982,7 +982,6 @@ int tpm2_start_auth_session(struct tpm_chip *chip)
> > >  	int rc;
> > >  
> > >  	if (chip->auth) {
> > > -		dev_warn_once(&chip->dev, "auth session is active\n");
> > >  		return 0;
> > >  	}
> > 
> > OK so curly faces should be also removed but I can adjust this
> > (if you don't mind), so we save all of us from trouble of
> > going through additional review round?
> 
> Doh! Shoulda caught that. Feel free to do the fix up.

Sure np!

> J.

BR, Jarkko
diff mbox series

Patch

diff --git a/drivers/char/tpm/tpm2-sessions.c b/drivers/char/tpm/tpm2-sessions.c
index b70165b588ec..2d2c192ebb14 100644
--- a/drivers/char/tpm/tpm2-sessions.c
+++ b/drivers/char/tpm/tpm2-sessions.c
@@ -982,7 +982,6 @@  int tpm2_start_auth_session(struct tpm_chip *chip)
 	int rc;
 
 	if (chip->auth) {
-		dev_warn_once(&chip->dev, "auth session is active\n");
 		return 0;
 	}