Skip to contentSkip to conversation

tpm: ftpm_tee: remove incorrect of_match_ptr annotation

PATCH In review Arnd Bergmann 3 participants 4 messages Feb 25, 2025 – Mar 2, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tpm: ftpm_tee: remove incorrect of_match_ptr annotation

From: Arnd Bergmann <[email protected]>

Building with W=1 shows a warning about of_ftpm_tee_ids being unused when CONFIG_OF is disabled:

drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable]

Drop the unnecessary of_match_ptr().

---
An earlier version had this combined with other changes, I made it a separate patch now

---
 drivers/char/tpm/tpm_ftpm_tee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_ftpm_tee.c +1 -1
index 139556b21cc6..8d9209dfc384 100644
@@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids);
 static struct platform_driver ftpm_tee_plat_driver = {
 	.driver = {
 		.name = "ftpm-tee",
-		.of_match_table = of_match_ptr(of_ftpm_tee_ids),
+		.of_match_table = of_ftpm_tee_ids,
 	},
 	.shutdown = ftpm_plat_tee_shutdown,
 	.probe = ftpm_plat_tee_probe,
Signature · 1 line
2.39.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Building with W=1 shows a warning about of_ftpm_tee_ids being unused when CONFIG_OF is disabled:

drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable]

Drop the unnecessary of_match_ptr().

Quoted 9 lines

---
An earlier version had this combined with other changes, I made it a separate patch now

---
 drivers/char/tpm/tpm_ftpm_tee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-Sumit

Quoted 17 lines
drivers/char/tpm/tpm_ftpm_tee.c +1 -1
index 139556b21cc6..8d9209dfc384 100644
@@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids);
 static struct platform_driver ftpm_tee_plat_driver = {
 	.driver = {
 		.name = "ftpm-tee",
-		.of_match_table = of_match_ptr(of_ftpm_tee_ids),
+		.of_match_table = of_ftpm_tee_ids,
 	},
 	.shutdown = ftpm_plat_tee_shutdown,
 	.probe = ftpm_plat_tee_probe,
Signature · 1 line
2.39.5
maintainer
#2 lore raw
In reply to Arnd Bergmann

On Tue, Feb 25, 2025 at 05:37:15PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <[email protected]>

Quoted 10 lines

Building with W=1 shows a warning about of_ftpm_tee_ids being unused when CONFIG_OF is disabled:

drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable]

Drop the unnecessary of_match_ptr().

I've been on holiday (back at work on Monday).

Moving to my TODO folder, thanks.

Quoted 23 lines

---
An earlier version had this combined with other changes, I made it a separate patch now

---
 drivers/char/tpm/tpm_ftpm_tee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_ftpm_tee.c +1 -1
index 139556b21cc6..8d9209dfc384 100644
@@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids);
 static struct platform_driver ftpm_tee_plat_driver = {
 	.driver = {
 		.name = "ftpm-tee",
-		.of_match_table = of_match_ptr(of_ftpm_tee_ids),
+		.of_match_table = of_ftpm_tee_ids,
 	},
 	.shutdown = ftpm_plat_tee_shutdown,
 	.probe = ftpm_plat_tee_probe,
Signature · 1 line
2.39.5

BR, Jarkko

maintainer
#3 lore raw
In reply to Arnd Bergmann
Quoted 34 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Building with W=1 shows a warning about of_ftpm_tee_ids being unused when CONFIG_OF is disabled:

drivers/char/tpm/tpm_ftpm_tee.c:356:34: error: unused variable 'of_ftpm_tee_ids' [-Werror,-Wunused-const-variable]

Drop the unnecessary of_match_ptr().

---
An earlier version had this combined with other changes, I made it a separate patch now

---
 drivers/char/tpm/tpm_ftpm_tee.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/tpm/tpm_ftpm_tee.c +1 -1
index 139556b21cc6..8d9209dfc384 100644
@@ -362,7 +362,7 @@ MODULE_DEVICE_TABLE(of, of_ftpm_tee_ids);
 static struct platform_driver ftpm_tee_plat_driver = {
 	.driver = {
 		.name = "ftpm-tee",
-		.of_match_table = of_match_ptr(of_ftpm_tee_ids),
+		.of_match_table = of_ftpm_tee_ids,
 	},
 	.shutdown = ftpm_plat_tee_shutdown,
 	.probe = ftpm_plat_tee_probe,
Signature · 1 line
2.39.5

It's now in my master (back from holidays)

BR, Jarkko