mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-22 02:17:36 -04:00
tpm: svsm: constify tpm_chip_ops
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> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20260505202738.145800-1-dwindsor@gmail.com Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
This commit is contained in:
committed by
Jarkko Sakkinen
parent
1a3746ccbb
commit
ebc242f78c
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user