Skip to content

Commit 6382c27

Browse files
arndbij-intel
authored andcommitted
platform/x86/intel/pmt/discovery: fix format string warning
When -Wformat-security is enabled, this new code triggers it: drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_features_discovery': drivers/platform/x86/intel/pmt/discovery.c:505:36: error: format not a string literal and no format arguments [-Werror=format-security] 505 | pmt_feature_names[feature->id]); Fixes: d9a0788 ("platform/x86/intel/pmt: Add PMT Discovery driver") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20250711072718.2748415-1-arnd@kernel.org Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent bde430f commit 6382c27

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/platform/x86/intel/pmt/discovery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static int pmt_features_discovery(struct pmt_features_priv *priv,
502502
}
503503

504504
ret = kobject_init_and_add(&feature->kobj, ktype, &priv->dev->kobj,
505-
pmt_feature_names[feature->id]);
505+
"%s", pmt_feature_names[feature->id]);
506506
if (ret)
507507
return ret;
508508

0 commit comments

Comments
 (0)