[PATCH v2 17/19] platform/x86/intel/tpmi: Use scnprintf() to build the debugfs names

From: Kuppuswamy Sathyanarayanan

Date: Thu Sep 24 2026 - 14:42:43 EST


snprintf() is on its way out in favour of scnprintf(). Neither of the two
callers in tpmi_dbgfs_register() looks at the return value, so the
difference in what the two return does not matter here.

No functional change intended.

Suggested-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
---
drivers/platform/x86/intel/tpmi_common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/intel/tpmi_common.c b/drivers/platform/x86/intel/tpmi_common.c
index b4d361f0ec44..097754365897 100644
--- a/drivers/platform/x86/intel/tpmi_common.c
+++ b/drivers/platform/x86/intel/tpmi_common.c
@@ -492,7 +492,7 @@ static void tpmi_dbgfs_register(struct intel_tpmi_info *tpmi_info)
char name[64];
int i;

- snprintf(name, sizeof(name), "tpmi-%s", dev_name(tpmi_info->parent));
+ scnprintf(name, sizeof(name), "tpmi-%s", dev_name(tpmi_info->parent));
tpmi_info->dbgfs_dir = debugfs_create_dir(name, NULL);

debugfs_create_file("pfs_dump", 0444, tpmi_info->dbgfs_dir, tpmi_info, &tpmi_pfs_dbg_fops);
@@ -502,7 +502,7 @@ static void tpmi_dbgfs_register(struct intel_tpmi_info *tpmi_info)
struct dentry *dir;

pfs = &tpmi_info->tpmi_features[i];
- snprintf(name, sizeof(name), "tpmi-id-%02x", pfs->pfs_header.tpmi_id);
+ scnprintf(name, sizeof(name), "tpmi-id-%02x", pfs->pfs_header.tpmi_id);
dir = debugfs_create_dir(name, tpmi_info->dbgfs_dir);

debugfs_create_file("mem_dump", 0444, dir, pfs, &tpmi_mem_dump_fops);
--
2.43.0