Thread (2 messages) 2 messages, 2 authors, 2021-11-29
STALE1642d

[PATCH] tpm: make const pointer desc a static const array

From: Colin Ian King <hidden>
Date: 2021-11-27 17:28:10
Also in: kernel-janitors, lkml
Subsystem: the rest, tpm device driver · Maintainers: Linus Torvalds, Peter Huewe, Jarkko Sakkinen

Make const pointer desc a static const array, removes a dereference
and shrinks object code a few bytes.

Signed-off-by: Colin Ian King <redacted>
---
 drivers/char/tpm/tpm_tis_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index b2659a4c4016..649b4229e76e 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -716,7 +716,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id)
 
 static int tpm_tis_gen_interrupt(struct tpm_chip *chip)
 {
-	const char *desc = "attempting to generate an interrupt";
+	static const char desc[] = "attempting to generate an interrupt";
 	u32 cap2;
 	cap_t cap;
 	int ret;
-- 
2.33.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help