* [PATCH] tpm: Make tcpci_pm_ops variable static const
@ 2026-02-16 11:04 Krzysztof Kozlowski
2026-03-03 21:26 ` Jarkko Sakkinen
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-16 11:04 UTC (permalink / raw)
To: Peter Huewe, Jarkko Sakkinen, Jason Gunthorpe, linux-integrity,
linux-kernel
Cc: Krzysztof Kozlowski
File-scope 'tcpci_pm_ops' is not used outside of this unit and is not
modified anywhere, so make it static const to silence sparse warning:
tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/char/tpm/tpm2-cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
index 3a77be7ebf4a..e00f668f8c84 100644
--- a/drivers/char/tpm/tpm2-cmd.c
+++ b/drivers/char/tpm/tpm2-cmd.c
@@ -21,7 +21,7 @@ static bool disable_pcr_integrity;
module_param(disable_pcr_integrity, bool, 0444);
MODULE_PARM_DESC(disable_pcr_integrity, "Disable integrity protection of TPM2_PCR_Extend");
-struct tpm2_hash tpm2_hash_map[] = {
+static const struct tpm2_hash tpm2_hash_map[] = {
{HASH_ALGO_SHA1, TPM_ALG_SHA1},
{HASH_ALGO_SHA256, TPM_ALG_SHA256},
{HASH_ALGO_SHA384, TPM_ALG_SHA384},
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tpm: Make tcpci_pm_ops variable static const
2026-02-16 11:04 [PATCH] tpm: Make tcpci_pm_ops variable static const Krzysztof Kozlowski
@ 2026-03-03 21:26 ` Jarkko Sakkinen
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2026-03-03 21:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Peter Huewe, Jason Gunthorpe, linux-integrity, linux-kernel
On Mon, Feb 16, 2026 at 12:04:59PM +0100, Krzysztof Kozlowski wrote:
> File-scope 'tcpci_pm_ops' is not used outside of this unit and is not
> modified anywhere, so make it static const to silence sparse warning:
>
> tcpci.c:1002:1: warning: symbol 'tcpci_pm_ops' was not declared. Should it be static?
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> drivers/char/tpm/tpm2-cmd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c
> index 3a77be7ebf4a..e00f668f8c84 100644
> --- a/drivers/char/tpm/tpm2-cmd.c
> +++ b/drivers/char/tpm/tpm2-cmd.c
> @@ -21,7 +21,7 @@ static bool disable_pcr_integrity;
> module_param(disable_pcr_integrity, bool, 0444);
> MODULE_PARM_DESC(disable_pcr_integrity, "Disable integrity protection of TPM2_PCR_Extend");
>
> -struct tpm2_hash tpm2_hash_map[] = {
> +static const struct tpm2_hash tpm2_hash_map[] = {
> {HASH_ALGO_SHA1, TPM_ALG_SHA1},
> {HASH_ALGO_SHA256, TPM_ALG_SHA256},
> {HASH_ALGO_SHA384, TPM_ALG_SHA384},
> --
> 2.51.0
>
Applied.
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-03 21:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-16 11:04 [PATCH] tpm: Make tcpci_pm_ops variable static const Krzysztof Kozlowski
2026-03-03 21:26 ` Jarkko Sakkinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox