All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: David Windsor <dwindsor@gmail.com>
Cc: Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: svsm: constify tpm_chip_ops
Date: Sat, 9 May 2026 22:02:49 +0300	[thread overview]
Message-ID: <af-E2d_jlowRk0ta@kernel.org> (raw)
In-Reply-To: <20260505202738.145800-1-dwindsor@gmail.com>

On Tue, May 05, 2026 at 04:27:38PM -0400, David Windsor wrote:
> Constify the SVSM vTPM ops. It is statically initialized and never
> written to, so let's store it in .rodata.
> 
> Every other tpm_class_ops instance in drivers/char/tpm/ is already
> const.
> 
> Signed-off-by: David Windsor <dwindsor@gmail.com>
> ---
>  drivers/char/tpm/tpm_svsm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_svsm.c b/drivers/char/tpm/tpm_svsm.c
> index f5ba0f64850b..b74d60f687d5 100644
> --- a/drivers/char/tpm/tpm_svsm.c
> +++ b/drivers/char/tpm/tpm_svsm.c
> @@ -49,7 +49,7 @@ static int tpm_svsm_send(struct tpm_chip *chip, u8 *buf, size_t bufsiz,
>  	return svsm_vtpm_cmd_response_parse(priv->buffer, buf, bufsiz);
>  }
>  
> -static struct tpm_class_ops tpm_chip_ops = {
> +static const struct tpm_class_ops tpm_chip_ops = {
>  	.flags = TPM_OPS_AUTO_STARTUP,
>  	.send = tpm_svsm_send,
>  };
> 
> base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
> -- 
> 2.53.0
> 

Thanks, applied.

BR, Jarkko

      parent reply	other threads:[~2026-05-09 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 20:27 [PATCH] tpm: svsm: constify tpm_chip_ops David Windsor
2026-05-06  7:20 ` Stefano Garzarella
2026-05-09 19:02 ` Jarkko Sakkinen [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=af-E2d_jlowRk0ta@kernel.org \
    --to=jarkko@kernel.org \
    --cc=dwindsor@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.